QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
lookbackoption.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2006 Warren Chou
5 Copyright (C) 2007 StatPro Italia srl
6 Copyright (C) 2014 Francois Botha
7
8 This file is part of QuantLib, a free-software/open-source library
9 for financial quantitative analysts and developers - http://quantlib.org/
10
11 QuantLib is free software: you can redistribute it and/or modify it
12 under the terms of the QuantLib license. You should have received a
13 copy of the license along with this program; if not, please email
14 <quantlib-dev@lists.sf.net>. The license is also available online at
15 <http://quantlib.org/license.shtml>.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the license for more details.
20*/
21
26#ifndef quantlib_lookback_option_hpp
27#define quantlib_lookback_option_hpp
28
29#include <ql/instruments/oneassetoption.hpp>
30#include <ql/instruments/payoffs.hpp>
31#include <ql/exercise.hpp>
32
33namespace QuantLib {
34
36
38 public:
39 class arguments;
40 class engine;
42 Real currentMinmax,
43 const ext::shared_ptr<TypePayoff>& payoff,
44 const ext::shared_ptr<Exercise>& exercise);
45 void setupArguments(PricingEngine::arguments*) const override;
46
47 protected:
48 // arguments
50 };
51
53
55 public:
56 class arguments;
57 class engine;
59 Real currentMinmax,
60 const ext::shared_ptr<StrikedTypePayoff>& payoff,
61 const ext::shared_ptr<Exercise>& exercise);
62 void setupArguments(PricingEngine::arguments*) const override;
63
64 protected:
65 // arguments
67 };
68
70
85 public:
86 class arguments;
87 class engine;
89 Real currentMinmax,
90 Real lambda,
91 Date lookbackPeriodEnd,
92 const ext::shared_ptr<TypePayoff>& payoff,
93 const ext::shared_ptr<Exercise>& exercise);
94 void setupArguments(PricingEngine::arguments*) const override;
95
96 protected:
97 // arguments
100 };
101
103
123 public:
124 class arguments;
125 class engine;
127 Date lookbackPeriodStart,
128 const ext::shared_ptr<StrikedTypePayoff>& payoff,
129 const ext::shared_ptr<Exercise>& exercise);
130 void setupArguments(PricingEngine::arguments*) const override;
131
132 protected:
133 // arguments
135 };
136
139 : public OneAssetOption::arguments {
140 public:
142 void validate() const override;
143 };
144
147 : public OneAssetOption::arguments {
148 public:
150 void validate() const override;
151 };
152
156 public:
159 void validate() const override;
160 };
161
165 public:
167 void validate() const override;
168 };
169
172 : public GenericEngine<ContinuousFloatingLookbackOption::arguments,
173 ContinuousFloatingLookbackOption::results> {};
174
177 : public GenericEngine<ContinuousFixedLookbackOption::arguments,
178 ContinuousFixedLookbackOption::results> {};
179
182 : public GenericEngine<ContinuousPartialFloatingLookbackOption::arguments,
183 ContinuousPartialFloatingLookbackOption::results> {};
184
187 : public GenericEngine<ContinuousPartialFixedLookbackOption::arguments,
188 ContinuousPartialFixedLookbackOption::results> {};
189}
190
191
192#endif
Arguments for continuous fixed lookback option calculation
Continuous fixed lookback engine base class
Continuous-fixed lookback option.
void setupArguments(PricingEngine::arguments *) const override
Arguments for continuous floating lookback option calculation
Continuous floating lookback engine base class
Continuous-floating lookback option.
void setupArguments(PricingEngine::arguments *) const override
Arguments for continuous partial fixed lookback option calculation
Continuous partial fixed lookback engine base class
Continuous-partial-fixed lookback option.
void setupArguments(PricingEngine::arguments *) const override
Arguments for continuous partial floating lookback option calculation
Continuous partial floating lookback engine base class
Continuous-partial-floating lookback option.
void setupArguments(PricingEngine::arguments *) const override
Concrete date class.
Definition: date.hpp:125
template base class for option pricing engines
Base class for options on a single asset.
ext::shared_ptr< Payoff > payoff() const
Definition: option.hpp:45
ext::shared_ptr< Exercise > exercise() const
Definition: option.hpp:46
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35