SAMPLE EXAM 3
Functions
Construction of data curves.

Functions

cfl::Function prb::volatilityLinearInterpOfVar (const std::vector< double > &rMaturities, const std::vector< double > &rVolatilities, double dInitialTime)
 

Detailed Description

This module contains functions that construct input data curves, such as volatility, forward, and discount, for financial models.

Function Documentation

cfl::Function prb::volatilityLinearInterpOfVar ( const std::vector< double > &  rMaturities,
const std::vector< double > &  rVolatilities,
double  dInitialTime 
)

Computes the volatility curve $V = V(t)$ by applying the linear interpolation to the variance curve $D = D(t)$. The relation between the two curves is

\[ D(t) = (t - t_0) V^2(t), \]

where $t_0$ (= dInitialTime) is the initial time. Note that the resulting volatility curve will be constant on the interval [dInitialTime, rMaturities.front()] and given by rVolatilities.front().

Parameters
rMaturitiesThe maturities of known volatilities. We assume that rMaturities.front() > dInitialTime .
rVolatilitiesThe vector of known volatilities.
dInitialTimeThe initial time.
Returns
The volatility curve on the interval [dInitialTime, rMaturities.back()] .