QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
analyticcontinuousfixedlookback.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 analyticcontinuousfixedlookback.hpp
22 \brief Analytic engine for continuous fixed-strike lookback
23*/
24
25#ifndef quantlib_analytic_continuous_fixed_lookback_engine_hpp
26#define quantlib_analytic_continuous_fixed_lookback_engine_hpp
27
31
32namespace QuantLib {
33
34 //! Pricing engine for European continuous fixed-strike lookback
35 /*! Formula from "Option Pricing Formulas",
36 E.G. Haug, McGraw-Hill, 1998, p.63-64
37
38 \ingroup lookbackengines
39
40 \test returned values are 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 Real strike() const;
55 Time residualTime() const;
56 Volatility volatility() const;
57 Real minmax() const;
58 Real stdDeviation() const;
59 Rate riskFreeRate() const;
61 Rate dividendYield() const;
63 Real A(Real eta) const;
64 Real B(Real eta) const;
65 Real C(Real eta) const;
66 };
67
68}
69
70
71#endif
Black-Scholes processes.
Pricing engine for European continuous fixed-strike lookback.
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
Continuous fixed 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