QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
cashrebate.hpp
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_market_model_cash_rebate_hpp
22#define quantlib_market_model_cash_rebate_hpp
23
24#include <ql/models/marketmodels/multiproduct.hpp>
25#include <ql/models/marketmodels/evolutiondescription.hpp>
26#include <ql/math/matrix.hpp>
27
28namespace QuantLib
29{
37 {
38 public:
40 const std::vector<Time>& paymentTimes,
41 Matrix amounts,
44
45 std::vector<Size> suggestedNumeraires() const override;
46 const EvolutionDescription& evolution() const override;
47 std::vector<Time> possibleCashFlowTimes() const override;
48 Size numberOfProducts() const override;
50 void reset() override;
51 bool nextTimeStep(const CurveState& currentState,
52 std::vector<Size>& numberCashFlowsThisStep,
53 std::vector<std::vector<CashFlow> >& cashFlowsGenerated) override;
54 std::unique_ptr<MarketModelMultiProduct> clone() const override;
56 private:
58 std::vector<Time> paymentTimes_;
61 // things that vary in a path
63 };
64
65}
66
67#endif
Curve state for market-model simulations
Definition: curvestate.hpp:41
Market-model evolution description.
std::vector< Time > paymentTimes_
Definition: cashrebate.hpp:58
std::vector< Size > suggestedNumeraires() const override
Definition: cashrebate.cpp:69
std::unique_ptr< MarketModelMultiProduct > clone() const override
returns a newly-allocated copy of itself
Definition: cashrebate.cpp:97
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
Definition: cashrebate.cpp:80
std::vector< Time > possibleCashFlowTimes() const override
Definition: cashrebate.cpp:48
const EvolutionDescription & evolution() const override
Definition: cashrebate.cpp:74
Size maxNumberOfCashFlowsPerProductPerStep() const override
Definition: cashrebate.cpp:58
EvolutionDescription evolution_
Definition: cashrebate.hpp:57
Size numberOfProducts() const override
Definition: cashrebate.cpp:53
void reset() override
during simulation put product at start of path
Definition: cashrebate.cpp:63
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