agentleFS
tatashbartatashbar/Economic-Modeling-Studio/.agents/skills/backtest/SKILL.md

backtest

Skill4 starsChanged 6 days agoMITView on GitHub

Runs historical and pseudo-real-time backtests with information-set checks and regime-specific performance.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a required input is ABSENT, that part is NOT ASSESSED — NO DATA: do not estimate or invent it.

    line 26
  2. Very specific:

    Collaboration: Follow .claude/docs/collaboration-protocol.md: ask questions first, present options, get approval before writing files, and …

    line 28
  3. Distinctive:

    Verify no look-ahead with automated checks

    line 47
  4. Distinctive:

    Check features, scaling, filters, hyperparameters and data vintages

    line 48
  5. Distinctive:

    Run the backtest; compute point and density scores against naive benchmarks

    line 49
  6. Distinctive:

    After design: confirm windows, horizons and regimes

    line 54
  7. Distinctive:

    After results: confirm interpretation for use decisions

    line 55
  8. Distinctive:

    Use of non-real-time data is stated where vintages are unavailable

    line 72

“Common” is measured: kept by at least 6 in 10 of the 7 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
<!-- Generated from .claude/skills/backtest/SKILL.md by tools/sync_agents.py. Edit the source, then run the script. -->

/backtest — Backtest

Category: Validation & QA · Primary agent: backtesting-specialist

Runs historical and pseudo-real-time backtests with information-set checks and regime-specific performance.

Arguments: whatever the user wrote after the command name.

Purpose

Backtest a model, forecast method, risk model or policy rule: how would it have performed if it had been used in the past with only the information then available? The output reports point and density performance against naive benchmarks, separately for calm and stress periods, with automated proof that no future information leaked in.

Use it when a forecaster, nowcaster, risk model or scenario generator is being validated or compared, or a policy rule's historical performance is in question.

Do not use it when the question is conceptual soundness of a structural model (/validate-model).

Before you start

  1. Check required inputs. For each input below record FOUND or ABSENT (never 'assumed'):
    • Model code
    • Data vintages If a required input is ABSENT, that part is NOT ASSESSED — NO DATA: do not estimate or invent it; name what is missing and which skill produces it. If all required inputs are absent, stop and say so.
  2. Check confidentiality. Identify the data classification level of the inputs (.claude/docs/confidentiality-and-ai-use.md). Do not proceed with restricted or confidential data in a way the policy does not allow.
  3. Collaboration. Follow .claude/docs/collaboration-protocol.md: ask questions first, present options, get approval before writing files, and update production/session-state/active.md after each approved section.

Agents

  • backtesting-specialist — primary agent; coordinates the work and integrates results
  • forecast-evaluation-specialist — Evaluates forecasts

Each agent is defined in .claude/agents/<name>.md. If your tool runs subagents, run these agents as subagents, in parallel where the steps are independent; otherwise read each agent's file and apply its instructions in turn. Subagents only write to the paths named in your instructions.

Key design decisions (present options, let the user choose)

DecisionTypical optionsWhat it changes
Windowrolling, expandingAdaptation versus stability
Datareal-time vintages, latest vintage with caveatRealism of the test
Re-estimationevery origin, periodically, neverPractical realism
ScoresRMSE, MAE, log score, CRPS, coverageWhat "good" means
Regimesrecessions, crises, high inflationStress-period evidence

Workflow

  1. Define windows, horizons and the information set at each origin
  2. Verify no look-ahead with automated checks
    • Check features, scaling, filters, hyperparameters and data vintages
  3. Run the backtest; compute point and density scores against naive benchmarks
    • Equal-accuracy tests suited to nested or non-nested models
  4. Report calm vs. stress-period performance

Checkpoints with the user

  • After design: confirm windows, horizons and regimes
  • After results: confirm interpretation for use decisions

Common pitfalls

  • Final-vintage data treated as real time
  • Tuning on the full sample
  • Averages only
  • Overstating small, insignificant differences

Output

validation/<model>/backtest-report.md

The report documents the design, look-ahead checks, scores versus benchmarks with tests, and performance by regime.

Gate / verdict

  • No look-ahead verified
  • Benchmarks included
  • Significance tests accompany comparisons
  • Use of non-real-time data is stated where vintages are unavailable

Suggested next steps

  • /validate-model
  • /forecast-round

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.