QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
analyticcontinuousfixedlookback.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
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
25#ifndef quantlib_analytic_continuous_fixed_lookback_engine_hpp
26#define quantlib_analytic_continuous_fixed_lookback_engine_hpp
27
28#include <ql/instruments/lookbackoption.hpp>
29#include <ql/processes/blackscholesprocess.hpp>
30#include <ql/math/distributions/normaldistribution.hpp>
31
32namespace QuantLib {
33
35
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
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
Definition: any.hpp:35