Skip to main content
CFDL

A series is a dated assumption — a forward price, an index, a rate path — declared once with assume <name> = curve { … } and read by date.

This model declares a three-point power price curve and drives revenue from it, so the price path lives in one place instead of being restated in every amount.

linear interpolates between the stated points; step holds the last point forward. Read a series at the period as inputs.<name>, or at another date with curve_value(inputs.<name>, date).

Note that obs.* is a different thing: observations supplied at run time rather than declared in the model.

model.cfdl

version 0.1
model "tutorial-curves"
time calendar monthly from 2026-01 for 36

entity asset solar : Asset.Real

// A curve is a dated series: a forward price, an index, a rate.
// `linear` says how to find a value between two stated points.
assume power_price = curve linear {
  2026-01: 42.10
  2027-01: 44.75
  2028-01: 46.20
}

// Read it with curve_value(name, date). The value tracks the curve period
// by period, so revenue follows the price without the model restating it.
stream solar.energy_revenue on entity asset.solar inflow currency USD {
  schedule every month from 2026-01 to 2028-12
  amount = 1200 * inputs.power_price
}

stream solar.om on entity asset.solar outflow currency USD {
  schedule every month from 2026-01 to 2028-12
  amount = 9000
}