backtest-diagnose

Diagnose backtest failures by inspecting artifacts and code to classify root causes.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill backtest-diagnose-daddyelonmusk69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backtest-diagnose
Source: https://github.com/DaddyElonMusk69/motis-agent/tree/main/skills/finance/backtest-diagnose
Command: npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill backtest-diagnose-daddyelonmusk69

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps users quickly identify why a backtest failed or produced abnormal results, pinpoint root causes, and guide reliable fixes to restore strategy performance.

Core Features & Use Cases

  • Artifact inspection: read artifacts such as artifacts/metrics.csv, artifacts/equity.csv, and artifacts/trades.csv to surface failure indicators.
  • Code and configuration review: examine code paths in code/signal_engine.py and config.json to understand the fault domain.
  • Root-cause classification: apply a structured error taxonomy to categorize issues (runtime errors, logic bugs, data problems).
  • Guided fixes and verification: propose and apply targeted edits, then re-run the backtest to verify the fix.
  • Post-fix validation: ensure metrics converge, no NaN in key series, and exit_code equals 0.

Quick Start

Diagnose a failing backtest by describing the observed issue, inspecting artifacts and code, and then apply the recommended fix and re-run the backtest.

Frequently Asked Questions about backtest-diagnose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a failing backtest and find the root cause?

To diagnose a failing backtest, inspect artifacts like metrics.csv, equity.csv, and trades.csv alongside signal_engine.py and config.json to classify runtime errors, logic bugs, or data problems as the root cause.

Why does my backtest produce abnormal results or NaN values in key series?

Backtest abnormal results and NaN values often stem from logic bugs or data problems. Inspecting equity.csv and trades.csv artifacts helps pinpoint the fault domain within your signal engine configuration and code paths.

What is the best way to fix underperforming backtest results?

The best way to fix underperforming backtest results is applying a structured workflow: inspect artifacts, review code, classify the root cause, apply targeted edits, and re-run the backtest to verify metrics converge.

How do I verify a backtest fix works correctly after applying changes?

Verify a backtest fix by re-running the test to confirm exit_code equals 0, ensuring no NaN values appear in key series, and checking that performance metrics converge to expected values.

Can I use backtest diagnostics on workflows with custom signal engine code?

Yes, backtest diagnostics work with custom code by reviewing code paths in files like signal_engine.py and config.json to understand the fault domain and identify logic bugs or runtime errors.

What are common limitations when debugging backtest failures from data artifacts?

Debugging backtest failures from data artifacts requires complete artifacts like metrics.csv and trades.csv. Limitations arise if artifacts are missing, incomplete, or lack sufficient detail to classify runtime errors versus data problems.