fpa-backtest-learn
/fpa-backtest-learn
Use when you want the model to learn from how its past forecasts actually turned out - scoring forecasts against the company's real actuals, backtesting assumptions on history, and proposing ratified improvements. Runs at/after monthly close.
- Author
- JeffBrines ↗
- Repository
- openfpa ↗
- Licence
- MIT
- Last repository change
- 23.06.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when you want the model to learn from how its past forecasts actually turned out - scoring forecasts against the company's real actuals, backtesting assumptions on history, and proposing ratified improvements. Runs at/after monthly close.
Original author description
Use when you want the model to learn from how its past forecasts actually turned out - scoring forecasts against the company's real actuals, backtesting assumptions on history, and proposing ratified improvements. Runs at/after monthly close.
How it works
- Overview
- Memory (.fpa/)
- Workflow
- Bootstrap (day one)
- Guardrails (always)
- Next
SKILL.md preview
---
name: fpa-backtest-learn
description: Use when you want the model to learn from how its past forecasts actually turned out - scoring forecasts against the company's real actuals, backtesting assumptions on history, and proposing ratified improvements. Runs at/after monthly close.
---
# Backtest & Learn (Operate)
## Overview
The model should get measurably better at this business over time. This skill
scores past forecasts against the company's actuals, surfaces what keeps missing,
and proposes improvements a human ratifies. The objective metric is reconciliation
error against the user's own books (`pyfpa.score_forecast`) - the FP&A analog of a
validation loss.
**Core principle:** self-experimenting, but never self-promoting. The AI may run
and discard bounded challengers autonomously; a human approves replacement of
the champion. Everything learned lives as plain files in `.fpa/`.
## Memory (`.fpa/`)
- `forecasts/<period>.snapshot.yaml` - each forecast's assumptions + predictions, and (after close) its score.
- `scorecard.md` - the running track record (rendered, never hand-edited).
- `experiments/<slug>.experiment.yaml` - each tested model change, its evidence,
changed files, checks, before/after metrics, and decision.
- `learnings.md` - every accepted change: what, the evidence, the backtest delta, the date.
## Workflow
1. **Snapshot every forecast.** When you produce a forecast, persist it:
`snapshot_forecast(cfg, forecast_df, label=<period>, created=<today>)` →
`save_snapshot(..., ".fpa/forecasts/<period>.snapshot.yaml")`.
2. **Score at close.** When a period closes (actuals via **fpa-configure-actuals**),
load that period's snapshot, `score_forecast(snap.predicted, actuals)`, write the
score back into the snapshot, and re-render `scorecard.md` with `render_scorecard`.
3. **Attribute** each material per-line miss to a driver (volume / price / cost ratio
/ working-capital timing). **Run the fpa-cfo-judgment one-time-item screen first** -
never blame the model for a one-off.
- **Monitor applied corrections:** if a `type: parametric` correction's target line keeps missing, flag it as possibly stale (`applied → superseded`) for the human - never auto-revert.
4. **Create an experiment** before changing the model. State the financial
hypothesis, CFO question, evidence, fit periods, holdout periods, and files
expected to change. Save it with `pyfpa.save_experiment`.
5. **Propose**, tagged by type:
- **Parametric** (an assumption change): re-score it with `holdout_backtest` on the
company's history. Surface it **only if it lowers holdout fitness** (not in-sample),
ranked by the delta. Clamp the proposed move with `magnitude_cap` (±25%/cycle).
- **Structural** (a methodology/skill change, e.g. a revenue-recognition lag): surface
**only** when `persistent_miss` is true for the line (same-signed across K≥2 closes)
and it survived the one-time screen. Hand it to **fpa-learn-business** to generate the
skill *on approval* - propose, don't auto-write.
6. **Evaluate.** Record before/after metrics and explicit checks in the experiment.
A model change that breaks reconciliation or another accounting invariant is
failed even if one headline metric improves.
7. **Ratify + log.** Present proposals; the human accepts/rejects. On accept, add
an `ExperimentDecision`, set `status: accepted`, save with explicit
`overwrite=True`, update the company model, and append to `learnings.md`.
Rejected and reverted experiments remain in memory.
8. **Run `fpa-research-loop`** when the miss warrants multiple autonomous
challenger epochs instead of one manually proposed change.
## Bootstrap (day one)
If the company already has ~12+ months of actuals, you don't have to wait: run
`holdout_backtest` immediately (fit on the earlier months, hold out the recent ones)
to report current accuracy and the first round of parametric proposals.
## Guardrails (always)
- Never score on data the model was fit on (`holdout_backtest` enforces this).
- No proposal off a single period - require a persistent, same-signed miss.
- A parametric change must improve **holdout** fitness, not in-sample fit.
- Cap how far any assumption moves per cycle (`magnitude_cap`).
- Human ratifies champion promotion; autonomous failed epochs are logged and reversible.
- Missing or zero actuals are insufficient evidence, not perfect forecast performance.
## Next
Scored + learned → **fpa-board-briefing** (report the forecast and how it's tracking).
Versions
The database has no other skills named fpa-backtest-learn.
Database snapshot: 13.11.2026 · package version 644cf164e20e (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100fpa-portfolio-learn
Use when you run FP&A for several clients and want your practice to compound - mines patterns that generalize across your same-type clients, validates them by leave-one-out cross-client backtesting, and promotes ratified priors and skills into a local library that seeds every… - 90fpa-learn-business
Use when starting FP&A work for a new company, onboarding a business into openfpa, or asked to "understand my business / set up a model for us" before any forecasting - produces a durable business profile and generates business-specific skills. - 100fpa-model
Builds a driver-based FP&A operating model linking business inputs to P&L, balance sheet, and cash flow outputs. Use when building an annual plan, preparing investor materials, running scenario analysis, or stress-testing the business. - 100backtesting-trading-strategies
Test backtest crypto trading strategies against historical data with performance metrics. Use when validating trading strategies with historical data. Trigger with phrases like "backtest strategy", "test trading signals", or "validate approach". - 100finance-fpa-analyst
Use when Codex should act as the FP&A Analyst specialist from Agency Agents. Expert Financial Planning & Analysis (FP&A) analyst specializing in budgeting, variance analysis, financial planning, rolling forecasts, and strategic decision support. Bridges the gap between the… - 100backtesting
Use when testing a trading strategy on historical data. Covers the biases that make a backtest lie, realistic costs, walk-forward validation, and the statistics that distinguish an edge from a coincidence. Trigger on "backtest this strategy", "my backtest looks too good to be…