gcubed.projections.derivation_definitions.bond_rates

def calculate_bond_rates( bond_rates_variable_name_prefix: str, term: int, short_rates: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame:

Overview

Utility method that returns the compounding long rates given the yearly rates.

Arguments

variable_name_prefix: the variable name prefix for the bond rate variable to be calculated.

term: the number of years of the term of the instrument. 2 for a 2 year bond. Valid values are any integer above 1.

rates: a dataframe with a row for the projections of each of the 1 year interest rates to be used in the bond rate calculations. The row index is the variable names of the 1 year interest rates. The column indices are ordered YYYY years (represented as strings). Rates are interpreted as percentages so 1% is expected to be given as 1.0.

Returns the long rates that can be computed from the one year rates. This series is shorter than the series of one year rates because the required data is not available for the last (term-1) observations. It is padded with NaN values in the returned dataframe.

def BOND_RATE( long_rate_variable_name_prefix: str, short_rate_variable_name_prefix: str, term: int, description: str) -> gcubed.projections.derivation.Derivation:

The BOND rate derivation object.

Arguments

long_rate_variable_name_prefix: the variable name prefix for the long rate variable to be calculated.

short_rate_variable_name_prefix: the variable name prefix for the short rate variable to be used in the bond rate calculations.

term: the number of years of the term of the instrument. 2 for a 2 year bond.

description: the label for the bond rate variable.

Derivation of the 2-year long-term nominal interest rate.

Returns: Derivation: Configured derivation for 2-year nominal interest rates.

Derivation of the 2-year long-term nominal interest rate.

Returns: Derivation: Configured derivation for 2-year nominal interest rates.

Derivation of the 2-year long-term nominal interest rate.

Returns: Derivation: Configured derivation for 2-year nominal interest rates.

Derivation of the 2-year long-term real bond rate.

Returns: Derivation: Configured derivation for 2-year real bond rates.

Derivation of the 5-year long-term real bond rate.

Returns: Derivation: Configured derivation for 5-year real bond rates.

Derivation of the 10-year long-term real bond rate.

Returns: Derivation: Configured derivation for 10-year real bond rates.