# Tessera sample strategy — a hedged short strangle on NIFTY weekly options. # # Sell an out-of-the-money call and put (~2% either side of spot), buy a wing two strikes # further out on each side so risk is defined, and exit on profit, loss, or expiry. # # This is the WHOLE strategy. There is no engine code. It is validated as one document # before anything runs; every value carries a unit; `Strike(short_call)` is an inter-leg # reference (the wing is defined relative to the leg it hedges, not to the market); and # the same document that is backtested drives live orders through a separate runtime. # # Planning-stage illustration. Parameters are placeholders, NOT validated values, and # nothing here is investment advice. resource: strategy version: 2 name: nifty-weekly-strangle venue: NSE instrument: NIFTY entry: candidates: { every: trading_day, at: "09:20" } # no `trigger:` — every candidate day enters. A trigger (a Predicate over observables) # would make entry conditional, e.g. only on a volatility or pattern signal (v0.1). legs: - ref: short_call # sell the call ~2% above spot instrument: { Option: { underlying: NIFTY, expiry: W, right: CE } } side: SELL qty: 1 select: { over: strike_ladder, on: Strike, pick: Nearest, target: Pct(Spot, 2) } - ref: call_wing # buy 2 strikes further out — caps the call-side risk instrument: { Option: { underlying: NIFTY, expiry: W, right: CE } } side: BUY qty: 1 select: { over: strike_ladder, on: Strike, pick: AtStep(2), target: Strike(short_call) } - ref: short_put # sell the put ~2% below spot instrument: { Option: { underlying: NIFTY, expiry: W, right: PE } } side: SELL qty: 1 select: { over: strike_ladder, on: Strike, pick: Nearest, target: Pct(Spot, -2) } - ref: put_wing # buy 2 strikes further out — caps the put-side risk instrument: { Option: { underlying: NIFTY, expiry: W, right: PE } } side: BUY qty: 1 select: { over: strike_ladder, on: Strike, pick: AtStep(-2), target: Strike(short_put) } exit: # take profit at 50% of the credit received - { scope: basket, when: Compare(Obs(pnl), GTE, ScalePct(Obs(credit), 50)), then: SquareOffAll } # stop out at 100% of credit (i.e. lose what we collected) - { scope: basket, when: Compare(Obs(pnl), LTE, ScalePct(Obs(credit), -100)), then: SquareOffAll } # and close at expiry regardless - { scope: basket, when: Expiry, then: SquareOffAll } execution: product: intraday # intraday | carry_forward | delivery — no silent default order_type: limit # limit, priced off the touch with a configured offset limit_offset: Pct(Premium, 0.5) multi_leg_policy: hedge_first # place the protective wings before the short legs validity: day max_retries: 2