CLEAN
Valuation library for mortgage-backed securities
Public Member Functions | Static Public Member Functions | Friends | List of all members
AndrewKalotayAssociates::Clean::InterestRateModel Class Reference

#include "andrew_kalotay_associates/clean/interest_rate_model.h"

Public Member Functions

 InterestRateModel (const Input::InterestRateModelParameters &parameters, const Date &valuation_date, const Date &settlement_date, const Date &first_mortgage_payment_date, const Input::ParYieldCurve &par_yield_curve, double annualized_volatility, double annualized_mean_reversion=0)
 
 InterestRateModel (const Input::InterestRateModelParameters &parameters, const Date &settlement_date, const Date &first_mortgage_payment_date, const Input::DiscountCurve &discount_curve, double annualized_volatility, double annualized_mean_reversion=0)
 
 InterestRateModel (const Input::InterestRateModelParameters &parameters, const Date &settlement_date, const Date &first_mortgage_payment_date, const Input::SpotCurve &spot_curve, double annualized_volatility, double annualized_mean_reversion=0)
 
void reset (const Input::ParYieldCurve &par_yield_curve, double volatility)
 
void set_volatility (double volatility)
 
const Input::InterestRateModelParametersinput_parameters () const
 
const Dateinput_valuation_date () const
 
const Dateinput_settlement_date () const
 
const Dateinput_first_mortgage_payment_date () const
 
const Input::ParYieldCurveinput_par_yield_curve () const
 
double input_volatility () const
 
double input_mean_reversion () const
 
bool operator! () const
 
double discount (const Date &payment_date) const
 
double discount (const Date &start_date, const Date &payment_date) const
 
double oas_discount (const Date &start_date, const Date &payment_date, double annualized_oas) const
 
const Output::Statusstatus () const
 
Date valuation_date () const
 
Date settlement_date () const
 

Static Public Member Functions

static long laggards_size ()
 Compile-time constant. Cannot be changed by library client.
 

Friends

class AndrewKalotayAssociates::Clean::Mbs
 
class MbsValuation
 
class MbsScenarioAnalysis
 

Detailed Description

Stochastic interest rate model, implemented as a lognormal short rate model with constant volatility.

Calibrated to par yield curve

If specified (see below), bumped models will also be constructed and cached for computing risk measures.

Copy constructor and operator= disabled

Constructor & Destructor Documentation

◆ InterestRateModel() [1/3]

AndrewKalotayAssociates::Clean::InterestRateModel::InterestRateModel ( const Input::InterestRateModelParameters parameters,
const Date valuation_date,
const Date settlement_date,
const Date first_mortgage_payment_date,
const Input::ParYieldCurve par_yield_curve,
double  annualized_volatility,
double  annualized_mean_reversion = 0 
)
Parameters
parameters
valuation_dateDate on which discount factor is 1
settlement_date
first_mortgage_payment_dateDate of first mortgage payment that will be passed to the MBS after the settlement date.
par_yield_curvePar swap or bond rates, usually either Teasury or swap
annualized_volatilityShort rate volatility specified as absolute decimal (0.10 = 10%)
annualized_mean_reversionShort rate mean reversion specified as absolute decimal (0.10 = 10%)

◆ InterestRateModel() [2/3]

AndrewKalotayAssociates::Clean::InterestRateModel::InterestRateModel ( const Input::InterestRateModelParameters parameters,
const Date settlement_date,
const Date first_mortgage_payment_date,
const Input::DiscountCurve discount_curve,
double  annualized_volatility,
double  annualized_mean_reversion = 0 
)
Parameters
parameters
valuation_dateDate on which discount factor is 1
settlement_date
first_mortgage_payment_dateDate of first mortgage payment that will be passed to the MBS after the settlement date.
discount_curveCurve of discount factors
annualized_volatilityShort rate volatility specified as absolute decimal (0.10 = 10%)
annualized_mean_reversionShort rate mean reversion specified as absolute decimal (0.10 = 10%)

◆ InterestRateModel() [3/3]

AndrewKalotayAssociates::Clean::InterestRateModel::InterestRateModel ( const Input::InterestRateModelParameters parameters,
const Date settlement_date,
const Date first_mortgage_payment_date,
const Input::SpotCurve spot_curve,
double  annualized_volatility,
double  annualized_mean_reversion = 0 
)
Parameters
parameters
valuation_dateDate on which discount factor is 1
settlement_date
first_mortgage_payment_dateDate of first mortgage payment that will be passed to the MBS after the settlement date.
spot_curveCurve of spot (also known as zero) rates
annualized_volatilityShort rate volatility specified as absolute decimal (0.10 = 10%)
annualized_mean_reversionShort rate mean reversion specified as absolute decimal (0.10 = 10%)

Member Function Documentation

◆ discount() [1/2]

double AndrewKalotayAssociates::Clean::InterestRateModel::discount ( const Date payment_date) const
Returns
discount factor

◆ discount() [2/2]

double AndrewKalotayAssociates::Clean::InterestRateModel::discount ( const Date start_date,
const Date payment_date 
) const
Returns
forward discount factor

◆ oas_discount()

double AndrewKalotayAssociates::Clean::InterestRateModel::oas_discount ( const Date start_date,
const Date payment_date,
double  annualized_oas 
) const
Returns
OAS-adjusted forward discount factor

◆ operator!()

bool AndrewKalotayAssociates::Clean::InterestRateModel::operator! ( ) const
Returns
True if model was constructed without any fatal errors

◆ reset()

void AndrewKalotayAssociates::Clean::InterestRateModel::reset ( const Input::ParYieldCurve par_yield_curve,
double  volatility 
)

DEPRECATED (not threadsafe):

Contructs new InterestRateModel using a newly specified par yield curve and volatility with other parameters left the same.

Better to construct a new one

◆ set_volatility()

void AndrewKalotayAssociates::Clean::InterestRateModel::set_volatility ( double  volatility)

DEPRECATED (not threadsafe):

Contructs new InterestRateModel using a newly specified volatility with par yield curve and other parameters left the same.

Better to construct a new one

◆ status()

const Output::Status& AndrewKalotayAssociates::Clean::InterestRateModel::status ( ) const
Returns
Errors or warnings generated by constructor

The documentation for this class was generated from the following file: