src.projection_entities.products.annuity.base_contract.account.Account¶
- class src.projection_entities.products.annuity.base_contract.account.Account(time_steps: TimeSteps, data_sources: AnnuityDataSources, account_data_source: Account)¶
Abstract base class for a sub-account within a policy.
Inheritance Diagram

Variables & Properties
Data sources to initialize projection values.
account_data_sourceList of premium payments.
New premiums received.
Cumulative premiums received.
Sub-account value.
Interest credited.
GMDB rider charge assessed against sub-account.
GMWB rider charge assessed against sub-account.
Withdrawal amount apportioned to sub-account.
Surrender charge.
Methods
__init__(time_steps, data_sources, ...)Constructor method.
Abstract method that represents an interest crediting mechanism.
process_charge(charge_amount, ...)Applies a charge to a specific charge account and reduces the
account value.Processes premiums paid for a single time step by looping through each premium and calling the
process_withdrawal(withdrawal_amount)Reduces
account valueby a withdrawal amount and records thewithdrawal amount.Updates the
surrender chargefor this sub-account.write_projection_values(output_file_path)Writes all
ProjectionValueattributes in this projection entity to a CSV file.Convenience method that writes
ProjectionValueattributes for itself, as well as any nestedProjectionEntityattributes.Details
- __init__(time_steps: TimeSteps, data_sources: AnnuityDataSources, account_data_source: Account)¶
Constructor method. Creates a new sub-account.
- Parameters:
time_steps – Projection-wide timekeeping object.
data_sources – Annuity data sources.
account_data_source – Account data source to initialize this sub-account.
- account_value: ProjectionValue¶
Sub-account value.
- abstract credit_interest() None¶
Abstract method that represents an interest crediting mechanism. Inherit and override to implement a custom crediting algorithm (e.g. RILA, separate account crediting, or indexed crediting).
- Returns:
Nothing.
- data_sources: AnnuityDataSources¶
Data sources to initialize projection values.
- gmdb_charge: ProjectionValue¶
GMDB rider charge assessed against sub-account.
- gmwb_charge: ProjectionValue¶
GMWB rider charge assessed against sub-account.
- init_t: date¶
Initial time step. Marks when this entity first came into existence.
- interest_credited: ProjectionValue¶
Interest credited.
Cumulative premiums received.
New premiums received.
List of premium payments.
- process_charge(charge_amount: float, charge_account_name: str) None¶
Applies a charge to a specific charge account and reduces the
account value.- Parameters:
charge_amount – Withdrawal amount.
charge_account_name – Charge account name.
- Returns:
Nothing.
Processes premiums paid for a single time step by looping through each premium and calling the premium’s
update_premium()method.Instantiates new premium payments, adding them to
premiums.Updates
premium_new,premium_cumulative, andaccount_valuefor new premiums.
- Returns:
Nothing.
- process_withdrawal(withdrawal_amount: float) None¶
Reduces
account valueby a withdrawal amount and records thewithdrawal amount.- Parameters:
withdrawal_amount – Withdrawal amount.
- Returns:
Nothing.
- surrender_charge: ProjectionValue¶
Surrender charge.
- update_surrender_charge() None¶
Updates the
surrender chargefor this sub-account.- Returns:
Nothing.
- withdrawal: ProjectionValue¶
Withdrawal amount apportioned to sub-account.
- write_projection_values(output_file_path: str) None¶
Writes all
ProjectionValueattributes 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
ProjectionValueattributes for itself, as well as any nestedProjectionEntityattributes.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.