Install
$ agentstack add skill-davidromeo-tradeblocks-skills-dc-analysis ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
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 | | 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 (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 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 VIX0.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.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](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
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: davidromeo
- Source: davidromeo/tradeblocks-skills
- License: MIT
- Homepage: https://tradeblocks.io
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.