QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
lognormalfwdrateballand.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2009 Sun Xiuxin
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20#ifndef quantlib_forward_rate_balland_evolver_hpp
21#define quantlib_forward_rate_balland_evolver_hpp
22
25
26namespace QuantLib {
27
28 class MarketModel;
29 class BrownianGenerator;
30 class BrownianGeneratorFactory;
31 class LMMDriftCalculator;
32
33 //! Iterative Predictor-Corrector
35 public:
36 LogNormalFwdRateBalland(const ext::shared_ptr<MarketModel>&,
38 const std::vector<Size>& numeraires,
39 Size initialStep = 0);
40 //! \name MarketModel interface
41 //@{
42 const std::vector<Size>& numeraires() const override;
43 Real startNewPath() override;
44 Real advanceStep() override;
45 Size currentStep() const override;
46 const CurveState& currentState() const override;
47 void setInitialState(const CurveState&) override;
48 //@}
49 private:
50 void setForwards(const std::vector<Real>& forwards);
51 // inputs
52 ext::shared_ptr<MarketModel> marketModel_;
53 std::vector<Size> numeraires_;
55 ext::shared_ptr<BrownianGenerator> generator_;
56 // fixed variables
57 std::vector<std::vector<Real> > fixedDrifts_;
58 // working variables
63 std::vector<Real> drifts1_, drifts2_, initialDrifts_;
64 std::vector<Real> brownians_, correlatedBrownians_;
65 std::vector<Time> rateTaus_;
66 std::vector<Size> alive_;
67 //std::vector<Matrix> C_;
68 // helper classes
69 std::vector<LMMDriftCalculator> calculators_;
70 };
71
72}
73
74#endif
Curve state for market-model simulations
Definition: curvestate.hpp:41
Curve state for Libor market models
Iterative Predictor-Corrector.
const CurveState & currentState() const override
void setForwards(const std::vector< Real > &forwards)
std::vector< std::vector< Real > > fixedDrifts_
ext::shared_ptr< MarketModel > marketModel_
const std::vector< Size > & numeraires() const override
std::vector< LMMDriftCalculator > calculators_
ext::shared_ptr< BrownianGenerator > generator_
void setInitialState(const CurveState &) override
Market-model evolver.
Definition: evolver.hpp:35
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35