Skip to content

Core

Top-level entry points: the evaluation-date holder and the library error type.

Settings

Settings()

The explicit, non-global evaluation-date store (D5).

There is no global singleton: the exact settings object passed to a construction is the one it reads, so instruments built against different Settings do not see each other's evaluation date.

Create settings with no evaluation date set.

set_evaluation_date

set_evaluation_date(date: Date) -> None

Set the evaluation date, notifying observers if it changed.

The new date is in place before the notification goes out, so an observer that recomputes on the update reads the date that triggered it.

Parameters:

Name Type Description Default
date Date

The new evaluation date. Observers are notified only when this differs from the date already set.

required

set_using_at_par_coupons

set_using_at_par_coupons(value: bool) -> None

Select par or indexed Ibor coupon forecasting before constructing instruments.

This setting does not invalidate already cached prices.

using_at_par_coupons

using_at_par_coupons() -> bool

Return whether Ibor coupons use par forecasting (the default).

set_include_reference_date_events

set_include_reference_date_events(value: bool) -> None

Set the default inclusion of reference-date events for pricing engines.

include_reference_date_events

include_reference_date_events() -> bool

Return the default reference-date event policy.

set_include_todays_cash_flows

set_include_todays_cash_flows(value: Optional[bool]) -> None

Set whether cash flows on today's date enter an NPV; None clears.

The flag is three-valued, as in the core.

Parameters:

Name Type Description Default
value bool | None

True or False decides the question outright; None clears it, restoring the unset state in which each pricing site applies its own default. The argument is required, so clearing is always deliberate.

required

include_todays_cash_flows

include_todays_cash_flows() -> Optional[bool]

Return the current setting, or None while it is unset.

Returns:

Type Description
Optional[bool]

bool | None: The three-valued flag last set, or None if it has never been set or

Optional[bool]

was cleared.

ItofinError

Bases: Exception

Error raised by the itofin API, carrying the located message.

Every fallible core call surfaces as this exception, whose message is the located form "file:line: message".