From tradeblocks
Parameter exploration for trading backtests. Analyzes trade data to find patterns across parameters like time of day, DTE, delta ranges, and market conditions. Use when exploring which parameters performed differently or understanding strategy behavior across conditions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tradeblocks:optimizeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Explore trade data to understand how performance varies across different parameters.
Explore trade data to understand how performance varies across different parameters.
Uses predictive field analysis, field statistics, filter curves, and market-based filter suggestions to answer questions like:
Important: This skill helps surface patterns in historical data. Past patterns may not persist. See references/optimization.md for overfitting context.
Ask what the user wants to explore:
| Goal | Primary Tool |
|---|---|
| Find which fields predict P&L | find_predictive_fields |
| Understand a specific field's distribution | get_field_statistics |
| Test filter thresholds on a field | filter_curve |
| Get market-based filter suggestions | suggest_filters |
| Validate existing entry filters | validate_entry_filters |
Ask: "What aspect of your strategy would you like to explore?"
Use list_blocks to identify the target block.
Run find_predictive_fields to rank all numeric fields by correlation with P&L.
Key parameters:
blockId: Block folder namestrategy: Optional filter to specific strategystrategyName: Strategy profile name (auto-filters to that strategy's trades, adds profile context)targetField: Field to correlate against (default: "pl")minSamples: Minimum trades with valid values (default: 30)Tool returns:
Interpreting results — exclude output-derived fields (netPl, plPct, rom, isWinner, maxProfit, maxLoss, profitCapturePercent, rMultiple, etc.) and focus on actionable entry/market fields:
| Field | What It Means | Actionable? |
|---|---|---|
openingShortLongRatio | Entry quality / structure health | Yes - potential min threshold filter |
openingVix | VIX at entry | Yes - potential VIX range filter |
durationHours | Holding period | Yes - exit timing |
movement | Underlying movement during trade | Context for regime sensitivity |
premium | Entry pricing | Yes - potential min/max filter |
gap | Opening gap | Yes - potential gap filter |
hourOfDay | Entry time | Yes - time-of-day filter |
numContracts | Position size | Context for sizing effects |
Flag any actionable field with |correlation| > 0.1 as worth investigating further.
For fields identified in Step 2, use get_field_statistics to understand the data shape.
Key parameters:
blockId: Block folder namefield: Field name to analyzestrategy: Optional filterhistogramBuckets: Number of histogram buckets (default: 10, max: 50)Tool returns:
This reveals:
Use filter_curve to sweep thresholds and see performance at each cutoff point.
Key parameters:
blockId: Block folder namefield: Field to sweep thresholds onstrategy: Optional filtermode: "lt" (field < threshold), "gt" (field > threshold), "both" (show both directions)thresholds: Custom threshold values to test (auto-generated from percentiles if omitted)percentileSteps: Which percentiles to use for auto thresholds (default: [5, 10, 25, 50, 75, 90, 95])Tool returns per threshold:
Present as a table showing performance at each threshold:
| Threshold | Mode | Trades | Win Rate | PF | Net P&L | vs Baseline |
|---|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | ... | ... |
What to look for:
Run suggest_filters to get data-driven filter suggestions based on market conditions.
Key parameters:
blockId: Block folder namestrategy: Optional filter to specific strategystrategyName: Strategy profile name (cross-references against existing profile filters)minImprovementPct: Only suggest filters with >= X% win rate improvement (default: 3)Tool returns:
Market fields analyzed:
Present the top suggestions ranked by improvement. For each, note:
If the strategy has a profile with entry filters, run validate_entry_filters:
Key parameters:
blockId: Block folder namestrategyName: Strategy name matching a stored profileTool returns:
profile_update_hints when filters appear counterproductiveSurface any filters that are hurting rather than helping — where filtered-out trades actually outperform entered trades.
Synthesize what the data shows:
Predictive Fields Summary:
Filter Curve Results (if tested):
Market Filter Suggestions (if run):
Sample Size Context:
For further validation:
/tradeblocks:wfa)Present these as patterns in the historical data. The user can decide what weight to give these observations.
For detailed guidance on interpreting optimization results and avoiding overfitting, see references/optimization.md.
After parameter exploration:
/tradeblocks:wfa - Test if patterns hold on out-of-sample data/tradeblocks:health-check - Full metrics review/tradeblocks:dc-analysis - DC-specific deep dive with curve fit detectionfind_predictive_fields with the block (and optional strategy filter)get_field_statistics to understand distributionsget_field_statistics on openingVix to see the distributionfilter_curve on openingVix to test thresholdssuggest_filters to see if VIX-based filters are suggestedsuggest_filters to get data-driven suggestionsfilter_curve on the underlying field to check robustnessvalidate_entry_filters with the strategy profile nameprofile_update_hints/tradeblocks:wfa for out-of-sample testingnpx 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.
Builds financial models, backtests trading strategies, and analyzes market data with risk metrics, portfolio optimization, and statistical arbitrage.