Garch11 Class Reference

GARCH volatility model. More...

`#include <ql/models/volatility/garch.hpp>`

Inherits VolatilityCompositor.

## Public Types

enum | Mode { MomentMatchingGuess, GammaGuess, BestOfTwo, DoubleOptimization }
typedef TimeSeries< Volatility > | time_series
typedef time_series::const_iterator | const_iterator
typedef time_series::const_value_iterator | const_value_iterator

## Public Member Functions

Constructors
| Garch11 (Real a, Real b, Real vl)
| Garch11 (const time_series &qs, Mode mode=BestOfTwo)
Inspectors
Real | alpha () const
Real | beta () const
Real | omega () const
Real | ltVol () const
Real | logLikelihood () const
Mode | mode () const
VolatilityCompositor interface
time_series | calculate (const time_series &quoteSeries)
void | calibrate (const time_series &quoteSeries)

## Additional interface

void | calibrate (const time_series &quoteSeries, OptimizationMethod &method, const EndCriteria &endCriteria)
void | calibrate (const time_series &quoteSeries, OptimizationMethod &method, const EndCriteria &endCriteria, const Array &initialGuess)
template<typename ForwardIterator >
void | calibrate (ForwardIterator begin, ForwardIterator end)
template<typename ForwardIterator >
void | calibrate (ForwardIterator begin, ForwardIterator end, OptimizationMethod &method, EndCriteria endCriteria)
template<typename ForwardIterator >
void | calibrate (ForwardIterator begin, ForwardIterator end, OptimizationMethod &method, EndCriteria endCriteria, const Array &initialGuess)
Real | forecast (Real r, Real sigma2) const
static time_series | calculate (const time_series &quoteSeries, Real alpha, Real beta, Real omega)
template<typename InputIterator >
static Real | to_r2 (InputIterator begin, InputIterator end, std::vector< Volatility > &r2)
static boost::shared_ptr< Problem > | calibrate_r2 (Mode mode, const std::vector< Volatility > &r2, Real mean_r2, Real &alpha, Real &beta, Real &omega)
static boost::shared_ptr< Problem > | calibrate_r2 (Mode mode, const std::vector< Volatility > &r2, Real mean_r2, OptimizationMethod &method, const EndCriteria &endCriteria, Real &alpha, Real &beta, Real &omega)
static boost::shared_ptr< Problem > | calibrate_r2 (const std::vector< Volatility > &r2, Real mean_r2, OptimizationMethod &method, const EndCriteria &endCriteria, const Array &initialGuess, Real &alpha, Real &beta, Real &omega)
static boost::shared_ptr< Problem > | calibrate_r2 (const std::vector< Volatility > &r2, OptimizationMethod &method, const EndCriteria &endCriteria, const Array &initialGuess, Real &alpha, Real &beta, Real &omega)
static boost::shared_ptr< Problem > | calibrate_r2 (const std::vector< Volatility > &r2, Real mean_r2, OptimizationMethod &method, Constraint &constraints, const EndCriteria &endCriteria, const Array &initialGuess, Real &alpha, Real &beta, Real &omega)
static boost::shared_ptr< Problem > | calibrate_r2 (const std::vector< Volatility > &r2, OptimizationMethod &method, Constraint &constraints, const EndCriteria &endCriteria, const Array &initialGuess, Real &alpha, Real &beta, Real &omega)
template<class InputIterator >
static Real | costFunction (InputIterator begin, InputIterator end, Real alpha, Real beta, Real omega)

## Detailed Description

GARCH volatility model.

Volatilities are assumed to be expressed on an annual basis.

## Member Enumeration Documentation

## Mode

enum Mode

Enumerator
MomentMatchingGuess | The initial guess is a moment matching estimates for mean(r2), acf(0), and acf(1).
GammaGuess | The initial guess is an estimate of gamma based on the property: acf(i+1) = gamma*acf(i) for i > 1.
BestOfTwo | The best of the two above modes
DoubleOptimization | Double optimization

## Member Function Documentation

## calibrate_r2() [1/5]

static boost::shared_ptr<Problem> calibrate_r2 | ( | Mode | mode,
|  | const std::vector< Volatility > & | r2,
|  | Real | mean_r2,
|  | Real & | alpha,
|  | Real & | beta,
|  | Real & | omega
| ) |  |

static

calibrates GARCH for r^2

## calibrate_r2() [2/5]

static boost::shared_ptr<Problem> calibrate_r2 | ( | Mode | mode,
|  | const std::vector< Volatility > & | r2,
|  | Real | mean_r2,
|  | OptimizationMethod & | method,
|  | const EndCriteria & | endCriteria,
|  | Real & | alpha,
|  | Real & | beta,
|  | Real & | omega
| ) |  |

static

calibrates GARCH for r^2 with user-defined optimization method and end criteria

## calibrate_r2() [3/5]

static boost::shared_ptr<Problem> calibrate_r2 | ( | const std::vector< Volatility > & | r2,
|  | Real | mean_r2,
|  | OptimizationMethod & | method,
|  | const EndCriteria & | endCriteria,
|  | const Array & | initialGuess,
|  | Real & | alpha,
|  | Real & | beta,
|  | Real & | omega
| ) |  |

static

calibrates GARCH for r^2 with user-defined optimization method, end criteria and initial guess

## calibrate_r2() [4/5]

static boost::shared_ptr<Problem> calibrate_r2 | ( | const std::vector< Volatility > & | r2,
|  | OptimizationMethod & | method,
|  | const EndCriteria & | endCriteria,
|  | const Array & | initialGuess,
|  | Real & | alpha,
|  | Real & | beta,
|  | Real & | omega
| ) |  |

static

calibrates GARCH for r^2 with user-defined optimization method, end criteria and initial guess

## calibrate_r2() [5/5]

static boost::shared_ptr<Problem> calibrate_r2 | ( | const std::vector< Volatility > & | r2,
|  | Real | mean_r2,
|  | OptimizationMethod & | method,
|  | Constraint & | constraints,
|  | const EndCriteria & | endCriteria,
|  | const Array & | initialGuess,
|  | Real & | alpha,
|  | Real & | beta,
|  | Real & | omega
| ) |  |

static

calibrates GARCH for r^2 with user-defined optimization method, end criteria, constraints and initial guess