QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
analyticcontinuouspartialfloatinglookback.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) 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
22/*! \file analyticcontinuouspartialfloatinglookback.hpp
23 \brief Analytic engine for continuous floating-strike lookback
24*/
25
26#ifndef quantlib_analytic_continuous_partial_floating_lookback_engine_hpp
27#define quantlib_analytic_continuous_partial_floating_lookback_engine_hpp
28
34
35
36namespace QuantLib {
37
38 //! Pricing engine for European continuous partial-time floating-strike lookback option
39 /*! Formula from "Option Pricing Formulas, Second Edition",
40 E.G. Haug, 2006, p.146
41
42 \ingroup lookbackengines
43
44 \test returned values verified against results from literature
45 */
48 public:
50 ext::shared_ptr<GeneralizedBlackScholesProcess> process);
51 void calculate() const override;
52
53 private:
54 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
56 // helper methods
57 Real underlying() const;
58 Time residualTime() const;
59 Volatility volatility() const;
60 Real minmax() const;
61 Real lambda() const;
63 Real stdDeviation() const;
64 Rate riskFreeRate() const;
66 Rate dividendYield() const;
68 Real A(Real eta) const;
69 };
70
71}
72
73
74#endif
Analytic engine for continuous floating-strike lookback.
bivariate cumulative normal distribution
Black-Scholes processes.
Pricing engine for European continuous partial-time floating-strike lookback option.
Continuous partial floating lookback engine base class
Cumulative normal distribution function.
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
Real Volatility
volatility
Definition: types.hpp:78
Real Rate
interest rates
Definition: types.hpp:70
Lookback option on a single asset.
Definition: any.hpp:35
normal, cumulative and inverse cumulative distributions