Skip to main content

inflation_key

Function inflation_key 

pub(crate) fn inflation_key(argument: &Bound<'_, PyAny>) -> PyResult<String>
Expand description

The inflation key a Python market pin names — the same two shapes as projection_key, and the same rule.

A str is the caller’s own spelling, taken as given: market-input-validation states the inflation key is “drawn from no registry”, so there is nothing to look it up against. An Index value answers its code — the registry code where it is a registered index, its name otherwise — because that is the spelling a linked product declares in market_data_needs. Keying under the bare name would pin CPURNSA where a product asks for US-CPI-U, and the curve would never be found.

An index of another kind is refused by name: a projection index binds through with_projection, and silently accepting one here would pin a curve nothing reads.