FINAL EXAM
Functions
Construction of data curves.

Functions

cfl::Function prb::forwardFXFit (double dSpotFX, const std::vector< double > &rMaturities, const std::vector< double > &rDomesticDiscountFactors, const std::vector< double > &rForeignDiscountFactors, 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::forwardFXFit ( double  dSpotFX,
const std::vector< double > &  rMaturities,
const std::vector< double > &  rDomesticDiscountFactors,
const std::vector< double > &  rForeignDiscountFactors,
double  dInitialTime 
)

Computes forward exchange rate curve in the form:

F(t) = dSpotFX * exp(A*(t-dInitialTime)), t>=dInitialTime,

where the cost-of-carry rate A is obtained by a least square fit to the market cost-of-carry rates.

Parameters
dSpotFXThe spot exchange rate.
rMaturitiesThe vector of maturities for discount factors.
rDomesticDiscountFactorsThe vector of domestic discount factors.
rForeignDiscountFactorsThe vector of foreign discount factors.
dInitialTimeThe initial time.
Returns
The forward exchange rate curve obtained by least-square fit of cost-of-carry rates.