The class implements the forward curve. More...

#include <ForwardCurve.hpp>

Public Member Functions

 ForwardCurve ()
 default constructor More...
 
 ForwardCurve (const Date as_of_date, const SmartPointer< Interpolation > &interpolation, const SmartPointer< YearFraction > &yf, const std::vector< Date > &dates, const std::vector< double > &prices)
 default More...
 
double getForwardPrice (Date d)
 calculates the forward for a given date More...
 
std::vector< DategetDates ()
 returns grid dates More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 interface used by Boost serialization library More...
 

Private Attributes

Date as_of_date_
 date on which the curve is valid. More...
 
SmartPointer< Interpolationinterpolation_
 Interpolation method. More...
 
SmartPointer< YearFractionyf_
 Year fraction convention changes dates into continuous time. More...
 
std::vector< Datedates_
 Grid dates. More...
 
std::vector< double > time_
 Continuous time calculated on basis of grid dates. More...
 
std::vector< double > prices_
 Forward prices associated with dates. More...
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &, ForwardCurve &)
 Overloads stream operator. More...
 

Detailed Description

The class implements the forward curve.

The forward curve is a function graph in finance that defines the prices at which a contract for future delivery or payment can be concluded today. The forward curve can represent prices of commodity, equity of fx forwards.

Object is defined by set of dates and prices. To calculate the forward price on date that is not a grid date, interpolation is applied.

Constructor & Destructor Documentation

julian::ForwardCurve::ForwardCurve ( )

default constructor

julian::ForwardCurve::ForwardCurve ( const Date  as_of_date,
const SmartPointer< Interpolation > &  interpolation,
const SmartPointer< YearFraction > &  yf,
const std::vector< Date > &  dates,
const std::vector< double > &  prices 
)

default

Member Function Documentation

std::vector< Date > julian::ForwardCurve::getDates ( )

returns grid dates

double julian::ForwardCurve::getForwardPrice ( Date  d)

calculates the forward for a given date

template<class Archive >
void julian::ForwardCurve::serialize ( Archive &  ar,
const unsigned  int 
)
private

interface used by Boost serialization library

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
julian::ForwardCurve c 
)
friend

Overloads stream operator.

This overloaded operator enables to print the curve on the console.

Member Data Documentation

Date julian::ForwardCurve::as_of_date_
private

date on which the curve is valid.

std::vector<Date> julian::ForwardCurve::dates_
private

Grid dates.

SmartPointer<Interpolation> julian::ForwardCurve::interpolation_
private

Interpolation method.

std::vector<double> julian::ForwardCurve::prices_
private

Forward prices associated with dates.

std::vector<double> julian::ForwardCurve::time_
private

Continuous time calculated on basis of grid dates.

SmartPointer<YearFraction> julian::ForwardCurve::yf_
private

Year fraction convention changes dates into continuous time.


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/marketData/ForwardCurve.hpp
  • C:/Unix/home/OEM/jULIAN/src/marketData/ForwardCurve.cpp