QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
proxygreekengine.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) 2006 Mark Joshi
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
21#ifndef quantlib_proxy_greek_engine_hpp
22#define quantlib_proxy_greek_engine_hpp
23
24// to be removed using forward declaration
26
29#include <valarray>
30
31namespace QuantLib {
32
33 class MarketModelEvolver;
34 class ConstrainedEvolver;
35 class MarketModelDiscounter;
36
38 public:
40 ext::shared_ptr<MarketModelEvolver> evolver,
41 std::vector<std::vector<ext::shared_ptr<ConstrainedEvolver> > > constrainedEvolvers,
42 std::vector<std::vector<std::vector<Real> > > diffWeights,
43 std::vector<Size> startIndexOfConstraint,
44 std::vector<Size> endIndexOfConstraint,
45 const Clone<MarketModelMultiProduct>& product,
46 Real initialNumeraireValue);
49 std::vector<std::vector<SequenceStatisticsInc> >& modifiedStats,
50 Size numberOfPaths);
52 std::vector<Real>& values,
53 std::vector<std::vector<std::vector<Real> > >& modifiedValues);
54 private:
56 std::vector<Real>& values,
57 bool storeRates = false);
58 ext::shared_ptr<MarketModelEvolver> originalEvolver_;
59 std::vector<std::vector<ext::shared_ptr<ConstrainedEvolver> > >
61 std::vector<std::vector<std::vector<Real> > > diffWeights_;
62 std::vector<Size> startIndexOfConstraint_;
63 std::vector<Size> endIndexOfConstraint_;
65
68
69 // workspace
70 std::vector<Rate> constraints_;
71 std::valarray<bool> constraintsActive_;
72 std::vector<Real> numerairesHeld_;
73 std::vector<Size> numberCashFlowsThisStep_;
74 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >
76 std::vector<MarketModelDiscounter> discounters_;
77
78 };
79
80}
81
82#endif
cloning proxy to an underlying object
Definition: clone.hpp:40
Statistics analysis of N-dimensional (sequence) data.
Market-model evolver.
Definition: evolver.hpp:35
std::vector< Size > startIndexOfConstraint_
std::vector< std::vector< ext::shared_ptr< ConstrainedEvolver > > > constrainedEvolvers_
std::vector< Size > endIndexOfConstraint_
void singleEvolverValues(MarketModelEvolver &evolver, std::vector< Real > &values, bool storeRates=false)
std::valarray< bool > constraintsActive_
std::vector< MarketModelDiscounter > discounters_
void multiplePathValues(SequenceStatisticsInc &stats, std::vector< std::vector< SequenceStatisticsInc > > &modifiedStats, Size numberOfPaths)
std::vector< std::vector< MarketModelMultiProduct::CashFlow > > cashFlowsGenerated_
std::vector< Size > numberCashFlowsThisStep_
ext::shared_ptr< MarketModelEvolver > originalEvolver_
std::vector< Real > numerairesHeld_
void singlePathValues(std::vector< Real > &values, std::vector< std::vector< std::vector< Real > > > &modifiedValues)
std::vector< std::vector< std::vector< Real > > > diffWeights_
std::vector< Rate > constraints_
Clone< MarketModelMultiProduct > product_
cloning proxy to an underlying object
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
Statistics tools for sequence (vector, list, array) samples.