agentleFS
davidromeodavidromeo/tradeblocks-skills/skills/health-check/SKILL.md

health-check

Skill4 starsChanged 49 days agoMITView on GitHub

Strategy health check for trading backtests. Analyzes performance metrics, runs stress tests, and surfaces risk indicators. Use when evaluating a strategy's historical performance and stress characteristics.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use testing.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If analyzing a specific strategy, note it for filtering in subsequent steps.

    line 30
  2. Very specific:

    Shortcut for multi-strategy portfolios: If the user wants a comprehensive portfolio-level health check, consider using …

    line 32
  3. Very specific:

    Run get_statistics for the selected block (with strategy filter if specified).

    line 36
  4. Very specific:

    Run stress_test to see how the strategy performed during named historical market stress scenarios (COVID crash, 2022 bear, VIX spikes, …

    line 53
  5. Very specific:

    Run run_monte_carlo to project performance under uncertainty.

    line 78
  6. Very specific:

    Run drawdown_attribution to identify which strategies contributed most to losses during the portfolio's maximum drawdown period.

    line 94
  7. Distinctive:

    After health check, the user may want to:

    line 155
  8. Distinctive:

    Always use trade-based calculations when filtering by strategy (daily logs represent full portfolio)

    line 162

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Strategy Health Check

Surface key performance metrics and stress test results to help understand a strategy's characteristics.

Prerequisites

  • TradeBlocks MCP server must be running
  • At least one block with trade data loaded

Process

Step 1: Select Strategy

List available blocks and help the user choose what to analyze.

Use list_blocks to show available options.

Ask clarifying questions:

  • "Which backtest would you like to analyze?"
  • "Do you want to analyze the full portfolio or a specific strategy within it?"

If analyzing a specific strategy, note it for filtering in subsequent steps.

Shortcut for multi-strategy portfolios: If the user wants a comprehensive portfolio-level health check, consider using portfolio_health_check (see Step 6) instead of running Steps 2-5 individually. It combines correlation, tail risk, Monte Carlo, walk-forward, and profile-aware dimensions in one call.

Step 2: Gather Basic Metrics

Run get_statistics for the selected block (with strategy filter if specified).

Present key metrics with context:

MetricWhat It Measures
Sharpe RatioRisk-adjusted return (higher = better return per unit risk)
Sortino RatioDownside risk-adjusted return (focuses only on losses)
Max DrawdownLargest peak-to-trough decline (lower = less historical pain)
Win RatePercentage of trades that were profitable
Profit FactorGross wins / gross losses (>1 means profitable overall)
Net P&LTotal profit after commissions

Key insight: A strategy can have low win rate but high profit factor if average wins exceed average losses significantly. Neither metric alone tells the full story.

Step 3: Stress Testing

Run stress_test to see how the strategy performed during named historical market stress scenarios (COVID crash, 2022 bear, VIX spikes, etc.).

Key parameters:

  • blockId: Block folder name
  • scenarios: Optional list of specific scenario names (omit to run all built-in scenarios)
  • customScenarios: User-defined scenarios with custom date ranges
  • includeEmpty: Include scenarios with no trades (default: false)

Tool returns per scenario:

  • Scenario name and date range
  • Trade count, win rate, net P&L during that period
  • Profit factor and max drawdown during the stress period

Present a stress test summary table:

ScenarioDatesTradesWin RateNet P&LMax DD
COVID Crash
2022 Bear
VIX Spike Events

Flag any scenario where the strategy had significant losses or drawdown.

Step 4: Monte Carlo Projections

Run run_monte_carlo to project performance under uncertainty.

Key parameters to understand:

  • resampleMethod: "trades" resamples individual trade P&L (default)
  • includeWorstCase: Injects synthetic worst-case scenarios (default: true)
  • worstCasePercentage: How much of simulation is worst-case (default: 5%)

Focus on these outputs:

  • 5th percentile outcome: What the data suggests in a bad scenario (1 in 20 chance of worse)
  • Probability of profit: How often simulations ended profitable
  • Mean max drawdown: Typical drawdown across simulations

Present these as "what the historical data suggests could happen" - not predictions.

Step 5: Drawdown Attribution

Run drawdown_attribution to identify which strategies contributed most to losses during the portfolio's maximum drawdown period.

Key parameters:

  • blockId: Block folder name
  • strategy: Optional filter to specific strategy
  • topN: Number of top contributors to return (default: 5)

Tool returns:

  • Drawdown period (peak date to trough date)
  • Peak and trough equity values
  • Per-strategy P&L attribution during the drawdown
  • Each strategy's percentage contribution to the total loss

Present which strategies drove the worst drawdown. This is critical for understanding concentrated risk.

Step 6: Portfolio Health Check (Multi-Strategy Blocks)

For multi-strategy blocks, run portfolio_health_check to get a comprehensive one-call assessment.

Tool returns a layered report:

  • Verdict: Overall status (HEALTHY / MODERATE_CONCERNS / SIGNIFICANT_CONCERNS)
  • Grades: A-F across 9 dimensions (diversification, tail risk, robustness, consistency, regime coverage, day coverage, concentration risk, correlation risk, scaling alignment)
  • Flags: Specific warnings and passes with details
  • Key numbers: Sharpe, Sortino, max drawdown, avg correlation, avg tail dependence, MC probability of profit, walk-forward efficiency

Surface the verdict, any warning flags, and the dimension grades. Focus attention on any grade below B.

Step 7: Summary

Synthesize findings into a clear picture of what the data shows:

Metrics Summary:

  • Sharpe Ratio: [value] - [context: >1.0 considered acceptable by many, >2.0 considered excellent]
  • Max Drawdown: [value] - [context: <20% relatively low, >40% significant]
  • Profit Factor: [value] - [context: >1.5 considered good, >2.0 excellent]

Stress Test Insights:

  • [Scenario results — which stress periods hurt, which held up]
  • [Any scenarios with zero trades (no exposure during that period)]

Monte Carlo Projections:

  • 5th percentile scenario: [value]
  • Probability of profit: [value]

Drawdown Attribution:

  • Worst drawdown period: [peak date] to [trough date]
  • Primary contributor: [strategy] ([percentage] of total loss)

What stands out:

  • [Highlight any notably strong or weak metrics]
  • [Note any warnings from the tools]
  • [Stress scenarios that caused outsized damage]

Let the user draw their own conclusions about whether this fits their risk tolerance.

Interpretation Reference

For detailed explanations of each metric, see references/metrics.md.

Related Skills

After health check, the user may want to:

  • /tradeblocks:wfa - Test if optimized parameters hold up on unseen data
  • /tradeblocks:risk - Deep dive into position sizing and tail risk analysis
  • /tradeblocks:portfolio - Portfolio-level correlation and diversification

Notes

  • Always use trade-based calculations when filtering by strategy (daily logs represent full portfolio)
  • Historical performance doesn't guarantee future results
  • Stress tests only cover known historical scenarios — unknown risks aren't captured

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.