valuation_context
ValuationContext: long-lived mutable context updated once per valuation date.
Classes:
-
ValuationContext–Holds the shared valuation state (date, market data, term structure) for a single valuation run.
ValuationContext
ValuationContext(
yield_handle: RelinkableYieldTermStructureHandle,
benchmark_service: BenchmarkService | None = None,
)
Holds the shared valuation state (date, market data, term structure) for a single valuation run.
Methods:
-
update–Advance the context to date and rebuild the term structure from market_data.
update
update(date: date, market_data: MarketDataStore) -> None
Advance the context to date and rebuild the term structure from market_data.
Sets the QuantLib global evaluation date, builds a new term structure from the market data yields, and relinks the shared handle so all downstream engines reprice automatically.