Back to list
davidromeo

tradeblocks-compare

by davidromeo

Portfolio analytics analysis for OptionsOmega portfolio back tests

29🍴 14📅 Jan 20, 2026

SKILL.md


name: tradeblocks-compare description: Performance comparison for trading strategies. Compare backtest vs actual results, strategy vs strategy metrics, or period vs period performance. Use when exploring differences between theoretical and live execution, understanding how two strategies relate, or analyzing performance across time periods.

Performance Comparison

Explore differences between strategies, execution modes, or time periods.

Prerequisites

  • TradeBlocks MCP server running
  • At least one block with trade data loaded
  • For backtest vs actual: Both trade log and reporting log for the same strategy
  • For strategy vs strategy: Two blocks or multiple strategies in one block

Process

Step 1: Identify Comparison Type

Ask the user what they want to compare:

TypeUse CaseRequired Data
Backtest vs ActualExplore theoretical vs live executionTrade log + reporting log
Strategy vs StrategyUnderstand how two strategies relateTwo blocks or multi-strategy block
Period vs PeriodAnalyze same strategy across different time rangesOne block with sufficient history

Ask: "What would you like to compare?"

Step 2a: Backtest vs Actual Comparison

Use compare_backtest_to_actual to explore how theoretical performance compares to live execution.

Key parameters:

  • blockId: Block folder name
  • scaling: How to compare P&L fairly (see below)
  • strategy: Optional filter to specific strategy
  • dateRange: Optional date filter
  • matchedOnly: Only include trades where both backtest and actual exist

Scaling modes (see references/scaling.md):

ModeWhat It DoesUse When
rawShows P&L as-isContract sizes match between backtest and actual
perContractDivides each P&L by contract countComparing per-lot performance regardless of size
toReportedScales backtest DOWN to match actual contract countBacktest uses more contracts than actual

Tool returns:

  • Per-date comparison with backtest vs actual P&L
  • Slippage calculation (actual minus backtest)
  • Match status (whether both sides exist for each date)
  • Summary totals and average slippage percentage

Present findings from the data:

  • Total backtest P&L vs Total actual P&L (at selected scaling)
  • Matched trade count (how many dates have both)
  • Average slippage (percentage deviation from backtest)
  • Unmatched trades (missed fills or extra trades)

Step 2b: Strategy vs Strategy Comparison

For comparing two different strategies:

  1. Use get_statistics on each block (or with strategy filter)
  2. Use get_correlation_matrix to understand how they move together

Key parameters for correlation:

  • method: "kendall" (robust, rank-based), "spearman" (rank), "pearson" (linear)
  • alignment: "shared" (only days both traded) or "zero-pad" (fill missing with 0)
  • timePeriod: "daily", "weekly", or "monthly" aggregation

Present side-by-side metrics:

MetricStrategy AStrategy B
Net P&L
Sharpe Ratio
Max Drawdown
Win Rate
Profit Factor

Correlation context:

  • Very low (<0.2): Strategies move independently
  • Low (0.2-0.4): Some independence
  • Moderate (0.4-0.6): Shared behavior
  • High (>0.6): Similar movements, less diversification

Step 2c: Period vs Period Comparison

For analyzing performance across time:

Use get_period_returns with period type and optional date filters.

Key parameters:

  • period: "monthly", "weekly", or "daily"
  • dateRange: Optional filter to specific time range
  • normalizeTo1Lot: Normalize for fair comparison across different position sizes

Present period breakdown:

  • Performance by month/quarter/year
  • Best and worst periods
  • Trends or regime changes

Questions to explore:

  • "How does recent performance compare to earlier results?"
  • "Are there periods that stand out?"
  • "Does performance vary by time of year?"

Step 3: Present Findings

Synthesize the data into what stands out:

Comparison Summary:

  • What was compared: [backtest vs actual / strategy A vs B / period X vs Y]
  • Key observation: [Most notable difference from the data]
  • Magnitude: [Size of the divergence]

What the data shows:

  • [Notable finding 1 from tool output]
  • [Notable finding 2 from tool output]
  • [Any patterns or anomalies]

Context for interpretation:

  • [Possible explanations for observed differences]
  • [Factors that may affect the comparison]

Present these as observations from the historical data. The user can decide what meaning to draw from the findings.

Interpretation Reference

For detailed explanation of scaling modes, see references/scaling.md.

After comparison analysis:

  • /tradeblocks-health-check - Deep dive into either strategy
  • /tradeblocks-portfolio - Explore correlation and diversification
  • /tradeblocks-wfa - Test parameter robustness

Notes

  • Backtest results typically look better than live (ideal fills, no slippage)
  • Some degradation from backtest to live is expected
  • High correlation between strategies means they may draw down together
  • Short comparison periods have more noise than signal
  • Scaling mode choice affects what story the data tells

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon