Piecewise-linear shocks

piecewise_linear joins authored points with straight lines. Before the first point the default is zero. After the last point the default is its final value.

Interpolate between two points

layers:
  - id: gradual_adjustment
    name: Gradual adjustment
    data_file_name: gradual_adjustment.csv
    event_year: 2026
    description: Increase an inflation target gradually
    shocks:
      - variable_prefix: INFX
        selectors:
          - dimension: regions
            members: [USA]
        value_path:
          type: piecewise_linear
          points:
            2026: 0.0
            2029: 3.0
          units: percentage points
Year 2026 2027 2028 2029 2030
Value 0.0 1.0 2.0 3.0 3.0

Several turning points and a zero tail

value_path:
  type: piecewise_linear
  points:
    2026: 0.0
    2028: 2.0
    2030: 1.0
  after_value: 0.0
  units: percentage points
Year 2026 2027 2028 2029 2030 2031
Value 0.0 1.0 2.0 1.5 1.0 0.0

Set both outer values

value_path:
  type: piecewise_linear
  before_value: -1.0
  points:
    2028: 1.0
    2030: 3.0
  after_value: 0.5
  units: percentage points
Year 2026 2027 2028 2029 2030 2031
Value -1.0 -1.0 1.0 2.0 3.0 0.5

points must contain at least one integer year. Duplicate years, non-finite values and years outside the layer period are invalid.

Combine shock projections


This site uses Just the Docs, a documentation theme for Jekyll.