src.data_sources.economic_scenarios.EconomicScenarios

class src.data_sources.economic_scenarios.EconomicScenarios(path: str)

Data source collection that holds all economic stochastic scenarios.

Inheritance Diagram

Inheritance diagram of EconomicScenarios

Variables & Properties

items

A list of all the items in this collection, as a set of key-value pairs.

keys

A list of all the keys in this collection.

rates

List of rates in the economic scenario file.

Methods

__init__(path)

Constructor method.

Details

__init__(path: str)

Constructor method. Reads data from a CSV file and instantiates economic scenarios, organized by scenario index.

Relative path to the economic scenario file:

resource/annuity/economic_scenarios.csv

Parameters:

path – Path to an economic scenario file.

cache: DataFrame

Internal cache, populated at runtime.

property items: List[Tuple[K, V]]

A list of all the items in this collection, as a set of key-value pairs.

Returns:

List of key-value pairs.

property keys: List[K]

A list of all the keys in this collection.

Returns:

List of keys.

rates: List[str]

List of rates in the economic scenario file.