QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
analyticcontinuouspartialfixedlookback.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 analyticcontinuouspartialfixedlookback.hpp
23 \brief Analytic engine for continuous fixed-strike lookback
24*/
25
26#ifndef quantlib_analytic_continuous_partial_fixed_lookback_engine_hpp
27#define quantlib_analytic_continuous_partial_fixed_lookback_engine_hpp
28
33
34namespace QuantLib {
35
36 //! Pricing engine for European continuous partial-time fixed-strike lookback options
37 /*! Formula from "Option Pricing Formulas, Second Edition",
38 E.G. Haug, 2006, p.148
39
40 \ingroup lookbackengines
41
42 \test returned values are verified against results from literature
43 */
46 public:
48 ext::shared_ptr<GeneralizedBlackScholesProcess> process);
49 void calculate() const override;
50
51 private:
52 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
54 // helper methods
55 Real underlying() const;
56 Real strike() const;
57 Time residualTime() const;
58 Volatility volatility() const;
60 Real stdDeviation() const;
61 Rate riskFreeRate() const;
63 Rate dividendYield() const;
65 Real A(Real eta) const;
66 };
67
68}
69
70
71#endif
bivariate cumulative normal distribution
Black-Scholes processes.
Pricing engine for European continuous partial-time fixed-strike lookback options.
Continuous partial 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