src.projection_entities.economy.Economy

class src.projection_entities.economy.Economy(time_steps: TimeSteps, data_sources: AnnuityDataSources)

Economy, represented as a collection of indices.

Inheritance Diagram

Inheritance diagram of Economy

Variables & Properties

data_sources

Data sources to initialize projection values.

indexes

List of indices.

Methods

__init__(time_steps, data_sources)

Constructor method.

age_economy()

Projects the Economy forward one time step by calling each index's age_index() method.

write_projection_values(output_file_path)

Writes all ProjectionValue attributes in this projection entity to a CSV file.

write_projection_values_recursively(...)

Convenience method that writes ProjectionValue attributes for itself, as well as any nested ProjectionEntity attributes.

Details

__init__(time_steps: TimeSteps, data_sources: AnnuityDataSources)

Constructor method. Initializes a list of indices from the economic scenarios data source.

Parameters:
  • time_steps – Projection-wide timekeeping object.

  • data_sources – Annuity data sources.

age_economy() None

Projects the Economy forward one time step by calling each index’s age_index() method.

Returns:

Nothing.

data_sources: AnnuityDataSources

Data sources to initialize projection values.

indexes: List[Index]

List of indices.

init_t: date

Initial time step. Marks when this entity first came into existence.

time_steps: TimeSteps

Projection-wide timekeeping object.

write_projection_values(output_file_path: str) None

Writes all ProjectionValue attributes in this projection entity to a CSV file. Existing file will be overwritten.

Parameters:

output_file_path – Output file path.

Returns:

Nothing.

write_projection_values_recursively(output_file_path: str) None

Convenience method that writes ProjectionValue attributes for itself, as well as any nested ProjectionEntity attributes.

This function behaves recursively, writing output for all nested projection entities no matter how deeply they are nested.

Parameters:

output_file_path – Output file path

Returns:

Nothing.