Skip to content

Results

The results object returned by priced instruments.

results

Runtime source shim for the native itofin.results submodule.

The real itofin.results is a compiled submodule registered into sys.modules by the extension (see crates/itofin-py/src/lib.rs); it wins at import time, so nothing here runs. This file exists only so static type checkers resolve from itofin.results import ... from results.pyi without a reportMissingModuleSource warning.

Auto-generated by scripts/gen_submodule_shims.py from results.pyi; do not edit or delete by hand.

Results

A read-only snapshot of one instrument valuation.

Handed back by every instrument facade's results(), which forces the calculation and then copies the four fields out. It holds a copy, not a view: once taken, an input change reprices the instrument's live accessors and leaves the snapshot reporting the valuation it was taken from.

Every field is optional because the core stores it that way - an engine fills what it computes and leaves the rest unset. The analytic European engine, for one, provides a value but neither an error estimate nor a valuation date.

additional_results is REAL-ONLY: the core keeps the engine's extra outputs behind a type-erased handle whose only sanctioned downcast is to a real, so tags holding anything else are OMITTED from the dict rather than guessed at.

npv property

npv: float | None

The net present value.

Returns:

Type Description
float | None

float | None: The value, or None when the engine provided none.

error_estimate property

error_estimate: float | None

The standard error on the value.

Returns:

Type Description
float | None

float | None: The standard error, or None on the engines that do not produce one, which is every analytic engine here.

valuation_date property

valuation_date: Date | None

The date the value refers to.

Returns:

Type Description
Date | None

Date | None: The valuation date, or None when the engine did not say.

additional_results property

additional_results: dict[str, float]

The engine's extra named outputs, restricted to the real-valued tags.

Returns:

Type Description
dict[str, float]

dict[str, float]: The real-valued tags; see the class docs for why the others are omitted.