src.projection_entities.products.annuity.base_contract.account.premium.Premium

class src.projection_entities.products.annuity.base_contract.account.premium.Premium(time_steps: TimeSteps, data_sources: AnnuityDataSources, account_id: str, premium_data_source: Premium)

Premium payment.

Inheritance Diagram

Inheritance diagram of Premium

Variables & Properties

premium_year

Calculates the premium age in years, using calc_whole_years().

data_sources

Data sources to initialize projection values.

premium_amount

Premium amount.

premium_age

Time elapsed since premium was paid.

surrender_charge_rate

Point-in-time surrender charge rate.

surrender_charge

Point-in-time surrender charge amount.

Methods

__init__(time_steps, data_sources, ...)

Constructor method.

update_premium()

Projects the premium forwards by one time step by updating premium_age, surrender_charge_rate, and surrender_charge.

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, account_id: str, premium_data_source: Premium)

Constructor method.

Parameters:
  • time_steps – Projection-wide timekeeping object.

  • data_sources – Annuity data sources.

  • account_id – Parent account.

  • premium_data_source – Premium data source to initialize this premium payment.

data_sources: AnnuityDataSources

Data sources to initialize projection values.

init_t: date

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

premium_age: ProjectionValue

Time elapsed since premium was paid.

premium_amount: ProjectionValue

Premium amount.

property premium_year: int

Calculates the premium age in years, using calc_whole_years().

Returns:

Premium age in years.

surrender_charge: ProjectionValue

Point-in-time surrender charge amount.

surrender_charge_rate: ProjectionValue

Point-in-time surrender charge rate.

time_steps: TimeSteps

Projection-wide timekeeping object.

update_premium() None

Projects the premium forwards by one time step by updating premium_age, surrender_charge_rate, and surrender_charge.

Returns:

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.