QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
multisteppathwisewrapper.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 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#ifndef quantlib_multistep_pathwise_wrapper_hpp
21#define quantlib_multistep_pathwise_wrapper_hpp
22
23
27
28namespace QuantLib
29{
30/*! MultiStepPathwiseWrapper
31 Pathwise products do everything that ordinary products do and more. This lets
32 you treat a pathwise product as an ordinary product. So you only have to write the
33 product once.
34
35 Tested in MarketModels::testInverseFloater()
36
37*/
38
40 {
41 public:
43 std::vector<Time> possibleCashFlowTimes() const override;
44 Size numberOfProducts() const override;
46 void reset() override;
47 bool nextTimeStep(const CurveState& currentState,
48 std::vector<Size>& numberCashFlowsThisStep,
49 std::vector<std::vector<CashFlow> >& cashFlowsGenerated) override;
50 std::unique_ptr<MarketModelMultiProduct> clone() const override;
51 std::vector<Size> suggestedNumeraires() const override;
52 const EvolutionDescription& evolution() const override;
53
54 private:
56 std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> > cashFlowsGenerated_;
58
59 };
60
61
62}
63
64#endif
cloning proxy to an underlying object
Definition: clone.hpp:40
Curve state for market-model simulations
Definition: curvestate.hpp:41
Market-model evolution description.
std::vector< Size > suggestedNumeraires() const override
Clone< MarketModelPathwiseMultiProduct > innerProduct_
std::unique_ptr< MarketModelMultiProduct > clone() const override
returns a newly-allocated copy of itself
std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > cashFlowsGenerated_
bool nextTimeStep(const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated) override
return value indicates whether path is finished, TRUE means done
std::vector< Time > possibleCashFlowTimes() const override
const EvolutionDescription & evolution() const override
void reset() override
during simulation put product at start of path
cloning proxy to an underlying object
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35