QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
analyticcontinuousfloatinglookback.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
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21/*! \file analyticcontinuousfloatinglookback.hpp
22 \brief Analytic engine for continuous floating-strike lookback
23*/
24
25#ifndef quantlib_analytic_continuous_floating_lookback_engine_hpp
26#define quantlib_analytic_continuous_floating_lookback_engine_hpp
27
31
32namespace QuantLib {
33
34 //! Pricing engine for European continuous floating-strike lookback
35 /*! Formula from "Option Pricing Formulas",
36 E.G. Haug, McGraw-Hill, 1998, p.61-62
37
38 \ingroup lookbackengines
39
40 \test returned values verified against results from literature
41 */
44 public:
46 ext::shared_ptr<GeneralizedBlackScholesProcess> process);
47 void calculate() const override;
48
49 private:
50 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
52 // helper methods
53 Real underlying() const;
54 Time residualTime() const;
55 Volatility volatility() const;
56 Real minmax() const;
57 Real stdDeviation() const;
58 Rate riskFreeRate() const;
60 Rate dividendYield() const;
62 Real A(Real eta) const;
63 };
64
65}
66
67
68#endif
Black-Scholes processes.
Pricing engine for European continuous floating-strike lookback.
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Continuous 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