# Tactical Collar Report - Markdown Template

Format the JSON data into a markdown report saved to `sandbox/`.

**Filename:** `{YYYYMMDD}_{HHMMSS}_{SYMBOL}_Tactical_Collar_Report.md`

## JSON Fields

- `symbol` - Ticker symbol
- `current_price` - Current stock price
- `long_strike`, `long_expiry`, `long_qty`, `long_cost` - LEAPS position
- `long_value_now` - Current market value of long call per share
- `short_positions` - List of `{strike, expiry, qty}` for short calls
- `is_proper_pmcc` - Boolean: price near/above long strike
- `short_above_long` - Boolean: all shorts above long strike
- `earnings_date` - Next earnings date or null
- `days_to_earnings` - Days until earnings or null
- `put_analysis` - List of put scenarios (see below)
- `unprotected_loss_10` - LEAPS loss on 10% gap down (total $)
- `unprotected_loss_15` - LEAPS loss on 15% gap down (total $)
- `unprotected_gain_10` - LEAPS gain on 10% gap up (total $)
- `volatility` - Dict with `annual_vol`, `daily_vol`, expected moves

## Report Sections

### 1. Position Summary

| Field | Value |
|-------|-------|
| Symbol | `symbol` |
| Current Price | `$current_price` |
| LEAPS | `+{long_qty} ${long_strike} Call exp {long_expiry formatted}` |
| LEAPS Cost | `$long_cost` per share |
| LEAPS Value | `$long_value_now` per share |
| Short Calls | List each: `-{qty} ${strike} exp {expiry}` |
| Earnings | `earnings_date` (`days_to_earnings` days) or "None scheduled" |

### 2. PMCC Health Check

Based on `is_proper_pmcc` and `short_above_long`:

- **Proper PMCC**: Both true. "Structure is healthy."
- **Broken PMCC**: `is_proper_pmcc` false. "Price has moved below long strike - position is OTM. Margin implications."
- **Short below long**: `short_above_long` false. "Short calls below LEAPS strike require additional margin."

### 3. Unprotected Risk

Show what happens to the LEAPS without a collar:

| Scenario | LEAPS P&L |
|----------|-----------|
| Gap Up 10% | `+$unprotected_gain_10` |
| Gap Down 10% | `-$unprotected_loss_10` |
| Gap Down 15% | `-$unprotected_loss_15` |

### 4. Put Protection Analysis

Group `put_analysis` by expiry. For each expiry group:

**Header**: "{expiry formatted} ({days_out} days, {days_after_earnings} days after earnings)"

| Strike | OTM% | Cost/Contract | Total Cost | Gap Up 10% | Flat | Gap Down 10% | Gap Down 15% |
|--------|------|---------------|------------|------------|------|--------------|--------------|

For each put in the group:
- **Strike**: `$strike`
- **OTM%**: `otm_pct` (1 decimal)
- **Cost/Contract**: `$cost_per_contract`
- **Total Cost**: `$total_cost`
- **Scenario columns**: Show `put_pnl` from each scenario. Format as gains/loses.

### 5. Cost/Benefit Analysis

For each put option, calculate:
- **Insurance cost**: `total_cost`
- **Protection on 10% drop**: `scenarios.gap_down_10.put_pnl + unprotected_loss_10` (net protected loss)
- **Salvage on gap up**: `scenarios.gap_up_10.put_pnl` (what you recover selling the put)

### 6. Recommendation

Pick the best put based on:
- Cost vs protection ratio
- Days after earnings (prefer puts expiring shortly after)
- OTM% (prefer 5-10% OTM for balance of cost and protection)

Provide:
- Recommended put strike and expiry
- Order: `BUY TO OPEN {qty} {symbol} {expiry} ${strike} PUT @ ${cost_per_contract}`
- Timeline: When to buy (before earnings) and when to sell (after event)

## Formatting Rules

- Currency: `$X.XX` for per-share, `$X,XXX` for totals
- Percentages: 1 decimal
- Expiry dates: "Mon DD, YYYY" for YYYY-MM-DD, parse YYYYMMDD accordingly
- Bold key values in recommendations
- Include horizontal rules between sections
- Color-code P&L: positive = gains, negative = loses
- Footer: `*Report generated by Trading Skills on YYYY-MM-DD HH:MM*`
