format: sfcr-notebook-yaml
formatVersion: 1
id: bmw-notebook
title: BMW Browser Notebook
metadata:
  version: 1
  template: bmw
cells:
  - markdown:
      id: overview
      title: Overview
      source: |
        This browser notebook adapts the BMW vignette into executable model, run,  and chart cells. It focuses on a Newton baseline and two scenario comparisons.
      more: |
        The **BMW** model — Godley & Lavoie's _"model with private bank money"_
        (_Monetary Economics_, 2007, chapter 7) — is the first model in the book where
        money is **inside money** created by private banks rather than the **outside
        money** issued by government in SIM (chapter 3). It is the bridge from a pure
        government-money economy to a genuine credit economy.

        Two big things arrive in chapter 7 that SIM did not have:

        - **Banks and bank money.** A banking sector makes **loans** to firms (`Ld`/`Ls`)
          and accepts **deposits** from households (`Mh`/`Ms`). Deposits are now the
          economy's money, and they are _created by lending_: when a firm borrows to
          invest, the loan simultaneously creates a deposit. This is Godley & Lavoie's
          illustration of the "loans make deposits" view of endogenous money.
        - **Fixed capital and investment.** Firms now own a stock of fixed capital `K`,
          which **depreciates** and must be replaced. Investment `Id` is driven toward a
          **target capital stock** `KT` set by a stock-flow norm (`kappa`), so the model
          has real accumulation, not just a circular flow.

        The economy still has three sectors — **households**, **production firms**, and
        **banks** — but now the firms hold real assets (capital) financed by bank loans,
        and households hold their wealth as bank deposits. Banks are pure
        intermediaries: they pay the same rate on deposits that they charge on loans
        (`rm = rl`), so they make zero profit and have zero net worth.
  - matrix:
      id: balance-sheet
      sourceRunCellId: baseline-run
      title: BMW balance sheet
      description: Balance-sheet matrix for the BMW model, following the sfcr article presentation.
      note: Source structure adapted from the sfcr BMW article balance-sheet display.
      more: |
        This is the BMW **balance sheet** (Table 7.1 in Godley & Lavoie). Compared with
        SIM's single-asset world, three things stand out:

        - **A real asset exists.** Production firms own fixed capital `+K`; it appears
          only once, in the firms' column, and it is the one item with no offsetting
          financial counterpart — it is the economy's tangible net worth.
        - **Inside money replaces outside money.** Households hold their wealth as bank
          **deposits** `+Mh`; banks record the same amount as a liability `-Ms`. Firms'
          capital is financed by bank **loans** `-Ld`, which the banks hold as an asset
          `+Ls`.
        - **Banks net to zero.** With `Ms = Ls` the banking column's assets and
          liabilities cancel, so banks carry no net worth — exactly the role of a pure
          intermediary.

        Reading across each financial row sums to zero (one sector's asset is another's
        liability), and the net-worth row closes each column. Household net worth `Vh`
        equals their deposits; the firms' net worth `V` is their capital less their
        loans. In the stationary state these accounting links pin every financial stock
        to the size of the capital stock (see the baseline panels below).
      columns: [Households, Production firms, Banks, Sum]
      sectors: [Households, Firms, Banks, ""]
      accountingKind: balance-sheet
      rows:
        - [Deposits, Money deposits, +Mh, "", -Ms, "0"]
        - [Loans, Loans, "", -Ld, +Ls, "0"]
        - [Investment, Fixed capital, "", +K, "", +K]
        - [Balance, Balance (net worth), -Vh, -V, "0", "0"]
        - [Sum, Sum, "0", "0", "0", "0"]
  - matrix:
      id: transactions-flow
      sourceRunCellId: baseline-run
      title: BMW transactions-flow matrix
      description: Transactions-flow matrix for the BMW model, shown in the same accounting style as the sfcr article.
      note: Signs and row structure follow the BMW transactions-flow matrix in the sfcr article.
      more: |
        The **transactions-flow matrix** (Table 7.2 in Godley & Lavoie) is the heart of
        the SFC method. Every cell is a payment _out of_ one sector (a minus) that is
        simultaneously a receipt _into_ another (a plus), so:

        - **every row sums to zero** — each transaction has a payer and a payee;
        - **every column sums to zero** — each sector's outlays plus its saving exhaust
          its receipts (its budget constraint).

        BMW adds rows that SIM never had, and they are what make it a credit economy:

        - **Investment and depreciation.** Firms buy investment goods (`Is`/`Id`) and set
          aside **amortization funds** `AF` out of the value of output to replace worn-out
          capital. `AF` is firms' internal saving — it lowers the wage bill rather than
          becoming profit.
        - **Interest flows.** Firms pay interest `rl[-1]*Ld[-1]` on last period's loans;
          households receive interest `rm[-1]*Mh[-1]` on last period's deposits. Because
          `rm = rl`, the bank passes loan interest straight through to depositors.
        - **Loan and deposit changes.** The bottom rows, `d(Ld)` and `d(Mh)`, are where
          the flow matrix meets the balance sheet: new lending and new deposits are the
          _flows_ that change the _stocks_.

        Splitting firms and banks into **current** and **capital** sub-columns shows the
        financing story directly: firms' capital account borrows `+d(Ld)` to cover the
        part of investment not paid for out of amortization funds, `Id - AF`.
      columns: [Households, Firms_current, Firms_capital, Banks_current, Banks_capital, Sum]
      sectors: [Households, Firms, Firms, Banks, Banks, ""]
      accountingKind: transactions-flow
      rows:
        - [Consumption, Consumption, -Cs, +Cd, "", "", "", "0"]
        - [Investment, Investment, "", +Is, -Id, "", "", "0"]
        - [Wages, Wages, +WBs, -WBd, "", "", "", "0"]
        - [Depreciation, Depreciation, "", -AF, +AF, "", "", "0"]
        - [Loans, Interest loans, "", "-rl[-1]*Ld[-1]", "", "+rl[-1]*Ls[-1]", "", "0"]
        - [Deposits, Interest on deposits, "+rm[-1]*Mh[-1]", "", "", "-rm[-1]*Ms[-1]", "", "0"]
        - [Loans, Ch. loans, "", "", +d(Ld), "", -d(Ls), "0"]
        - [Deposits, Ch. deposits, -d(Mh), "", "", "", +d(Ms), "0"]
        - [Sum, Sum, "0", "0", "0", "0", "0", "0"]
  - matrix:
      id: account-transactions
      collapsed: false
      sourceRunCellId: baseline-run
      title: BMW account transactions
      description: Account-level transaction matrix for BMW with hierarchical sector and account columns.
      note: Columns group balance-sheet accounts by sector. Use Expand all / Collapse all or click sector headers to show or hide account columns.
      more: |
        This account-level view expands the transactions-flow matrix into the individual
        balance-sheet accounts behind each sector, so you can trace a single event
        through every ledger it touches. It is the most literal expression of Godley's
        **quadruple-entry** principle: one transaction moves four account entries at
        once.

        Use _Expand all_ / _Collapse all_, or click a sector header, to reveal or hide
        the account columns grouped under **Households**, **Firms**, and **Banks**. The
        asset / liability / equity badges on each column show how every flow lands on
        one side of some sector's books and is matched on another's — the visual proof
        that the accounting is watertight.
      columns: [Deposits (Mh), Net_Worth (Vh), Deposits (Mf), Capital, Loans, Net_Worth (Vf), Firm.Loans, HH.Deposits, Firm.Deposits, Net_Worth (Vb), Sum]
      sectors: [Households(HH), Households(HH), Firms, Firms, Firms, Firms, Banks, Banks, Banks, Banks, ""]
      columnBadges: [asset, equity, asset, asset, liability, equity, asset, liability, liability, equity, ""]
      accountingKind: account-transactions
      rows:
        - [Initial, Initial values, "", "", "", "", "", "", "", "", "", "", "0"]
        - [Wages, Wages, WBd, WBd, -WBd, "", "", "", "", -WBd, +WBd, "", "0"]
        - [Consumption, Consumption, -Cs, -Cs, +Cd, "", "", +Cd, "", +Cs, -Cd, "", "0"]
        - [Investment, Investment, "", "", +Is, -Is, "", "", "", "", "", "", "0"]
        - [Depreciation, Depreciation, "", "", -AF, +AF, "", "", "", "", "", "", "0"]
        - [Loans, Interest loans, "", "", -rl'*Ld', "", "", -rl'*Ld', "", "", +rl'*Ld', "", "0"]
        - [Deposits, Interest on deposits, +rm'*Mh', +rm'*Mh', "", "", "", "", "", rm'•Mh', "", "", "0"]
        - [Loans, Ch. loans, "", "", d(Ld), "", d(Ls), "", +d(Ls), "", d(Ld), "", "0"]
        - [Deposits, Ch. deposits, "", "", "", "", "", +d(K), "", "", "", "", "0"]
        - [Sum, Sum, Mh, Vh, Mf, "", Ls, "", "", "", "", "", "0"]
  - sequence:
      id: transaction-flow-sequence
      title: BMW transaction flow sequence
      source:
        kind: matrix
        matrixCellId: transactions-flow
      participantColumnOrder:
        - Households
        - Firms_current
        - Firms_capital
        - Banks_current
        - Banks_capital
      description: Canvas-rendered sequence view generated from the transactions-flow matrix at the selected simulation period.
      note: Use Reset and Next step to manually reveal flows in order.
      more: |
        This is the same transactions-flow matrix read **column by column** as each
        sector's budget identity, animated step by step. Following the columns shows the
        _monetary circuit_ of a credit economy within a single period:

        - firms borrow and spend on investment and wages;
        - wages and deposit interest become household income;
        - households consume (returning money to firms) and bank the rest as deposits;
        - firms use sales plus amortization funds to repay/extend loans.

        Use **Reset** and **Next step** to reveal the flows in order and watch how new
        bank lending and new household deposits are two sides of the same act of
        money creation.
  - equations:
      id: equations-bmw
      title: BMW model
      modelId: bmw
      collapsed: false
      more: |
        These are the equations of model BMW, following Godley & Lavoie chapter 7. They
        fall into a few natural groups:

        - **Equilibrium by quantity adjustment.** `Cs = Cd`, `Is = Id`, `Ns = Nd`, and
          `Ls = Ld`: supply equals demand not through prices but because firms and banks
          simply meet whatever is demanded. Output is `Y = Cs + Is`.
        - **Firms, capital and investment.** Capital accumulates as
          `K = lag(K) + (Id - DA)*dt`, where `DA = delta*lag(K)` is depreciation.
          Investment chases a **target capital stock** `KT = kappa*lag(Y)` via
          `Id = gamma*(KT - lag(K)) + DA`: firms close a fraction `gamma` of the gap to
          target each period and always replace what depreciates. In a stationary state
          `KT = K`, so `Id = DA` and **net investment is zero**.
        - **Financing and the wage bill.** Firms keep amortization funds
          `AF = delta*lag(K)` and pay interest `lag(rl)*lag(Ld)` before paying wages, so
          `WBd = Y - lag(rl)*lag(Ld) - AF`. There are no pure profits. New borrowing
          covers the rest of investment: `Ld = lag(Ld) + (Id - AF)*dt`.
        - **Households.** Disposable income is wages plus deposit interest,
          `YD = WBs + lag(rm)*lag(Mh)`. The behavioural core is the consumption function
          `Cd = alpha0 + alpha1*YD + alpha2*lag(Mh)` — an autonomous term `alpha0`, a
          propensity `alpha1` to consume out of income, and a smaller propensity `alpha2`
          to consume out of accumulated deposit wealth. Unspent income is banked:
          `Mh = lag(Mh) + Households.Deposits*dt`.
        - **Banks.** The deposit rate tracks the loan rate, `rm = rl`, and deposit and
          loan supplies grow with new lending: `Ms = lag(Ms) + d(Ls)*dt`.

        **The redundant equation.** As in every SFC model, one equation is implied by all
        the others. Here it is `Ms = Mh`: the deposits banks issue always equal the
        deposits households hold. It is never imposed on the solver — it _emerges_, and
        checking that it holds is how you know the accounting is leak-free (see the
        solver note).
      rows:
        - Equalize supply to demand.
        - [Cs, Cd, "Consumption goods supply", $/year, flow, definition]
        - Production Firms
        - [Is, Id, "Supply of investment goods", $/year, flow, definition]
        - [Y, Cs + Is, "Income = GDP", $/year, flow, identity, eq-5-Y]
        - [WBd, Y - lag(rl) * lag(Ld) - AF, "Wage bill - demand", $/year, flow, identity, eq-6-WBd]
        - [AF, delta * lag(K), "Amortization funds", $/year, flow, definition, eq-7-AF]
        - [DA, delta * lag(K), "Depreciation allowance", $/year, flow, definition, eq-18-DA]
        - [Ld, lag(Ld) + (Id - AF) * dt, "Demand for bank loans", $, stock, accumulation]
        - [KT, kappa * lag(Y), "Target stock of capital", $, stock, target, eq-19-KT]
        - [K, K' + (Id - DA) • dt, "Stock of capital", $, stock, accumulation, eq-17-K]
        - [Id, gamma * (KT - lag(K)) + DA, "Demand for investment goods", $/year, flow, behavioral, eq-20-Id]
        - [Mf, Mf' + Firms.Deposits * dt, "Stock accumulation from Firms.Deposits (Mf)", $, stock, accumulation, eq-mf]
        - Wage bill
        - [Ns, Nd, "Supply of labor", items/year, flow, definition]
        - [WBs, W * Ns, "Wage bill - supply", $/year, flow, identity, eq-13-WBs]
        - [Nd, Y / pr, "Demand for labor", items/year, flow, definition, eq-14-Nd]
        - [W, WBd / Nd, "Wage rate", $/item, aux, definition, eq-15-W]
        - Households.
        - [YD, WBs + lag(rm) * lag(Mh), "Disposable income of households", $/year, flow, identity, eq-9-YD]
        - [Cd, alpha0 + alpha1 * YD + alpha2 * lag(Mh), "Consumption goods demand by households", $/year, flow, behavioral, eq-16-Cd]
        - [Mh, Mh' + Households.Deposits * dt, "Stock accumulation from Households.Deposits (Mh)", $, stock, accumulation, eq-10-Mh]
        - [Vh, Vh' + Households.Net_Worth * dt, "Stock accumulation from Households.Net_Worth (Vh)", $, stock, accumulation, eq-vh]
        - Banks
        - [rm, rl, "Rate of interest on bank deposits", 1/year, aux, definition, eq-12-rm]
        - [Ls, lag(Ls) + d(Ld) * dt, "Supply of bank loans", $, stock, accumulation]
        - [Ms, lag(Ms) + d(Ls) * dt, "Supply of bank deposits", $, stock, accumulation, eq-11-Ms]
  - sequence:
      id: sequence-cld
      title: Causal loop diagram
      source:
        kind: cld
        modelId: bmw
      collapsed: false
      more: |
        The **causal loop diagram** turns the equation list into a directed graph of who
        drives whom. It is the quickest way to see BMW's central feedback loop: higher
        output raises the target capital stock `KT`, which lifts investment `Id`, which
        (through `Y = Cs + Is`) raises output again — the accelerator — while the
        consumption-out-of-wealth term `alpha2*lag(Mh)` and depreciation provide the
        damping that pulls the economy to a stationary state.
  - solver:
      id: solver-bmw
      title: Solver options
      modelId: bmw
      collapsed: true
      more: |
        BMW is solved period by period with a **Newton** method: lagged stocks
        (`lag(K)`, `lag(Ld)`, `lag(Mh)`, …) are known from the previous period, and the
        within-period equations are solved simultaneously for the current flows and
        end-of-period stocks.

        The solver's **hidden variables** `Ms` (left) and `Mh` (right) implement the
        redundant-equation check. Because one equation in the system is redundant, the
        equality `Ms = Mh` is _not_ used to find the solution — instead the solver
        verifies, to tolerance `hiddenTolerance`, that the independently computed deposit
        supply and deposit demand agree every period. If they ever diverged, the model's
        accounting would be leaking. This is the numerical embodiment of Godley &
        Lavoie's consistency requirement.
      method: newton
      tolerance: "1e-10"
      maxIterations: 100
      defaultInitialValue: "1e-15"
      hiddenLeftVariable: Ms
      hiddenRightVariable: Mh
      hiddenTolerance: "0.00001"
      relativeHiddenTolerance: false
  - externals:
      id: parameters-bmw
      title: Externals
      modelId: bmw
      collapsed: true
      more: |
        These are the exogenous parameters and policy levers of BMW:

        - `rl` = 0.025 — the loan rate of interest, set exogenously by the banks; the
          deposit rate follows it via `rm = rl`.
        - `alpha0` = 20 — autonomous consumption (the variable shocked in Scenario 1).
        - `alpha1` = 0.75 — propensity to consume out of disposable income (shocked in
          Scenario 2).
        - `alpha2` = 0.1 — propensity to consume out of accumulated deposit wealth.
        - `delta` = 0.1 — the depreciation rate of fixed capital.
        - `gamma` = 0.15 — the speed at which investment closes the gap to target capital.
        - `kappa` = 1 — the target capital-output ratio (`KT = kappa*lag(Y)`).
        - `pr` = 1 — labour productivity.

        These numbers determine the whole stationary state. Combining the steady-state
        conditions (`KT = K`, `Id = DA`, constant deposits so `Cd = YD`) gives a clean
        closed form for stationary output:

        `Y* = alpha0 / ((1 - delta*kappa)*(1 - alpha1) - alpha2*kappa)`

        With these values the denominator is `0.9*0.25 - 0.1 = 0.125`, so
        `Y* = 20 / 0.125 = 160` — exactly the level the baseline converges to.
      rows:
        - [rl, 0.025, "Rate of interest on bank loans, set exogenously", 1/year, aux]
        - [alpha0, 20, "Exogenous component in consumption", $/year, aux]
        - [alpha1, 0.75, "Propensity to consume out of income", "", aux]
        - [alpha2, 0.1, "Propensity to consume out of wealth", 1/year, aux]
        - [delta, 0.1, "Depreciation rate", 1/year, aux]
        - [gamma, 0.15, "Speed of adjustment of capital to its target value", 1/year, aux]
        - [kappa, 1, "Capital-output ratio", year, aux]
        - [pr, 1, "Labor productivity", $/item, aux]
  - initial-values:
      id: initial-values-bmw
      title: Initial values
      modelId: bmw
      collapsed: true
      more: |
        BMW carries no inherited stocks: capital, loans and deposits all start from
        (effectively) zero, set by the solver's tiny `defaultInitialValue`. The economy
        therefore begins far below its stationary state and has to _build up_ its capital
        stock and money stock from scratch — which is what produces the long, smooth
        climb in the baseline run.
      rows: []
  - run:
      id: baseline-run
      title: Baseline run with Newton
      note: This Newton baseline provides the reference path for the BMW scenarios.
      description: Run the baseline for 50 periods using the Newton solver to generate the reference path for the BMW scenarios.
      mode: baseline
      periods: 50
      resultKey: bmw_newton
      sourceModelId: bmw
      more: |
        The baseline integrates BMW forward for 50 periods from near-zero stocks, with
        all parameters held at the values above. With no capital and no deposits
        inherited from the past, the economy starts well below its stationary state and
        **accumulates** its way up: firms borrow to build the capital stock, that lending
        creates the deposits households hold as wealth, and the system converges to a
        stationary state in which net investment is zero and all stocks stop growing.
        This run is the reference path for both scenarios.
  - chart:
      id: chart-1
      title: Baseline headline variables
      description: Chart of key variables in the baseline run to show the model's dynamic behavior over time.
      note: This chart shows the time paths of selected variables in the baseline run, which serves as the reference for the scenario comparisons.
      more: |
        In the baseline, output `Y` and disposable income `YD` rise quickly at first and
        then converge as the capital stock approaches its target and net investment fades
        to zero. The mechanism is the interaction of the accelerator (investment chasing
        `KT = kappa*lag(Y)`) with consumption out of accumulated deposits
        (`alpha2*lag(Mh)`): both strengthen as stocks build, until saving and replacement
        investment exactly balance.

        The numbers match the steady-state arithmetic of the model:

        - output converges to `Y* = alpha0 / ((1 - delta*kappa)*(1 - alpha1) - alpha2*kappa) = 160`;
        - consumption to `Cd = Y*(1 - delta*kappa) = 144`, which also equals disposable
          income `YD = 144` (in the stationary state households consume all their income);
        - gross investment to `Id = DA = delta*K = 16`, i.e. **net investment is zero**;
        - the wage rate settles at `W = 0.875` — pinned because, with `kappa = 1`,
          `WBd = Y - rl*K - delta*K = Y*(1 - rl - delta)` while `Nd = Y`, so
          `W = 1 - rl - delta = 1 - 0.025 - 0.1`.
      variables:
        - Y
        - YD
        - Cd
        - Id
        - W
      axisMode: shared
      axisSnapTolarance: 0.1
      niceScale: true
      sourceRunCellId: baseline-run
  - table:
      id: table-1
      title: Baseline variable summary
      note: Table of selected variables for the baseline run, showing values at each period.
      description: This table shows the values of key variables in the baseline run across all periods.
      more: |
        The table makes the convergence concrete. Watch the capital stock `K` climb and
        flatten as `Id` falls toward `DA` (the moment net investment hits zero), and
        watch the household deposit stock `Mh` rise alongside it.

        The most striking feature of the stationary state is that **every stock ends up
        equal**: `K = Ld = Ls = Mh = Ms = 160`. This is forced by the accounting.
        Capital is fully loan-financed, so `Ld = K`; banks net to zero, so `Ms = Ls = Ld`;
        and the redundant equation gives `Mh = Ms`. With `kappa = 1` the common stock also
        equals output, `K = kappa*Y = Y = 160`. The whole financial superstructure of the
        economy is exactly the size of its capital stock.
      variables:
        - Y
        - Id
        - DA
        - K
        - Ld
        - Ls
        - Mh
        - Ms
      sourceRunCellId: baseline-run
  - markdown:
      id: scenario-1-note
      title: Scenario 1
      source: Scenario 1 increases autonomous consumption expenditure by raising alpha0 from period 5 to period 50.
      more: |
        Scenario 1 is a permanent **upward shift in autonomous consumption**: `alpha0` is
        raised from 20 to 30 from period 5 onward, holding every other parameter fixed.
        Households decide to spend more independently of their income and wealth, and the
        question is where the economy settles as a result.
  - run:
      id: scenario-1-run
      title: "Scenario 1: autonomous consumption shock"
      note: This scenario applies a shock to autonomous consumption by increasing alpha0 for a period of time
      description: allowing us to see the effect on the economy compared to the baseline.
      mode: scenario
      scenario:
        shocks:
          - rangeInclusive:
              - 5
              - 50
            variables:
              alpha0:
                kind: constant
                value: 30
            startPeriodInclusive: 5
            endPeriodInclusive: 50
      baselineRunCellId: baseline-run
      periods: 50
      resultKey: bmw_s1
      sourceModelId: bmw
      baselineStartPeriod: 40
      more: |
        The scenario re-solves the model with `alpha0` stepped up to 30 from period 5,
        plotted against the baseline as a reference. Because only `alpha0` changes, the
        contrast isolates the pure effect of a stronger consumption stance on output,
        investment and the economy's stocks.
  - chart:
      id: scenario-1-chart
      title: "Scenario 1: output, investment and stocks"
      more: |
        Raising `alpha0` from 20 to 30 moves the economy to a **new, higher** stationary
        state. Since stationary output is `Y* = alpha0 / 0.125 = 8*alpha0` here, output
        rises from `160` to `8*30 = 240`. In fact the entire stationary state scales up
        **in exact proportion** (×1.5): consumption `Cd` goes `144 → 216`, gross
        investment `Id` goes `16 → 24`, and the capital, loan and deposit stocks all rise
        `160 → 240`.

        Two of Godley & Lavoie's points show up clearly:

        - **Real and financial stocks move together.** More consumption demand pulls up
          output, the target capital stock, and hence investment; the extra investment is
          loan-financed, so loans and the deposits backing them grow in lockstep.
        - **The wage rate is unchanged at `W = 0.875`.** Because `W = 1 - rl - delta`
          depends only on the interest and depreciation rates, a pure demand shift
          changes the _scale_ of the economy but not this intensive price.
      variables:
        - Cd
        - Id
        - K
        - W
      axisMode: shared
      axisSnapTolarance: 0.1
      niceScale: true
      sharedRange:
        includeZero: true
      sourceRunCellId: scenario-1-run
  - run:
      id: scenario-2-run
      title: "Scenario 2: propensity-to-save shock"
      description: Scenario 2 lowers alpha1 from period 5 to period 50 to examine the effect of a higher propensity to save.
      mode: scenario
      scenario:
        shocks:
          - rangeInclusive:
              - 5
              - 50
            variables:
              alpha1:
                kind: constant
                value: 0.7
            startPeriodInclusive: 5
            endPeriodInclusive: 50
      baselineRunCellId: baseline-run
      periods: 50
      resultKey: bmw_s2
      sourceModelId: bmw
      more: |
        Scenario 2 is a **paradox-of-thrift** experiment: the propensity to consume out
        of income `alpha1` is lowered from 0.75 to 0.70 from period 5 onward — households
        decide to _save more_. The run is solved from the baseline's stationary state and
        plotted against the baseline, so the chart shows the transition to the new,
        thriftier equilibrium.

        The result is the classic Keynesian paradox, intact in a full SFC model: trying
        to save a larger fraction of income makes the economy **smaller**. Stationary
        output falls from `160` to
        `Y* = 20 / ((1 - 0.1)*(1 - 0.70) - 0.1) = 20 / 0.17 ≈ 117.6`, dragging the
        capital stock, loans and deposits down with it (all settle near `117.6`). Less
        spending means a smaller desired capital stock, less investment, less lending,
        and ultimately less income.
  - chart:
      id: scenario-2-chart
      title: Scenario 2 headline variables
      more: |
        With the higher saving propensity, consumption `Cd` and disposable income `YD`
        both settle at a permanently **lower** level (≈ `105.9`, against `144` in the
        baseline) as the economy contracts to its smaller stationary state. The wage rate
        `W` again stays at `0.875`: as in Scenario 1, the demand-side parameter changes
        the size of the economy but not the interest-and-depreciation-determined wage.
        The contraction is the mirror image of Scenario 1 — a reminder that in BMW, as in
        SIM, the long-run level of activity is governed by the spending decisions
        embedded in the consumption function.
      variables:
        - Cd
        - YD
        - W
      sharedRange:
        includeZero: true
      sourceRunCellId: scenario-2-run
  - sequence:
      id: equation-dependency-graph
      title: BMW equation dependency graph
      source:
        kind: dependency
        modelId: bmw
        showAccountingStrips: true
        showExogenous: false
      description: Dependency view of the BMW equations organized by sector strips and accounting bands.
      note: Use this alongside the transaction-flow sequence to compare accounting flows with equation structure.
      collapsed: true
      more: |
        The **dependency graph** lays the equations out by sector strip and accounting
        band, showing the order in which variables are computed within a period and how
        the household, firm and bank blocks connect. Read it alongside the
        transactions-flow sequence to compare the _equation_ structure (what determines
        what) with the _accounting_ structure (what pays what) — two views of the same
        stock-flow-consistent model.
