Core¶
Top-level entry points: the evaluation-date holder and the library error type.
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_include_todays_cash_flows
¶
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
¶
Return the current setting, or None while it is unset.
Returns:
| Type | Description |
|---|---|
bool | None
|
bool | None: The three-valued flag last set, or None if it has never been set or |
bool | None
|
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".