abaquant.financial_math.rates

Import path: abaquant.financial_math.rates

Domain: Time-value, actuarial, fixed-income, corporate-finance, and portfolio mathematics.

Purpose

Interest-rate conversion and reinvestment calculations.

When to use it

Use these functions for deterministic calculations where explicit cash-flow, rate, compounding, sign, and annualization conventions matter.

Public objects

  • function: nominal_to_effective_rate — Convert a nominal annual rate to an effective annual rate.

  • function: effective_to_nominal_rate — Convert an effective annual rate to a nominal annual rate.

  • function: nominal_to_continuous_rate — Convert a nominal annual rate to a constant force of interest.

  • function: continuous_to_effective_rate — Convert a constant force of interest to an effective annual rate.

  • function: continuous_to_nominal_rate — Convert a constant force of interest to a nominal annual rate.

  • function: convert_nominal_frequency — Convert a nominal annual rate between compounding frequencies.

  • function: reinvestment_table — Build the deterministic year-by-year reinvestment table.

Detailed reference

Interest-rate conversion and reinvestment calculations.

Purpose

The module converts nominal, effective, and continuously compounded rates and constructs deterministic reinvestment tables.

Conventions

Rates are decimal annual rates. Compounding frequencies are positive counts per year.

References

[ 1 ] Kellison, S. G. (2009), The Theory of Interest.

abaquant.financial_math.rates.continuous_to_effective_rate(delta)

Convert a constant force of interest to an effective annual rate.

Parameters:

delta (float) – Constant force of interest in decimal annual units.

Returns:

Computed continuous to effective rate as a dimensionless decimal quantity.

Return type:

float

abaquant.financial_math.rates.continuous_to_nominal_rate(delta, compounds_per_year)

Convert a constant force of interest to a nominal annual rate.

Parameters:
  • delta (float) – Constant force of interest in decimal annual units.

  • compounds_per_year (int | float) – Positive number of nominal compounding periods per year.

Returns:

Computed continuous to nominal rate as a dimensionless decimal quantity.

Return type:

float

abaquant.financial_math.rates.convert_nominal_frequency(nominal_rate, from_frequency, to_frequency)

Convert a nominal annual rate between compounding frequencies.

Parameters:
  • nominal_rate (float) – Nominal annual interest rate in decimal units.

  • from_frequency (int | float) – Original nominal compounding frequency per year.

  • to_frequency (int | float) – Target nominal compounding frequency per year.

Returns:

Computed convert nominal frequency as a scalar in the units implied by the input values.

Return type:

float

abaquant.financial_math.rates.effective_to_nominal_rate(effective_rate, compounds_per_year)

Convert an effective annual rate to a nominal annual rate.

Parameters:
  • effective_rate (float) – Effective annual interest rate in decimal units.

  • compounds_per_year (int | float) – Positive number of nominal compounding periods per year.

Returns:

Computed effective to nominal rate as a dimensionless decimal quantity.

Return type:

float

abaquant.financial_math.rates.nominal_to_continuous_rate(nominal_rate, compounds_per_year)

Convert a nominal annual rate to a constant force of interest.

Parameters:
  • nominal_rate (float) – Nominal annual interest rate in decimal units.

  • compounds_per_year (int | float) – Positive number of nominal compounding periods per year.

Returns:

Computed nominal to continuous rate as a dimensionless decimal quantity.

Return type:

float

abaquant.financial_math.rates.nominal_to_effective_rate(nominal_rate, compounds_per_year)

Convert a nominal annual rate to an effective annual rate.

Parameters:
  • nominal_rate (float) – Nominal annual interest rate in decimal units.

  • compounds_per_year (int | float) – Positive number of nominal compounding periods per year.

Returns:

Computed nominal to effective rate as a dimensionless decimal quantity.

Return type:

float

abaquant.financial_math.rates.reinvestment_table(principal, nominal_rate, years)

Build the deterministic year-by-year reinvestment table.

Parameters:
  • principal (float) – Initial invested amount or loan principal in currency units.

  • nominal_rate (float) – Nominal annual interest rate in decimal units.

  • years (float) – Time horizon in years.

Returns:

Tabular result with the index, column schema, units, and missing-value treatment defined by the module convention.

Return type:

pandas.DataFrame