src.projection_entities.people.annuitants.annuitant.Annuitant

class src.projection_entities.people.annuitants.annuitant.Annuitant(time_steps: TimeSteps, data_sources: AnnuityDataSources, annuitant_data_source: Annuitant)

Single annuitant.

Inheritance Diagram

Inheritance diagram of Annuitant

Variables & Properties

data_sources

Data sources to initialize projection values.

id

Annuitant ID.

gender

Gender.

date_of_birth

Date of birth.

attained_age

Attained age.

base_mortality_rate

Base morality rate.

mortality_improvement_rate

Mortality improvement rate.

mortality_improvement_factor

Mortality improvement factor.

mortality_rate

Final mortality rate.

Methods

__init__(time_steps, data_sources, ...)

Constructor method.

update_mortality()

Projects annuitant forward by one time step.

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, annuitant_data_source: Annuitant)

Constructor method. Initializes an annuitant from a annuitant data source.

Parameters:
  • time_steps – Projection-wide timekeeping object.

  • data_sources – Annuity data sources.

  • annuitant_data_source – Annuitant data source.

attained_age: ProjectionValue

Attained age.

base_mortality_rate: ProjectionValue

Base morality rate.

data_sources: AnnuityDataSources

Data sources to initialize projection values.

date_of_birth: date

Date of birth.

gender: Gender

Gender.

id: str

Annuitant ID.

init_t: date

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

mortality_improvement_factor: ProjectionValue

Mortality improvement factor.

mortality_improvement_rate: ProjectionValue

Mortality improvement rate.

mortality_rate: ProjectionValue

Final mortality rate.

time_steps: TimeSteps

Projection-wide timekeeping object.

update_mortality() None

Projects annuitant forward by one time step.

Returns:

Nothing.

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.