src.projections.annuity.base.economic_liability.EconomicLiabilityProjection

class src.projections.annuity.base.economic_liability.EconomicLiabilityProjection(projection_parameters: ProjectionParameters, data_sources: AnnuityDataSources)

Sample annuity economic liability projection.

Inheritance Diagram

Inheritance diagram of EconomicLiabilityProjection

Variables & Properties

data_sources

Annuity data sources.

economy

Economy projection entity.

base_contract

Base contract projection entity.

Methods

__init__(projection_parameters, data_sources)

Constructor method.

halt_projection()

By default, evaluating this method can trigger a halt in the main projection loop.

project_time_step()

Annuity Economic Liability Projection transaction order and method calls within a single time step.

run_projection()

Runs the main projection loop, projecting forward one time step at a time.

setup_output()

Creates a nested output directory structure with the following form:

write_output()

Convenience method that writes output for projection entity members.

Details

__init__(projection_parameters: ProjectionParameters, data_sources: AnnuityDataSources)

Constructor method. Sets the starting time step and declares projection entities. Override this method to declare additional projection entities.

Parameters:
  • projection_parameters – Set of projection parameters.

  • data_sources – Data sources to be read at runtime.

base_contract: BaseContract

Base contract projection entity.

data_sources: AnnuityDataSources

Annuity data sources.

economy: Economy

Economy projection entity.

halt_projection() bool

By default, evaluating this method can trigger a halt in the main projection loop. Override this method to define custom halt logic. For example, halting when the policy count reaches zero.

The default behavior is to never halt the projection.

Returns:

Boolean to indicate whether the projection should be halted.

output_dir_path: str

Output directory path to place projection output.

project_time_step() None

Annuity Economic Liability Projection transaction order and method calls within a single time step.

Returns:

Nothing.

projection_parameters: ProjectionParameters

Projection parameters.

run_projection() None

Runs the main projection loop, projecting forward one time step at a time. Override this method to create a custom projection loop.

Returns:

Nothing.

setup_output() None

Creates a nested output directory structure with the following form:

\ Model point ID
    \ Economic scenario number
Returns:

Nothing.

time_steps: TimeSteps

Projection-wide timekeeping object.

write_output() None

Convenience method that writes output for projection entity members. Note that this function behaves recursively, and will write output for nested projection entity members as well.

Returns:

Nothing.