option-chain-analyzerlisted
Install: claude install-skill rahulcommercial/claude-code-for-indian-traders
# Option Chain Analyzer
Turns a raw NSE option chain JSON into actionable structure.
## When to use
- User pastes / fetches option chain data and asks for a read.
- User wants to identify max pain, PCR, or notable OI build-up.
- Pre-market or intraday: "where is BankNifty likely to pin?"
## Inputs
Either:
- A JSON dump from NSE's option chain endpoint (`https://www.nseindia.com/api/option-chain-indices?symbol=NIFTY`), or
- Strike-wise call/put OI + premium tabular data.
## Computations
### Max pain
Strike at which total OI value (writers' loss) is minimised. Often acts as a magnet near expiry.
```
max_pain_strike = argmin over K of: sum_i max(K - K_i, 0) * call_OI_i + max(K_i - K, 0) * put_OI_i
```
### PCR (Put-Call Ratio)
```
PCR_OI = total_put_OI / total_call_OI
```
- > 1.3 → oversold / bullish reversal zone (contrarian read)
- < 0.7 → overbought / bearish reversal zone
- 0.8–1.2 → neutral
### Support / Resistance from OI
- **Strongest resistance** = strike with highest call OI above spot.
- **Strongest support** = strike with highest put OI below spot.
### OI build-up classification
| Price | OI | Reading |
|---|---|---|
| ↑ | ↑ | Long build-up |
| ↑ | ↓ | Short covering |
| ↓ | ↑ | Short build-up |
| ↓ | ↓ | Long unwinding |
### IV skew
Compare ATM call IV vs ATM put IV. Put IV > call IV → fear premium. Useful for direction bias before events.
## Output format
Return a structured summary:
```
Spot: 24,150
Max pain: 24,200 (likely pin near expiry)
PCR (OI):