From tradeblocks
Double calendar health check and optimization. Analyzes a DC strategy's performance, exit attribution, VIX regime fit, S/L ratio impact, edge decay, and predictive fields. Loads the strategy profile for context. Use when evaluating, diagnosing, or tuning a double calendar backtest, or when the user mentions "DC analysis", "calendar analysis", or "analyze my DC".
How this skill is triggered — by the user, by Claude, or both
Slash command
/tradeblocks:dc-analysisThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive health check for double calendar strategies. Each DC responds differently to filters and exits depending on its DTE spread, delta selection, and underlying. This skill surfaces those differences.
Comprehensive health check for double calendar strategies. Each DC responds differently to filters and exits depending on its DTE spread, delta selection, and underlying. This skill surfaces those differences.
list_blocks if needed.get_strategy_profile with the block and strategy name.
profile_strategy. Key fields needed:
Display the profile summary before continuing:
Structure: [underlying] [short DTE]/[long DTE] DC, [put delta]/[call delta] delta
Entry: [day], [time], [filters]
Exits: [list exit rules]
Sizing: [allocation]%
Run get_statistics for the block.
Present the core metrics:
| Metric | Value | Context |
|---|---|---|
| Win Rate | >60% typical for DCs | |
| Profit Factor | >2.0 strong | |
| Sharpe | >3.0 strong for DCs | |
| Max Drawdown | <15% good | |
| Avg Win / Avg Loss | Payoff ratio | |
| Trade Count | <100 = thin data warning |
Run get_performance_charts with charts: ["exit_reason_breakdown"].
This is critical for DCs. Build a table:
| Exit Type | Count | Avg P&L | Total P&L | Verdict |
|---|---|---|---|---|
| Time exit | Money maker or money loser? | |||
| S/L ratio | Primary stop or profit engine? | |||
| Delta exit (above) | How much damage? | |||
| Delta exit (below) | How much damage? | |||
| Profit target | Capturing enough? | |||
| Expired | Good or bad for this DC? |
Key insight from DC research: Exit types play DIFFERENT roles depending on the DC structure.
Run find_predictive_fields to check if openingShortLongRatio correlates with P&L.
Interpretation guide based on DTE/delta:
If correlation > 0.05, run filter_curve on openingSLRatio to find the optimal entry threshold.
Also check if closingShortLongRatio has strong negative correlation (it usually does) — this confirms S/L ratio as a structural health indicator for the trade.
If the strategy has a profile, run analyze_structure_fit with the block and strategy name. This provides a multi-dimensional breakdown of how well the strategy fits various market conditions, using the profile to contextualize results.
Tool returns:
profile_update_hints when data shows patterns diverging from profile settingsSurface any profile_update_hints — these are actionable suggestions where the data contradicts the profile's assumptions.
If no profile exists, fall back to analyze_regime_performance with segmentBy: "volRegime" instead.
Run analyze_regime_performance with segmentBy: "volRegime".
Build a regime table and flag the sweet spot vs danger zones:
| Regime | Trades | Win Rate | PF | Avg P&L | vs Overall |
|---|---|---|---|---|---|
| Very Low (<13) | |||||
| Low (13-16) | |||||
| Normal (16-20) | |||||
| Elevated (20-25) | |||||
| High (25-30) | |||||
| Extreme (>30) |
Interpretation guide:
expectedRegimes if set.Run analyze_edge_decay for the block.
Focus on:
Flag any of these:
From Step 4's find_predictive_fields results, surface the top 5 actionable fields beyond the output-derived ones (exclude netPl, plPct, rom, isWinner, maxProfit, maxLoss, etc.).
Actionable fields to look for:
openingShortLongRatio — entry qualityclosingShortLongRatio — exit healthdurationHours — holding period effectmovement — underlying movement sensitivitypremium — entry pricingopeningVix / closingVix — VIX sensitivityvixChangePct — VIX direction during tradegap — gap sensitivitynumContracts — position size effectFor any field with |correlation| > 0.1, note it as a potential filter candidate.
Before making any recommendations, test whether the current setup is robust or overfit. Run these checks in order — each one builds on the previous.
If the strategy has a profile with entry filters, run validate_entry_filters with the block and strategy name. This is the most direct test of whether filters help or hurt.
Tool returns:
profile_update_hints when filters appear counterproductiveWhat to look for:
Also run suggest_filters to see if there are market-based filters the data suggests but the profile doesn't use. This tool analyzes losing trades and suggests filters that would have improved performance. Pass strategyName to cross-reference suggestions against existing profile filters.
The strategy should be profitable WITHOUT entry filters. Use the validate_entry_filters ablation results to see what happens when all filters are removed.
Ask: "Is this strategy only profitable BECAUSE of the filters?" If removing all filters makes it a net loser, the filters are creating edge — that's curve fitting. Filters should IMPROVE an already-positive baseline, not rescue a broken structure.
For each numeric filter or exit threshold in the profile, run filter_curve to check if small changes destroy the result:
| What to test | How | Red flag |
|---|---|---|
| S/L ratio min (if used) | filter_curve on openingSLRatio | Good at 0.45 but bad at 0.40 and 0.50 |
| VIX filter (if used) | filter_curve on openingVix | Good at VIX<18 but bad at VIX<17 and VIX<19 |
| Delta exit threshold | Compare batch_exit_analysis at profile delta vs +/-5 | Good at 70 but bad at 65 and 75 |
| Profit target % | Compare batch_exit_analysis at profile PT vs +/-10% | Good at 50% but bad at 40% and 60% |
Interpretation:
Present the filter_curve results as a table showing performance at each threshold step. Look for smooth gradients, not cliffs.
From Step 7's edge decay data, extract the walk-forward efficiency ratios:
| Metric | Recent OOS Efficiency | Historical OOS Efficiency | Verdict |
|---|---|---|---|
| Win Rate | >0.8 = holding up | ||
| Profit Factor | >0.8 = holding up | ||
| Sharpe | >0.5 = acceptable |
Interpretation:
From Step 7's period metrics, check: does the strategy work in EVERY full year, or only some?
| Year | Win Rate | PF | Positive? |
|---|---|---|---|
| (each full year) | Yes/No |
Interpretation:
After all filters are applied, how many trades per year remain?
| Threshold | Risk Level |
|---|---|
| 40+/year | Good sample size |
| 25-40/year | Acceptable for weekly DCs |
| 15-25/year | Getting thin — each trade matters too much |
| <15/year | Danger zone — statistical reliability is poor |
If filters cut more than 50% of trades, the question is: does the P&L per trade improve enough to justify the reduced sample?
Summarize the findings:
| Check | Result | Flag |
|---|---|---|
| Entry filters validated? | PASS/WARN/FAIL | |
| Baseline profitable without filters? | PASS/WARN/FAIL | |
| Parameter sensitivity smooth? | PASS/WARN/FAIL | |
| Walk-forward OOS efficiency > 0.7? | PASS/WARN/FAIL | |
| Profitable in all full years? | PASS/WARN/FAIL | |
| Trade count adequate (>25/yr)? | PASS/WARN/FAIL |
Bring it all together. Answer these questions:
DO NOT recommend specific threshold values without supporting data. If S/L ratio correlation is 0.001, don't suggest an S/L ratio filter. Let the data speak.
Reference the DC workshop learnings:
If the user wants to test exit rule changes, use batch_exit_analysis with the profile's exit rules translated to trigger configs:
| Profile Exit Rule | Trigger Config |
|---|---|
| Profit target 50% | {"type": "profitTarget", "threshold": 0.5, "unit": "percent"} |
| S/L ratio below 0.3 | {"type": "slRatioThreshold", "threshold": 0.3, "exitBelow": 0.3} |
| Sell Put delta > 70 | {"type": "perLegDelta", "threshold": 0, "legIndex": 0, "exitAbove": 0.70} |
| Sell Call delta < -70 | {"type": "perLegDelta", "threshold": 0, "legIndex": 1, "exitBelow": -0.70} |
| S/L ratio move -100% | {"type": "slRatioMove", "threshold": 1.0} |
| Clock time exit | {"type": "clockTimeExit", "threshold": 0, "clockTime": "14:45"} |
Note: Delta thresholds use decimal format (0.70, not 70). OO uses whole numbers.
npx claudepluginhub davidromeo/tradeblocks-skills --plugin tradeblocksBacktests crypto/stock trading strategies on historical data. Computes Sharpe/Sortino ratios, drawdowns; plots equity curves; optimizes parameters via grid search.
Monitors portfolio risk, R-multiples, and position limits. Creates hedging strategies, calculates expectancy, and implements stop-losses.