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

Inheritance diagram of Account

Variables & Properties

data_sources

Data sources to initialize projection values.

account_data_source

premiums

List of premium payments.

premium_new

New premiums received.

premium_cumulative

Cumulative premiums received.

account_value

Sub-account value.

interest_credited

Interest credited.

gmdb_charge

GMDB rider charge assessed against sub-account.

gmwb_charge

GMWB rider charge assessed against sub-account.

withdrawal

Withdrawal amount apportioned to sub-account.

surrender_charge

Surrender charge.

Methods

__init__(time_steps, data_sources, ...)

Constructor method.

credit_interest()

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.

process_premiums()

  1. Processes premiums paid for a single time step by looping through each premium and calling the

process_withdrawal(withdrawal_amount)

Reduces account value by a withdrawal amount and records the withdrawal amount.

update_surrender_charge()

Updates the surrender charge for this sub-account.

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_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.

premium_cumulative: ProjectionValue

Cumulative premiums received.

premium_new: ProjectionValue

New premiums received.

premiums: List[Premium]

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.

process_premiums() None
  1. Processes premiums paid for a single time step by looping through each premium and calling the premium’s update_premium() method.

  2. Instantiates new premium payments, adding them to premiums.

  3. Updates premium_new, premium_cumulative, and account_value for new premiums.

Returns:

Nothing.

process_withdrawal(withdrawal_amount: float) None

Reduces account value by a withdrawal amount and records the withdrawal amount.

Parameters:

withdrawal_amount – Withdrawal amount.

Returns:

Nothing.

surrender_charge: ProjectionValue

Surrender charge.

time_steps: TimeSteps

Projection-wide timekeeping object.

update_surrender_charge() None

Updates the surrender charge for this sub-account.

Returns:

Nothing.

withdrawal: ProjectionValue

Withdrawal amount apportioned to sub-account.

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.