src.projection_entities.products.annuity.base_contract.account.ia.IndexedAccount

class src.projection_entities.products.annuity.base_contract.account.ia.IndexedAccount(time_steps: TimeSteps, data_sources: AnnuityDataSources, account_data_source: Account)

Index strategy account.

Inheritance Diagram

Inheritance diagram of IndexedAccount

Variables & Properties

crediting_term_months

Crediting term duration in months.

term_start_date

Crediting term start date.

Methods

__init__(time_steps, data_sources, ...)

Constructor method.

credit_interest()

Credits interest to the sub-account, using this formula:

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.

credit_interest() None

Credits interest to the sub-account, using this formula:

\[ \begin{align}\begin{aligned}index \, growth = \frac{index_{t}}{index_{t-1}} - 1\\interest \, credited = account \, value \times \biggl( max(par \times (min(index \, growth, cap) - spread), floor) \biggr)\end{aligned}\end{align} \]

Where:

Returns:

Nothing.

crediting_term_months: int

Crediting term duration in months.

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.

term_start_date: ProjectionValue

Crediting term start date.

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.