Options Strategy Advisor — Indian F&O Markets (NSE)
Overview
This skill provides comprehensive options strategy analysis tailored to the Indian
Futures & Options market on the National Stock Exchange (NSE). It covers strategy
selection, live data retrieval, margin estimation, profit/loss simulation, Greeks
analysis, and risk management — all adapted for the specific characteristics of
Indian F&O trading.
Indian F&O Market Characteristics
Exercise Style
- European-style exercise only. Options on NSE can only be exercised at expiry,
not before. This simplifies pricing (Black-Scholes applies directly without
early-exercise adjustments) and means time value is always fully captured by
the seller until expiry.
Expiry Schedule
| Underlying |
Expiry Day |
Expiry Type |
| NIFTY |
Thursday |
Weekly + Monthly |
| BANK NIFTY |
Wednesday |
Weekly + Monthly |
| FINNIFTY |
Tuesday |
Weekly + Monthly |
| SENSEX (BSE) |
Friday |
Weekly + Monthly |
| Stock Options |
Last Thursday |
Monthly only |
- Monthly expiry is the last Thursday of the month (or preceding trading day if
Thursday is a holiday).
- Weekly expiries are available only for index options, not individual stocks.
Lot Sizes
Lot sizes are periodically revised by the exchanges. Always verify current lot
sizes using the Groww MCP tool fno_mcx_contracts_search_tool before calculating
margin or position size. Recent reference values:
- NIFTY: 75 (recently changed — confirm via MCP)
- BANK NIFTY: 15 (recently changed — confirm via MCP)
- FINNIFTY: 25
- Stock options: Varies by stock (check contract specifications)
Margin Requirements
SEBI mandates the following margin components for F&O:
- SPAN Margin — Risk-based margin calculated by the exchange clearing corporation.
- Exposure Margin — Additional margin over SPAN for market-wide risk.
- Peak Margin — Intraday margin snapshots; brokers must collect at least the
peak margin observed during the day.
Use calculate_fno_margin to get exact margin for any trade before placing it.
Transaction Costs
- STT (Securities Transaction Tax): Levied on the sell side of options at
0.0625% of the intrinsic value on exercise (for ITM options at expiry). For
futures, STT is 0.0125% on sell side.
- Brokerage: Varies by broker (Groww charges per-order flat fees).
- Exchange charges, GST, SEBI turnover fee, stamp duty also apply.
F&O Ban Mechanism
When the market-wide position limit (MWPL) for a stock's F&O contracts exceeds
95%, SEBI places the stock under an F&O ban. During the ban:
- No new positions can be initiated.
- Only squaring off (closing) of existing positions is allowed.
- The ban is lifted when MWPL drops below 80%.
Broker MCP Tool Integration
This skill uses broker MCP tools for live market data and execution support. Use whichever broker is connected (Groww or Zerodha Kite). Always prefer live data over assumptions.
Groww MCP Tools (if connected)
| Tool |
Purpose |
get_ltp (segment=FNO, query_type=fno) |
Live option/futures prices and OI |
get_quotes_and_depth (segment=FNO) |
Bid/ask spreads and market depth |
fno_mcx_contracts_search_tool |
Search F&O contracts, lot sizes, expiries |
fetch_historical_candle_data (segment=FNO) |
Historical option price data |
fetch_curated_fno |
F&O gainers, losers, most traded |
get_open_interest_analysis |
OI structure, PCR, support/resistance |
get_greeks_for_fno_contract |
Live Greeks for specific contracts |
get_greeks_for_fno_symbol |
Greeks for all contracts of an underlying |
get_atm_straddle_chart |
ATM straddle premium analysis |
get_payoff_chart_steps |
Payoff diagram generation instructions |
calculate_fno_margin |
Margin requirement calculation |
get_available_margin_details |
User's available margin |
resolve_market_time_and_calendar |
Market hours and trading calendar |
Zerodha Kite MCP Tools (if connected)
| Tool |
Purpose |
get_ltp |
Last traded price for F&O instruments |
get_quotes |
Real-time quotes with bid/ask depth |
get_ohlc |
OHLC data for options/futures contracts |
get_historical_data |
Historical candle data for F&O |
search_instruments |
Search for F&O contracts by name/expiry |
get_margins |
Account margins and available funds |
get_positions |
Current F&O positions |
get_orders / get_order_history |
Order status and execution details |
place_order / modify_order / cancel_order |
Order management |
place_gtt_order / get_gtts |
GTT order management |
Tool Equivalence Map
| Action |
Groww MCP |
Zerodha Kite MCP |
| Live price |
get_ltp |
get_ltp |
| Market depth |
get_quotes_and_depth |
get_quotes |
| Historical data |
fetch_historical_candle_data |
get_historical_data |
| Search contracts |
fno_mcx_contracts_search_tool |
search_instruments |
| Margin check |
calculate_fno_margin / get_available_margin_details |
get_margins |
| Positions |
get_my_trading_positions_today |
get_positions |
| Place orders |
place_fno_order |
place_order |
Supported Strategies
Income Strategies
Covered Call — Long underlying futures + Short OTM Call
- Objective: Generate income on existing long position.
- Best when: Mildly bullish, want to earn premium.
- Indian note: Use futures as underlying (no direct stock delivery for covered calls in F&O segment).
Cash-Secured Put — Short OTM Put (with margin set aside)
- Objective: Earn premium while waiting to buy at a lower price.
- Best when: Bullish on underlying, willing to take delivery equivalent.
- Indian note: Physical settlement applies for stock options (ITM at expiry).
Protection Strategies
Protective Put — Long underlying + Long Put
- Objective: Insure existing long position against downside.
- Best when: Want to cap losses while maintaining upside.
Collar — Long underlying + Long Put + Short Call
- Objective: Cap both upside and downside. Zero-cost collar if premiums offset.
- Best when: Want protection without paying net premium.
Directional Strategies
Bull Call Spread — Long lower-strike Call + Short higher-strike Call
- Objective: Limited-risk bullish bet.
- Best when: Moderately bullish, want defined risk.
Bear Put Spread — Long higher-strike Put + Short lower-strike Put
- Objective: Limited-risk bearish bet.
- Best when: Moderately bearish, want defined risk.
Bull Put Spread — Short higher-strike Put + Long lower-strike Put
- Objective: Credit spread, profit if price stays above short strike.
- Best when: Mildly bullish, want to collect premium.
Bear Call Spread — Short lower-strike Call + Long higher-strike Call
- Objective: Credit spread, profit if price stays below short strike.
- Best when: Mildly bearish, want to collect premium.
Volatility Strategies
Long Straddle — Long ATM Call + Long ATM Put
- Objective: Profit from large move in either direction.
- Best when: Expecting high volatility (e.g., pre-budget, RBI policy, earnings).
- Indian note: Popular before Union Budget day, election results, RBI MPC.
Short Straddle — Short ATM Call + Short ATM Put
- Objective: Profit from time decay when expecting range-bound movement.
- Best when: Low implied volatility expected, range-bound market.
- Indian note: Very popular on weekly expiry day for Nifty/Bank Nifty.
Long Strangle — Long OTM Call + Long OTM Put
- Objective: Cheaper alternative to straddle for volatility plays.
- Best when: Expecting very large move, want lower cost than straddle.
Short Strangle — Short OTM Call + Short OTM Put
- Objective: Wider profit zone than short straddle, less premium received.
- Best when: Expecting range-bound, comfortable with wider risk.
Range-Bound Strategies
Iron Condor — Bull Put Spread + Bear Call Spread
- Objective: Defined-risk range-bound strategy.
- Best when: Expecting low volatility, want defined max loss.
- Indian note: Very popular for weekly Nifty expiry plays.
Iron Butterfly — Short ATM Call + Short ATM Put + Long OTM Call + Long OTM Put
- Objective: Defined-risk version of short straddle.
- Best when: Expecting pin at a specific strike (max pain).
Advanced Strategies
Calendar Spread (Time Spread) — Short near-expiry option + Long far-expiry option (same strike)
- Objective: Profit from differential time decay.
- Best when: Expecting current expiry to decay faster, longer-term view intact.
- Indian note: Useful between weekly and monthly expiry cycles.
Diagonal Spread — Calendar spread with different strikes.
- Objective: Directional bias + time decay benefit.
- Best when: Have a directional view and want to finance via near-expiry sale.
Ratio Spread — Buy N options at one strike, sell M options at another (N != M).
- Objective: Reduce cost of directional trade; accept risk on extreme moves.
- Best when: Strong view on direction but want reduced cost.
- Caution: Naked leg creates unlimited risk on one side.
Workflow
Follow this sequence when advising on an options strategy:
Step 1: Gather Input
Collect the following from the user:
- Underlying: Which index or stock? (NIFTY, BANKNIFTY, FINNIFTY, or a specific stock)
- Market View: Bullish, bearish, neutral, volatile, or range-bound?
- Strategy Preference: Specific strategy or let the advisor recommend?
- Expiry: Weekly or monthly? Specific date?
- Risk Tolerance: Maximum loss acceptable? Capital available?
- Objective: Income generation, hedging, speculation, or volatility play?
Step 2: Fetch Live Data via Groww MCP
Resolve market time and calendar:
resolve_market_time_and_calendar() → confirm market is open, get trading days to expiry
Search for contracts:
fno_mcx_contracts_search_tool(search_term="NIFTY 25 MAR") → get exact trading symbols
Get live prices:
get_ltp(search_queries=["nifty 24000 CE mar", "nifty 24000 PE mar"], segment="FNO", query_type="fno")
Get Greeks:
get_greeks_for_fno_contract(search_queries=["nifty 24000 mar CE"], expiry="2026-03-26")
Analyze Open Interest:
get_open_interest_analysis(symbol="NIFTY", view="all")
Check ATM straddle premium (for volatility assessment):
get_atm_straddle_chart(symbol="NIFTY")
Step 3: Calculate Margin Requirement
For each leg of the strategy that involves selling (writing) options:
calculate_fno_margin(
trading_symbol="NIFTY25MAR24000CE",
num_lots=1,
transaction_type="SELL",
product="NRML"
)
Also check user's available margin:
get_available_margin_details()
Step 4: Simulate P/L Across Price Range
Use the scripts/black_scholes.py script or manual calculation:
- Define a price range (e.g., underlying +/- 5% from current price).
- For each price point, calculate P/L for each leg.
- Sum up P/L across all legs.
- Identify breakeven points, max profit, max loss.
Key calculations:
- Breakeven = Strike +/- Net Premium (for single-leg strategies)
- Max Profit = Net Premium Received (for credit strategies) or Strike Width - Net Debit (for debit spreads)
- Max Loss = Net Premium Paid (for debit strategies) or Strike Width - Net Credit (for credit spreads)
Step 5: Generate ASCII P/L Diagram
Create a visual payoff diagram showing:
- X-axis: Underlying price at expiry
- Y-axis: Profit/Loss per lot
- Breakeven point(s) marked
- Max profit and max loss zones labeled
Also use get_payoff_chart_steps() for Groww's built-in payoff chart generation.
Step 6: Provide Risk Management Guidance
Include in every recommendation:
- Position sizing: How many lots based on capital and risk tolerance.
- Stop-loss levels: When to exit (e.g., if loss exceeds 2x premium received).
- Adjustment triggers: When and how to adjust the strategy.
- Expiry management: Roll, close, or let expire — guidance based on ITM/OTM status.
- STT warning: Remind about STT on ITM options at expiry (can erode profits significantly).
- Margin monitoring: Warn about peak margin requirements and potential margin calls.
Step 7: Save Report
Present the complete analysis as a structured report:
=== OPTIONS STRATEGY REPORT ===
Date: [current date]
Underlying: [symbol] @ [current price]
Strategy: [strategy name]
Expiry: [expiry date] ([days to expiry] days)
--- LEGS ---
Leg 1: [BUY/SELL] [qty] [CALL/PUT] @ Strike [strike] for [premium]
Leg 2: [BUY/SELL] [qty] [CALL/PUT] @ Strike [strike] for [premium]
--- KEY METRICS ---
Net Premium: [debit/credit] [amount] per lot
Max Profit: [amount] per lot (at [price])
Max Loss: [amount] per lot (at [price])
Breakeven: [price(s)]
Risk-Reward Ratio: [ratio]
Probability of Profit: [estimate based on delta]
--- GREEKS (NET POSITION) ---
Delta: [value] | Gamma: [value] | Theta: [value] | Vega: [value]
--- MARGIN REQUIREMENT ---
Total Margin: [amount]
Available Margin: [amount]
Margin Utilization: [percentage]
--- P/L DIAGRAM ---
[ASCII payoff chart]
--- RISK MANAGEMENT ---
- Stop Loss: [criteria]
- Adjustment Plan: [when and how]
- Expiry Action: [recommendation]
- STT Impact: [if applicable]
Strategy Selection Guide
Use this decision tree to recommend strategies based on user's market view:
Bullish View
- Strong bullish: Long Call or Bull Call Spread
- Mildly bullish: Bull Put Spread (credit) or Covered Call
- Bullish + high IV: Bull Put Spread (sell expensive puts)
- Bullish + low IV: Long Call or Bull Call Spread (buy cheap options)
Bearish View
- Strong bearish: Long Put or Bear Put Spread
- Mildly bearish: Bear Call Spread (credit)
- Bearish + high IV: Bear Call Spread (sell expensive calls)
- Bearish + low IV: Long Put or Bear Put Spread
Neutral / Range-Bound View
- Tight range expected: Short Straddle or Iron Butterfly
- Wider range expected: Short Strangle or Iron Condor
- Neutral + want defined risk: Iron Condor or Iron Butterfly
Volatile View (Expecting Big Move)
- Direction unknown, big move expected: Long Straddle
- Direction unknown, very big move expected: Long Strangle (cheaper)
- Pre-event (budget, RBI, earnings): Long Straddle or Long Strangle
Time Decay Play
- Near-term decay focus: Calendar Spread
- Directional + decay: Diagonal Spread
Important Indian Market Considerations
India VIX
- India VIX measures the market's expectation of 30-day volatility.
- VIX > 20: High volatility environment — favor long volatility strategies.
- VIX < 15: Low volatility environment — favor short volatility strategies.
- VIX between 15-20: Normal range — use directional or range-bound strategies.
- VIX typically spikes before elections, budgets, RBI policy, and global crises.
Weekly Expiry Trading
- Thursday (Nifty): Most liquid expiry. Short straddle/strangle sellers dominate.
Theta decay is highest on the expiry day.
- Wednesday (Bank Nifty): High gamma risk. Moves can be sharp near expiry.
- Premium sellers should be cautious of gamma risk on expiry day — a small move
in the underlying can cause large P/L swings.
Physical Settlement (Stock Options)
- Stock options that expire ITM are physically settled — actual delivery of shares.
- This requires full delivery margin (value of shares). Plan exits before expiry
to avoid unexpected margin requirements.
- Index options are cash-settled — no delivery concerns.
Max Pain
- Max Pain is the strike price at which the maximum number of options (calls + puts)
expire worthless, causing minimum payout by option writers.
- Indian markets tend to gravitate toward max pain on expiry day, especially for
Nifty weekly expiry.
- Use OI analysis to identify max pain and position accordingly.
OI-Based Analysis
- High Call OI at a strike: Acts as resistance. Call writers are betting the
price won't cross this level.
- High Put OI at a strike: Acts as support. Put writers are betting the price
won't fall below this level.
- PCR (Put-Call Ratio):
- PCR > 1.2: Bullish signal (more puts written, indicating support)
- PCR < 0.8: Bearish signal (more calls written, indicating resistance)
- PCR between 0.8-1.2: Neutral
Error Handling
- If broker MCP tools (Groww or Zerodha) return errors, inform the user and suggest checking market
hours or contract availability. Try the alternative broker's equivalent tool if available.
- If a contract search yields no results, try alternative search terms or check
if the expiry has passed.
- If margin data is unavailable, provide theoretical estimates with a disclaimer.
- Always validate that the market is open before fetching live data — use
resolve_market_time_and_calendar().
- If a stock is under F&O ban, alert the user immediately and suggest alternative
underlyings.
1---2name: options-strategy-advisor3description: Options strategy analysis for Indian F&O markets (NSE). Use when user requests options strategy recommendations, P/L analysis, Greeks calculation, risk management, or F&O strategy planning for Nifty, Bank Nifty, or stock options.4---5
6# Options Strategy Advisor — Indian F&O Markets (NSE)
7
8## Overview
9
10This skill provides comprehensive options strategy analysis tailored to the Indian
11Futures & Options market on the National Stock Exchange (NSE). It covers strategy
12selection, live data retrieval, margin estimation, profit/loss simulation, Greeks
13analysis, and risk management — all adapted for the specific characteristics of
14Indian F&O trading.
15
16---
17
18## Indian F&O Market Characteristics
19
20### Exercise Style
21- **European-style exercise only.** Options on NSE can only be exercised at expiry,
22 not before. This simplifies pricing (Black-Scholes applies directly without
23 early-exercise adjustments) and means time value is always fully captured by
24 the seller until expiry.
25
26### Expiry Schedule
27| Underlying | Expiry Day | Expiry Type |
28|--------------|-------------|----------------------|
29| NIFTY | Thursday | Weekly + Monthly |
30| BANK NIFTY | Wednesday | Weekly + Monthly |
31| FINNIFTY | Tuesday | Weekly + Monthly |
32| SENSEX (BSE) | Friday | Weekly + Monthly |
33| Stock Options | Last Thursday | Monthly only |
34
35- Monthly expiry is the last Thursday of the month (or preceding trading day if
36 Thursday is a holiday).
37- Weekly expiries are available only for index options, not individual stocks.
38
39### Lot Sizes
40Lot sizes are periodically revised by the exchanges. Always verify current lot
41sizes using the Groww MCP tool `fno_mcx_contracts_search_tool` before calculating
42margin or position size. Recent reference values:
43- NIFTY: 75 (recently changed — confirm via MCP)
44- BANK NIFTY: 15 (recently changed — confirm via MCP)
45- FINNIFTY: 25
46- Stock options: Varies by stock (check contract specifications)
47
48### Margin Requirements
49SEBI mandates the following margin components for F&O:
501. **SPAN Margin** — Risk-based margin calculated by the exchange clearing corporation.
512. **Exposure Margin** — Additional margin over SPAN for market-wide risk.
523. **Peak Margin** — Intraday margin snapshots; brokers must collect at least the
53 peak margin observed during the day.
54
55Use `calculate_fno_margin` to get exact margin for any trade before placing it.
56
57### Transaction Costs
58- **STT (Securities Transaction Tax):** Levied on the sell side of options at
59 0.0625% of the intrinsic value on exercise (for ITM options at expiry). For
60 futures, STT is 0.0125% on sell side.
61- **Brokerage:** Varies by broker (Groww charges per-order flat fees).
62- **Exchange charges, GST, SEBI turnover fee, stamp duty** also apply.
63
64### F&O Ban Mechanism
65When the market-wide position limit (MWPL) for a stock's F&O contracts exceeds
6695%, SEBI places the stock under an F&O ban. During the ban:
67- No new positions can be initiated.
68- Only squaring off (closing) of existing positions is allowed.
69- The ban is lifted when MWPL drops below 80%.
70
71---
72
73## Broker MCP Tool Integration
74
75This skill uses broker MCP tools for live market data and execution support. Use whichever broker is connected (Groww or Zerodha Kite). Always prefer live data over assumptions.
76
77### Groww MCP Tools (if connected)
78
79| Tool | Purpose |
80|------|---------|
81| `get_ltp` (segment=FNO, query_type=fno) | Live option/futures prices and OI |
82| `get_quotes_and_depth` (segment=FNO) | Bid/ask spreads and market depth |
83| `fno_mcx_contracts_search_tool` | Search F&O contracts, lot sizes, expiries |
84| `fetch_historical_candle_data` (segment=FNO) | Historical option price data |
85| `fetch_curated_fno` | F&O gainers, losers, most traded |
86| `get_open_interest_analysis` | OI structure, PCR, support/resistance |
87| `get_greeks_for_fno_contract` | Live Greeks for specific contracts |
88| `get_greeks_for_fno_symbol` | Greeks for all contracts of an underlying |
89| `get_atm_straddle_chart` | ATM straddle premium analysis |
90| `get_payoff_chart_steps` | Payoff diagram generation instructions |
91| `calculate_fno_margin` | Margin requirement calculation |
92| `get_available_margin_details` | User's available margin |
93| `resolve_market_time_and_calendar` | Market hours and trading calendar |
94
95### Zerodha Kite MCP Tools (if connected)
96
97| Tool | Purpose |
98|------|---------|
99| `get_ltp` | Last traded price for F&O instruments |
100| `get_quotes` | Real-time quotes with bid/ask depth |
101| `get_ohlc` | OHLC data for options/futures contracts |
102| `get_historical_data` | Historical candle data for F&O |
103| `search_instruments` | Search for F&O contracts by name/expiry |
104| `get_margins` | Account margins and available funds |
105| `get_positions` | Current F&O positions |
106| `get_orders` / `get_order_history` | Order status and execution details |
107| `place_order` / `modify_order` / `cancel_order` | Order management |
108| `place_gtt_order` / `get_gtts` | GTT order management |
109
110### Tool Equivalence Map
111
112| Action | Groww MCP | Zerodha Kite MCP |
113|--------|-----------|------------------|
114| Live price | `get_ltp` | `get_ltp` |
115| Market depth | `get_quotes_and_depth` | `get_quotes` |
116| Historical data | `fetch_historical_candle_data` | `get_historical_data` |
117| Search contracts | `fno_mcx_contracts_search_tool` | `search_instruments` |
118| Margin check | `calculate_fno_margin` / `get_available_margin_details` | `get_margins` |
119| Positions | `get_my_trading_positions_today` | `get_positions` |
120| Place orders | `place_fno_order` | `place_order` |
121
122---
123
124## Supported Strategies
125
126### Income Strategies
1271. **Covered Call** — Long underlying futures + Short OTM Call
128 - Objective: Generate income on existing long position.
129 - Best when: Mildly bullish, want to earn premium.
130 - Indian note: Use futures as underlying (no direct stock delivery for covered calls in F&O segment).
131
1322. **Cash-Secured Put** — Short OTM Put (with margin set aside)
133 - Objective: Earn premium while waiting to buy at a lower price.
134 - Best when: Bullish on underlying, willing to take delivery equivalent.
135 - Indian note: Physical settlement applies for stock options (ITM at expiry).
136
137### Protection Strategies
1383. **Protective Put** — Long underlying + Long Put
139 - Objective: Insure existing long position against downside.
140 - Best when: Want to cap losses while maintaining upside.
141
1424. **Collar** — Long underlying + Long Put + Short Call
143 - Objective: Cap both upside and downside. Zero-cost collar if premiums offset.
144 - Best when: Want protection without paying net premium.
145
146### Directional Strategies
1475. **Bull Call Spread** — Long lower-strike Call + Short higher-strike Call
148 - Objective: Limited-risk bullish bet.
149 - Best when: Moderately bullish, want defined risk.
150
1516. **Bear Put Spread** — Long higher-strike Put + Short lower-strike Put
152 - Objective: Limited-risk bearish bet.
153 - Best when: Moderately bearish, want defined risk.
154
1557. **Bull Put Spread** — Short higher-strike Put + Long lower-strike Put
156 - Objective: Credit spread, profit if price stays above short strike.
157 - Best when: Mildly bullish, want to collect premium.
158
1598. **Bear Call Spread** — Short lower-strike Call + Long higher-strike Call
160 - Objective: Credit spread, profit if price stays below short strike.
161 - Best when: Mildly bearish, want to collect premium.
162
163### Volatility Strategies
1649. **Long Straddle** — Long ATM Call + Long ATM Put
165 - Objective: Profit from large move in either direction.
166 - Best when: Expecting high volatility (e.g., pre-budget, RBI policy, earnings).
167 - Indian note: Popular before Union Budget day, election results, RBI MPC.
168
16910. **Short Straddle** — Short ATM Call + Short ATM Put
170 - Objective: Profit from time decay when expecting range-bound movement.
171 - Best when: Low implied volatility expected, range-bound market.
172 - Indian note: Very popular on weekly expiry day for Nifty/Bank Nifty.
173
17411. **Long Strangle** — Long OTM Call + Long OTM Put
175 - Objective: Cheaper alternative to straddle for volatility plays.
176 - Best when: Expecting very large move, want lower cost than straddle.
177
17812. **Short Strangle** — Short OTM Call + Short OTM Put
179 - Objective: Wider profit zone than short straddle, less premium received.
180 - Best when: Expecting range-bound, comfortable with wider risk.
181
182### Range-Bound Strategies
18313. **Iron Condor** — Bull Put Spread + Bear Call Spread
184 - Objective: Defined-risk range-bound strategy.
185 - Best when: Expecting low volatility, want defined max loss.
186 - Indian note: Very popular for weekly Nifty expiry plays.
187
18814. **Iron Butterfly** — Short ATM Call + Short ATM Put + Long OTM Call + Long OTM Put
189 - Objective: Defined-risk version of short straddle.
190 - Best when: Expecting pin at a specific strike (max pain).
191
192### Advanced Strategies
19315. **Calendar Spread (Time Spread)** — Short near-expiry option + Long far-expiry option (same strike)
194 - Objective: Profit from differential time decay.
195 - Best when: Expecting current expiry to decay faster, longer-term view intact.
196 - Indian note: Useful between weekly and monthly expiry cycles.
197
19816. **Diagonal Spread** — Calendar spread with different strikes.
199 - Objective: Directional bias + time decay benefit.
200 - Best when: Have a directional view and want to finance via near-expiry sale.
201
20217. **Ratio Spread** — Buy N options at one strike, sell M options at another (N != M).
203 - Objective: Reduce cost of directional trade; accept risk on extreme moves.
204 - Best when: Strong view on direction but want reduced cost.
205 - Caution: Naked leg creates unlimited risk on one side.
206
207---
208
209## Workflow
210
211Follow this sequence when advising on an options strategy:
212
213### Step 1: Gather Input
214Collect the following from the user:
215- **Underlying:** Which index or stock? (NIFTY, BANKNIFTY, FINNIFTY, or a specific stock)
216- **Market View:** Bullish, bearish, neutral, volatile, or range-bound?
217- **Strategy Preference:** Specific strategy or let the advisor recommend?
218- **Expiry:** Weekly or monthly? Specific date?
219- **Risk Tolerance:** Maximum loss acceptable? Capital available?
220- **Objective:** Income generation, hedging, speculation, or volatility play?
221
222### Step 2: Fetch Live Data via Groww MCP
223
2241. **Resolve market time and calendar:**
225 ```
226 resolve_market_time_and_calendar() → confirm market is open, get trading days to expiry
227 ```
228
2292. **Search for contracts:**
230 ```
231 fno_mcx_contracts_search_tool(search_term="NIFTY 25 MAR") → get exact trading symbols
232 ```
233
2343. **Get live prices:**
235 ```
236 get_ltp(search_queries=["nifty 24000 CE mar", "nifty 24000 PE mar"], segment="FNO", query_type="fno")
237 ```
238
2394. **Get Greeks:**
240 ```
241 get_greeks_for_fno_contract(search_queries=["nifty 24000 mar CE"], expiry="2026-03-26")
242 ```
243
2445. **Analyze Open Interest:**
245 ```
246 get_open_interest_analysis(symbol="NIFTY", view="all")
247 ```
248
2496. **Check ATM straddle premium (for volatility assessment):**
250 ```
251 get_atm_straddle_chart(symbol="NIFTY")
252 ```
253
254### Step 3: Calculate Margin Requirement
255
256For each leg of the strategy that involves selling (writing) options:
257```
258calculate_fno_margin(
259 trading_symbol="NIFTY25MAR24000CE",
260 num_lots=1,
261 transaction_type="SELL",
262 product="NRML"
263)
264```
265
266Also check user's available margin:
267```
268get_available_margin_details()
269```
270
271### Step 4: Simulate P/L Across Price Range
272
273Use the `scripts/black_scholes.py` script or manual calculation:
274- Define a price range (e.g., underlying +/- 5% from current price).
275- For each price point, calculate P/L for each leg.
276- Sum up P/L across all legs.
277- Identify breakeven points, max profit, max loss.
278
279Key calculations:
280- **Breakeven** = Strike +/- Net Premium (for single-leg strategies)
281- **Max Profit** = Net Premium Received (for credit strategies) or Strike Width - Net Debit (for debit spreads)
282- **Max Loss** = Net Premium Paid (for debit strategies) or Strike Width - Net Credit (for credit spreads)
283
284### Step 5: Generate ASCII P/L Diagram
285
286Create a visual payoff diagram showing:
287- X-axis: Underlying price at expiry
288- Y-axis: Profit/Loss per lot
289- Breakeven point(s) marked
290- Max profit and max loss zones labeled
291
292Also use `get_payoff_chart_steps()` for Groww's built-in payoff chart generation.
293
294### Step 6: Provide Risk Management Guidance
295
296Include in every recommendation:
297- **Position sizing:** How many lots based on capital and risk tolerance.
298- **Stop-loss levels:** When to exit (e.g., if loss exceeds 2x premium received).
299- **Adjustment triggers:** When and how to adjust the strategy.
300- **Expiry management:** Roll, close, or let expire — guidance based on ITM/OTM status.
301- **STT warning:** Remind about STT on ITM options at expiry (can erode profits significantly).
302- **Margin monitoring:** Warn about peak margin requirements and potential margin calls.
303
304### Step 7: Save Report
305
306Present the complete analysis as a structured report:
307
308```
309=== OPTIONS STRATEGY REPORT ===
310Date: [current date]
311Underlying: [symbol] @ [current price]
312Strategy: [strategy name]
313Expiry: [expiry date] ([days to expiry] days)
314
315--- LEGS ---
316Leg 1: [BUY/SELL] [qty] [CALL/PUT] @ Strike [strike] for [premium]
317Leg 2: [BUY/SELL] [qty] [CALL/PUT] @ Strike [strike] for [premium]
318
319--- KEY METRICS ---
320Net Premium: [debit/credit] [amount] per lot
321Max Profit: [amount] per lot (at [price])
322Max Loss: [amount] per lot (at [price])
323Breakeven: [price(s)]
324Risk-Reward Ratio: [ratio]
325Probability of Profit: [estimate based on delta]
326
327--- GREEKS (NET POSITION) ---
328Delta: [value] | Gamma: [value] | Theta: [value] | Vega: [value]
329
330--- MARGIN REQUIREMENT ---
331Total Margin: [amount]
332Available Margin: [amount]
333Margin Utilization: [percentage]
334
335--- P/L DIAGRAM ---
336[ASCII payoff chart]
337
338--- RISK MANAGEMENT ---
339- Stop Loss: [criteria]
340- Adjustment Plan: [when and how]
341- Expiry Action: [recommendation]
342- STT Impact: [if applicable]
343```
344
345---
346
347## Strategy Selection Guide
348
349Use this decision tree to recommend strategies based on user's market view:
350
351### Bullish View
352- **Strong bullish:** Long Call or Bull Call Spread
353- **Mildly bullish:** Bull Put Spread (credit) or Covered Call
354- **Bullish + high IV:** Bull Put Spread (sell expensive puts)
355- **Bullish + low IV:** Long Call or Bull Call Spread (buy cheap options)
356
357### Bearish View
358- **Strong bearish:** Long Put or Bear Put Spread
359- **Mildly bearish:** Bear Call Spread (credit)
360- **Bearish + high IV:** Bear Call Spread (sell expensive calls)
361- **Bearish + low IV:** Long Put or Bear Put Spread
362
363### Neutral / Range-Bound View
364- **Tight range expected:** Short Straddle or Iron Butterfly
365- **Wider range expected:** Short Strangle or Iron Condor
366- **Neutral + want defined risk:** Iron Condor or Iron Butterfly
367
368### Volatile View (Expecting Big Move)
369- **Direction unknown, big move expected:** Long Straddle
370- **Direction unknown, very big move expected:** Long Strangle (cheaper)
371- **Pre-event (budget, RBI, earnings):** Long Straddle or Long Strangle
372
373### Time Decay Play
374- **Near-term decay focus:** Calendar Spread
375- **Directional + decay:** Diagonal Spread
376
377---
378
379## Important Indian Market Considerations
380
381### India VIX
382- India VIX measures the market's expectation of 30-day volatility.
383- VIX > 20: High volatility environment — favor long volatility strategies.
384- VIX < 15: Low volatility environment — favor short volatility strategies.
385- VIX between 15-20: Normal range — use directional or range-bound strategies.
386- VIX typically spikes before elections, budgets, RBI policy, and global crises.
387
388### Weekly Expiry Trading
389- **Thursday (Nifty):** Most liquid expiry. Short straddle/strangle sellers dominate.
390 Theta decay is highest on the expiry day.
391- **Wednesday (Bank Nifty):** High gamma risk. Moves can be sharp near expiry.
392- Premium sellers should be cautious of gamma risk on expiry day — a small move
393 in the underlying can cause large P/L swings.
394
395### Physical Settlement (Stock Options)
396- Stock options that expire ITM are physically settled — actual delivery of shares.
397- This requires full delivery margin (value of shares). Plan exits before expiry
398 to avoid unexpected margin requirements.
399- Index options are cash-settled — no delivery concerns.
400
401### Max Pain
402- Max Pain is the strike price at which the maximum number of options (calls + puts)
403 expire worthless, causing minimum payout by option writers.
404- Indian markets tend to gravitate toward max pain on expiry day, especially for
405 Nifty weekly expiry.
406- Use OI analysis to identify max pain and position accordingly.
407
408### OI-Based Analysis
409- **High Call OI at a strike:** Acts as resistance. Call writers are betting the
410 price won't cross this level.
411- **High Put OI at a strike:** Acts as support. Put writers are betting the price
412 won't fall below this level.
413- **PCR (Put-Call Ratio):**
414 - PCR > 1.2: Bullish signal (more puts written, indicating support)
415 - PCR < 0.8: Bearish signal (more calls written, indicating resistance)
416 - PCR between 0.8-1.2: Neutral
417
418---
419
420## Error Handling
421
422- If broker MCP tools (Groww or Zerodha) return errors, inform the user and suggest checking market
423 hours or contract availability. Try the alternative broker's equivalent tool if available.
424- If a contract search yields no results, try alternative search terms or check
425 if the expiry has passed.
426- If margin data is unavailable, provide theoretical estimates with a disclaimer.
427- Always validate that the market is open before fetching live data — use
428 `resolve_market_time_and_calendar()`.
429- If a stock is under F&O ban, alert the user immediately and suggest alternative
430 underlyings.