← ClaudeAtlas

market-regimelisted

Reads the market regime of NIFTY, BANKNIFTY, SENSEX (or any index/ETF CSV) from the index's own tape: distribution-day clusters with 25-session/5%-rally expiry, the correction → rally attempt → follow-through cycle, 50/200 DMA and 52-week drawdown context, and optional India VIX. Outputs a 0–100 risk score, a regime label, an exposure ceiling (% of capital, max new positions) and the levels that would change the label. Handles Yahoo's missing index volume via ETF/futures proxy or a clearly flagged price-only mode. regime.py works offline from CSV. Use when the user asks: "is the market in an uptrend", "should I be buying now", "how much should I be invested", "is NIFTY topping", "distribution days on NIFTY", "follow-through day", "is this bounce real", "market regime", "should I go to cash", or before any new swing/positional entries.
Shubhamkumartrichy/claude-trading-skills-india · ★ 62 · Data & Documents · score 84
Install: claude install-skill Shubhamkumartrichy/claude-trading-skills-india
# Market Regime Decide how much risk the market allows before picking stocks. Most swing breakouts fail when the index is distributing or correcting, so the regime sets the exposure ceiling for every other skill. ## Commands ```bash python3 scripts/regime.py status --csv nifty.csv --volume-csv niftybees.csv --vix 14.2 python3 scripts/regime.py status --symbol NIFTY --vix 14.2 # yfinance; ETF volume auto-fetched python3 scripts/regime.py distribution --csv nifty.csv --volume-csv niftybees.csv --all --stalling python3 scripts/regime.py ftd --csv banknifty.csv --volume-csv bankbees.csv --events 15 python3 scripts/regime.py trend --symbol SENSEX python3 scripts/regime.py status --csv nifty.csv --as-of 2026-06-05 --json # replay a past date ``` Inputs match `../technical-analysis/scripts/ta.py` (`--csv`, `--candles`, `--symbol`). Useful flags: `--ftd-pct`, `--dd-pct` (0.2), `--dd-window` (25), `--correction-pct` (5), `--ignore DATE,DATE`, `--expiry-day tue|thu`, `--price-only`, `--no-proxy`, `--json`. Run after 15:30 IST on daily bars. ## Volume: the India data problem Yahoo's `^NSEI` and `^NSEBANK` usually carry zero or patchy volume. The script checks this (≥80% of recent sessions must have non-constant volume) and then: 1. `--volume-csv` / `--volume-symbol`: volume from another series matched by date. Use NIFTYBEES or BANKBEES (ETF), or continuous NIFTY futures exported from your broker or TradingView. Futures volume jumps in the monthly rollover week (las