LEARN/SCENARIOS

Scenarios

A scenario drives the macro path. Without one, the economy finds its own path from day zero.

shock = tf.Scenario.rate_shock(
    start=0.025, end=0.05, over=15)

tf.evaluate(agents, seed=7,
            universe=u, days=20,
            scenario=shock)

# or move one field yourself
engine.pin_macro(
    corporate_bond_yield=0.09)

Two ways to move the economy

A scenario Drives a path over many days. Use it for a crisis, a hiking cycle, or a real historical window.
A pin Sets one field one time. The chain then continues from the pinned value, so a pin does not freeze the field.

Which field you drive decides the answer

Measured on real 2022 data over six seeds, against a real S&P 500 that fell 20.0%. The lever is inflation, not the policy rate.

Real S&P 500, 2022 what actually happened -20.0%
Drive inflation_rate the published CPI path -23.3%
Drive federal_funds_rate the real seven-hike path -13.1%
No scenario at all drift and nothing more -12.6%

Inflation works because it steers the central bank's own reaction into the corporate bond yield. Do not pin corporate_bond_yield when you do this. If you pin it, you cut the channel that the inflation path is using.

Detect a scenario, do not size one

The expected response is calibrated. The spread around it is not, and that is the whole gap.

The size is right

VIX -0.00461 vs -0.00500
Credit yield -8.106 vs -7.445
Valuation +1.226 vs +1.272

OLS slope of daily return on each driver, model against real Apple, over the same 504 sessions.

The spread is too wide

1.565x

Residual dispersion over the driven window, against real. One run therefore understates how much of its own move came from the scenario.

So the envelope lets you detect a scenario's effect. It forbids you to size one from a single run.

An event study agrees on sign two times out of six

Over the five sessions after each of six dated 2020-21 events, the model agrees with real Apple on direction twice. The two that agree are the two the macro path carries. The Fed's intermeeting cut of 3 March 2020 goes the wrong way, +9.9% against a real -1.4%, because an announcement channel is absent. The vaccine result and Omicron are single-name news, which a macro path can not know.

The endogenous economy can not reach its own crisis regimes

Left alone, inflation peaks at 4.0% on every seed over five years. Real US CPI peaked at 9.0% in June 2022. The central bank has a crisis cadence that pulls its next meeting in, and a default run can not reach it. So an inflation regime or a policy crisis must come from a scenario. A volatility crisis does not: on pt-v10 the preset's own VIX crossed its crisis threshold on 10.2% of days against a real 12.5%.

All pages