Scenario Configuration Reference¶
ScenarioConfig is the YAML schema used by fp run, fp batch, and fp-mcp scenario tools.
YAML fields¶
| Field | Type | Default | Description |
|---|---|---|---|
name |
str |
required | Scenario name, used for output directory naming. |
description |
str |
"" |
Human-readable scenario description. |
fp_home |
Path |
FM |
Path to the FP installation directory (contains fp.exe, fminput.txt, etc.). |
input_file |
str |
fminput.txt |
FP input filename to copy/patch in each run work directory. |
forecast_start |
str |
"2025.4" |
Forecast start period (YYYY.Q). |
forecast_end |
str |
"2029.4" |
Forecast end period (YYYY.Q). |
overrides |
dict[str, VariableOverride] |
{} |
Exogenous overrides keyed by variable name. |
track_variables |
list[str] |
[PCY, PCPF, UR, PIEF, GDPR] |
Variables included in output summaries/charts. |
input_patches |
dict[str, str] |
{} |
Input patches (literal replacement and command-aware cmd: updates). |
extra |
dict |
{} |
Additional metadata passed through for local tooling. |
Override methods¶
Each entry in overrides has:
method: one ofCHGSAMEPCT: change by the same percentage each periodSAMEVALUE: hold the variable at a constant valueCHGSAMEABS: change by the same absolute amount each periodvalue: numeric value used with the method
Example:
input_patches¶
input_patches supports two forms:
- Literal search/replace (legacy):
- Command-aware parameter patching:
Command-aware patches edit command parameters without requiring exact whole-line text matches.
track_variables¶
track_variables controls which forecast series are shown in run summaries and charts (CLI fp run, fp report, and dashboard views). Defaults to:
Full examples¶
examples/baseline.yaml¶
# Baseline scenario: default FP model run with no overrides.
#
# This runs the model as-is using the standard fminput.txt and fmexog.txt
# configuration. Use this as the reference point for comparing scenario variants.
name: baseline
description: "Default FP model run with standard assumptions"
fp_home: FM
input_file: fminput.txt
forecast_start: "2025.4"
forecast_end: "2029.4"
track_variables:
- PCY # Real GDP growth rate (annualized %)
- PCPF # GDP deflator inflation rate (annualized %)
- UR # Unemployment rate
- PIEF # Before-tax corporate profits
- GDPR # Real GDP (billions, 2012 dollars)
examples/higher_growth.yaml¶
# Higher growth scenario: potential GDP grows faster than baseline.
#
# This overrides the YS (potential GDP) exogenous variable to grow
# at a higher rate, simulating a more optimistic supply-side outlook.
# Compare against baseline.yaml to see impacts on inflation, unemployment, etc.
name: higher_growth
description: "Higher potential GDP growth scenario"
fp_home: FM
input_file: fminput.txt
forecast_start: "2025.4"
forecast_end: "2029.4"
overrides:
YS:
method: CHGSAMEPCT
value: 0.008 # ~3.2% annualized vs baseline ~2.1%
track_variables:
- PCY
- PCPF
- UR
- PIEF
- GDPR
New ship-readiness examples¶
examples/demand_shock.yaml— demand-led expansion viaTBGQoverride.examples/inflation_shock.yaml— cost-push inflation shock viaPIMoverride.examples/rate_path_shock.yaml— tighter policy-rate path viaRSoverride.
Walkthrough: from override to parity triage¶
For fast smoke validation (for example Tandy/CI runs), use examples/baseline_smoke.yaml with --backend both to produce parity artifacts quickly before running larger policy scenarios.
If you want to refresh model history before scenario runs, generate an updated bundle with
fp data update-fred and set scenario fp_home to the new .../FM directory
(see docs/data-update.md).
How overrides work (baseline + scenario layers)¶
- Baseline exogenous settings from
FM/fmexog.txtremain in effect by default. - Scenario
overridesare merged/appended into the run-localfmexog.txtused for execution. fminput.txtis not patched to point at another exogenous filename for this flow.- A copy of the merged exogenous script is also written as
fmexog_override.txtfor operator inspection. - First artifact to inspect when results surprise you:
<run>/work_*/fmexog.txt(inspection copy:<run>/work_*/fmexog_override.txt).
1. How overrides map to run exogenous files¶
- Every
overridesentry in scenario YAML is translated into deterministic override commands in the run work directory. - The merged exogenous script is written to
work_*/fmexog.txtand consumed directly by the run pipeline. work_*/fmexog_override.txtis emitted as an explicit debugging copy of that merged script.methodcontrols transformation style:CHGSAMEPCT— same percentage change pathCHGSAMEABS— same absolute change pathSAMEVALUE— fixed level path
2. Run the same scenario on each backend¶
# fp.exe
uv run fp run examples/demand_shock.yaml --backend fpexe --output-dir artifacts/scenario_walkthrough_fpexe
# fppy
uv run fp run examples/demand_shock.yaml --backend fppy --output-dir artifacts/scenario_walkthrough_fppy
3. Run parity compare and inspect artifacts¶
uv run fp parity examples/demand_shock.yaml --with-drift --output-dir artifacts/scenario_walkthrough_parity
- Parity writes
parity_report.jsonplus per-enginePABEV.TXTunder the run directory. - For interactive triage, launch dashboard against that artifacts root:
4. Triage from CLI when parity fails¶
uv run fp triage fppy-report artifacts/scenario_walkthrough_parity/<scenario>_<timestamp>
uv run fp triage parity-hardfails artifacts/scenario_walkthrough_parity/<scenario>_<timestamp>
For smoke runs using fp run ... --backend both, the same triage commands can target the top-level run dir:
uv run fp run examples/baseline_smoke.yaml --backend both --with-drift --output-dir artifacts/scenario_smoke_both
uv run fp triage fppy-report artifacts/scenario_smoke_both/<scenario>_<timestamp>
uv run fp triage parity-hardfails artifacts/scenario_smoke_both/<scenario>_<timestamp>