QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
pathwiseproductcashrebate.hpp
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
21#ifndef quantlib_market_model_pathwise_cash_rebate_hpp
22#define quantlib_market_model_pathwise_cash_rebate_hpp
23
24#include <ql/types.hpp>
25#include <ql/models/marketmodels/pathwisemultiproduct.hpp>
26#include <ql/models/marketmodels/evolutiondescription.hpp>
27#include <ql/models/marketmodels/curvestates/lmmcurvestate.hpp>
28#include <ql/math/matrix.hpp>
29#include <vector>
30#include <memory>
31
32namespace QuantLib {
33
34 class EvolutionDescription;
35 class CurveState;
36
43
44 {
45 public:
47 const std::vector<Time>& paymentTimes,
48 Matrix amounts,
50
51 std::vector<Size> suggestedNumeraires() const override;
52 const EvolutionDescription& evolution() const override;
53 std::vector<Time> possibleCashFlowTimes() const override;
54 Size numberOfProducts() const override;
56 void reset() override;
57
58
59 bool alreadyDeflated() const override;
60
61 bool nextTimeStep(const CurveState& currentState,
62 std::vector<Size>& numberCashFlowsThisStep,
63 std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> >&
64 cashFlowsGenerated) override;
65
66 std::unique_ptr<MarketModelPathwiseMultiProduct> clone() const override;
67
68 private:
70 std::vector<Time> paymentTimes_;
73 // things that vary in a path
75 };
76}
77
78#endif
Curve state for market-model simulations
Definition: curvestate.hpp:41
Market-model evolution description.
std::vector< Size > suggestedNumeraires() const override
bool nextTimeStep(const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > &cashFlowsGenerated) override
return value indicates whether path is finished, TRUE means done
std::unique_ptr< MarketModelPathwiseMultiProduct > clone() const override
returns a newly-allocated copy of itself
std::vector< Time > possibleCashFlowTimes() const override
const EvolutionDescription & evolution() const override
void reset() override
during simulation put product at start of path
Matrix used in linear algebra.
Definition: matrix.hpp:41
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35