QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
accountingengine.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) 2007 Ferdinando Ametrano
5 Copyright (C) 2006 Mark Joshi
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21
22#ifndef quantlib_accounting_engine_hpp
23#define quantlib_accounting_engine_hpp
24
25// to be removed using forward declaration
29
31#include <ql/types.hpp>
32#include <vector>
33
34namespace QuantLib {
35
36 class MarketModelEvolver;
37
38 //class MarketModelDiscounter;
39 //class SequenceStatistics;
40 //class MarketModelMultiProduct;
41 //struct MarketModelMultiProduct::CashFlow;
42
43 //! Engine collecting cash flows along a market-model simulation
45 public:
46 AccountingEngine(ext::shared_ptr<MarketModelEvolver> evolver,
47 const Clone<MarketModelMultiProduct>& product,
48 Real initialNumeraireValue);
50 Size numberOfPaths);
51 private:
52 Real singlePathValues(std::vector<Real>& values);
53
54 ext::shared_ptr<MarketModelEvolver> evolver_;
56
59
60 // workspace
61 std::vector<Real> numerairesHeld_;
62 std::vector<Size> numberCashFlowsThisStep_;
63 std::vector<std::vector<MarketModelMultiProduct::CashFlow> >
65 std::vector<MarketModelDiscounter> discounters_;
66
67 };
68
69}
70
71#endif
Engine collecting cash flows along a market-model simulation.
ext::shared_ptr< MarketModelEvolver > evolver_
std::vector< MarketModelDiscounter > discounters_
void multiplePathValues(SequenceStatisticsInc &stats, Size numberOfPaths)
std::vector< std::vector< MarketModelMultiProduct::CashFlow > > cashFlowsGenerated_
std::vector< Size > numberCashFlowsThisStep_
std::vector< Real > numerairesHeld_
Real singlePathValues(std::vector< Real > &values)
Clone< MarketModelMultiProduct > product_
cloning proxy to an underlying object
Definition: clone.hpp:40
Statistics analysis of N-dimensional (sequence) data.
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.
Custom types.