dc-analysis
Skill3 starsChanged 47 days agoMITView on GitHub
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".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- tradeblocks-org/tradeblocks-skillsword for word, first seen Sep 28, 2026
Other versions1 project uses a version of this.
Word for word · 1
- tradeblocks-org/tradeblocks-skills★ 3100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- compareSkill
- health-checkSkill
- is-this-optimum-realSkill
- market-dataSkill
- oo-captureSkill
- optimizeSkill
- portfolioSkill
- profileSkill
- riskSkill
- wfaSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 16 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Ask which DC to analyze: Use list_blocks if needed.
- Very specific: line 26
Check for a profile: Call get_strategy_profile with the block and strategy name.
- Distinctive: line 27
If profile exists: load it and summarize the structure (DTE spread, deltas, entry/exit rules, underlying).
- Very specific: line 28
If no profile: ask the user for the OO settings (screenshots work) and create one via profile_strategy.
- Very specific: line 44
Run get_statistics for the block.
- Very specific: line 59
Run get_performance_charts with charts: ["exit_reason_breakdown"].
- Distinctive: line 75
If time exits are big losers, the DC may need tighter management before expiry.
- Very specific: line 79
Run find_predictive_fields to check if openingShortLongRatio correlates with P&L.
- Very specific: line 86
If correlation > 0.05, run filter_curve on openingSLRatio to find the optimal entry threshold.
- Very specific: line 92
If the strategy has a profile, run analyze_structure_fit with the block and strategy name.
- Very specific: line 102
If no profile exists, fall back to analyze_regime_performance with segmentBy: "volRegime" instead.
- Distinctive: line 122
If a regime has <10 trades, flag as thin data.
- Distinctive: line 160
Before making any recommendations, test whether the current setup is robust or overfit.
- Very specific: line 164
If the strategy has a profile with entry filters, run validate_entry_filters with the block and strategy name.
- Distinctive: line 182
Ask: "Is this strategy only profitable BECAUSE of the filters?" If removing all filters makes it a net loser, the filters are creating edge …
- Distinctive: line 232
After all filters are applied, how many trades per year remain?
- Distinctive: line 241
If filters cut more than 50% of trades, the question is: does the P&L per trade improve enough to justify the reduced sample?
- Distinctive: line 271
Add/remove entry filters?
- Distinctive: line 274
Consider pausing in certain VIX environments?
- Distinctive: line 281
If removing a filter doesn't hurt much, the filter may be noise
- Distinctive: line 282
If 27% threshold works but 30% doesn't, that's curve fitting territory
- Very specific: line 286
If the user wants to test exit rule changes, use batch_exit_analysis with the profile's exit rules translated to trigger configs:
- Distinctive: line 305
Don't assume S/L ratio filtering works for all DCs — test it first
- Distinctive: line 306
Don't stack VIX + S/L ratio + VIX9D/VIX filters — they're often correlated, pick one
- Distinctive: line 307
Don't recommend delta exit thresholds without testing adjacent values (65 vs 70 vs 75)
- Distinctive: line 308
Don't present a single "optimal" configuration — show the tradeoffs
- Distinctive: line 309
Don't ignore thin data warnings — 10 trades in a bucket is suggestive, not conclusive
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Double Calendar Analysis
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.
Prerequisites
- TradeBlocks MCP server running
- Block with DC trade data loaded
- Strategy profile recommended (will prompt to create if missing)
- Market data (SPX daily + VIX context) for regime analysis
Process
Step 1: Select Block and Load Profile
- Ask which DC to analyze. Use
list_blocksif needed. - Check for a profile. Call
get_strategy_profilewith the block and strategy name.- If profile exists: load it and summarize the structure (DTE spread, deltas, entry/exit rules, underlying).
- If no profile: ask the user for the OO settings (screenshots work) and create one via
profile_strategy. Key fields needed:- Underlying, DTE spread (short/long), put/call deltas
- Entry filters (day, time, S/L ratio min, VIX, RSI)
- Exit rules (profit target, time exit, S/L ratio exit, delta exits)
- Position sizing (allocation %)
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]%Step 2: Baseline Performance
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 |
Step 3: Exit Attribution
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.
- For some DCs (like SPX 8/10), S/L ratio exits are the profit engine — they catch winners early.
- For others (like QQQ 2/4), time exits are the money maker and delta exits cause all the damage.
- If time exits are big losers, the DC may need tighter management before expiry.
Step 4: S/L Ratio Analysis
Run find_predictive_fields to check if openingShortLongRatio correlates with P&L.
Interpretation guide based on DTE/delta:
- Short DTE + high delta (2/4 at 20Δ): S/L ratio typically irrelevant (correlation ~0). Don't filter.
- Mid DTE + mid delta (5/7 at 25Δ): S/L ratio is the strongest predictor. Sweet spot typically 0.5-0.7.
- Long DTE + lower delta (21/28 at 30Δ): Weak but positive correlation. Some value in minimum threshold.
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.
Step 5: Structure Fit Analysis
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:
- Performance by Vol_Regime, day-of-week, time-of-day
- Profile-derived dimension analysis (entry filters, DTE, deltas)
profile_update_hintswhen data shows patterns diverging from profile settings- Thin-data warnings for small buckets
Surface 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.
Step 6: VIX Regime Performance
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:
- Longer DTE DCs (9+) tend to thrive in Normal-Elevated VIX (more vega to harvest).
- Shorter DTE DCs may do better in low VIX (less gamma risk, cleaner theta decay).
- If a regime has <10 trades, flag as thin data.
- Compare to profile's
expectedRegimesif set.
Step 7: Edge Decay Check
Run analyze_edge_decay for the block.
Focus on:
- Yearly trends: Is win rate, profit factor, or Sharpe declining?
- Recent vs historical: Is the recent window diverging from full history?
- 2026 YTD performance: Has the strategy held up in the current environment?
- Worst consecutive losing months: How bad does it get?
Flag any of these:
- Win rate slope < -3%/yr
- Profit factor slope < -0.5/yr
- Recent Sharpe < 50% of historical Sharpe
- Current streak is worst-ever losing streak
Step 8: Predictive Fields Deep Dive
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 effect
For any field with |correlation| > 0.1, note it as a potential filter candidate.
Step 9: Curve Fit Detection
Before making any recommendations, test whether the current setup is robust or overfit. Run these checks in order — each one builds on the previous.
9a. Entry Filter Validation
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:
- Per-filter comparison: entered trades vs filtered-out trades (full stat suite for both groups)
- Ablation study: removes one filter at a time and tests all pairs
profile_update_hintswhen filters appear counterproductive
What to look for:
- A filter is helping if entered trades outperform filtered-out trades on profit factor and win rate
- A filter is hurting if filtered-out trades actually perform better (the filter is excluding winners)
- The ablation study shows which filters interact — some only work in combination
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.
9b. Baseline Sanity Check
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.
9c. Parameter Sensitivity (Adjacent Value Test)
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:
- Robust: Performance degrades gradually as you move away from the chosen value. A plateau or wide sweet spot is ideal.
- Overfit: Sharp cliff at the exact chosen value. Performance is great at X but terrible at X+1 or X-1.
Present the filter_curve results as a table showing performance at each threshold step. Look for smooth gradients, not cliffs.
9d. Walk-Forward OOS Check
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:
- OOS efficiency > 1.0 = outperforming in-sample (unlikely to be overfit)
- OOS efficiency 0.7-1.0 = reasonable decay, probably genuine edge
- OOS efficiency < 0.5 = significant IS/OOS gap, possible overfitting
- OOS efficiency declining over time = edge may be decaying or original fit was to a specific regime
9e. Year-over-Year Consistency
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:
- Profitable in ALL full years = strong evidence of genuine edge
- Profitable in 3/4 years = acceptable, check if the bad year has an explanation (regime shift, etc.)
- Profitable in only 1-2 years = high curve fit risk — the "edge" may be a specific market period
9f. Trade Count Check
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?
9g. Curve Fit Verdict
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 |
- 5 PASS: Strong confidence the strategy is robust
- 4 PASS, 1 WARN: Likely robust, monitor the warning
- 3 or fewer PASS: Curve fit risk is significant — recommend simplifying filters
- Any FAIL on baseline: The structure itself may not have edge — filters are papering over a broken thesis
Step 10: Synthesis and Recommendations
Bring it all together. Answer these questions:
- Is this DC healthy? Sharpe, win rate, profit factor trends
- What's driving profits? Which exit type makes the money?
- What's causing losses? Which exit type or regime is the biggest drag?
- Is the edge decaying? Yearly trends and recent performance
- Is it overfit? Curve fit verdict from Step 9
- What would you change? Based on the data:
- Add/remove entry filters?
- Adjust exit thresholds?
- Change position sizing for specific regimes?
- Consider pausing in certain VIX environments?
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:
- "Adding little bits at a time" — don't stack filters, test one at a time
- Each filter should have explanatory power — you should know WHY it works
- If removing a filter doesn't hurt much, the filter may be noise
- If 27% threshold works but 30% doesn't, that's curve fitting territory
Optional: Exit Simulation (when replay data available)
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.
Reference
- For DC mechanics, term structure, curve fitting principles, and common failure modes, see references/dc-mechanics.md
What NOT to Do
- Don't assume S/L ratio filtering works for all DCs — test it first
- Don't stack VIX + S/L ratio + VIX9D/VIX filters — they're often correlated, pick one
- Don't recommend delta exit thresholds without testing adjacent values (65 vs 70 vs 75)
- Don't present a single "optimal" configuration — show the tradeoffs
- Don't ignore thin data warnings — 10 trades in a bucket is suggestive, not conclusive
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

