/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2005, 2006 Klaus Spanderen This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email . The license is also available online at . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ /*! \file lfmhullwhiteparam.hpp \brief libor market model parameterization based on Hull White */ #ifndef quantlib_libor_market_hull_white_parameterization_hpp #define quantlib_libor_market_hull_white_parameterization_hpp #include #include namespace QuantLib { //! %Libor market model parameterization based on Hull White paper /*! Hull, John, White, Alan, 1999, Forward Rate Volatilities, Swap Rate Volatilities and the Implementation of the Libor Market Model () \test the correctness is tested by Monte-Carlo reproduction of caplet & ratchet npvs and comparison with Black pricing. */ class LfmHullWhiteParameterization : public LfmCovarianceParameterization { public: LfmHullWhiteParameterization( const boost::shared_ptr & process, const boost::shared_ptr & capletVol, const Matrix& correlation = Matrix(), Size factors = 1); Disposable diffusion ( Time t, const Array& x = Null()) const; Disposable covariance( Time t, const Array& x = Null()) const; Disposable integratedCovariance( Time t, const Array& x = Null()) const; protected: Size nextIndexReset(Time t) const; Matrix diffusion_, covariance_; std::vector