QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
fdblackscholesbarrierengine.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Andreas Gaida
5 Copyright (C) 2008 Ralph Schreyer
6 Copyright (C) 2008 Klaus Spanderen
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
26#ifndef quantlib_fd_black_scholes_barrier_engine_hpp
27#define quantlib_fd_black_scholes_barrier_engine_hpp
28
29#include <ql/processes/blackscholesprocess.hpp>
30#include <ql/methods/finitedifferences/solvers/fdmbackwardsolver.hpp>
31#include <ql/instruments/dividendbarrieroption.hpp>
32
33namespace QuantLib {
34
35 QL_DEPRECATED_DISABLE_WARNING
36
38
45 QL_DEPRECATED_ENABLE_WARNING
46 public:
48 ext::shared_ptr<GeneralizedBlackScholesProcess> process,
49 Size tGrid = 100,
50 Size xGrid = 100,
51 Size dampingSteps = 0,
52 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Douglas(),
53 bool localVol = false,
54 Real illegalLocalVolOverwrite = -Null<Real>());
55
57 ext::shared_ptr<GeneralizedBlackScholesProcess> process,
58 DividendSchedule dividends,
59 Size tGrid = 100,
60 Size xGrid = 100,
61 Size dampingSteps = 0,
62 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Douglas(),
63 bool localVol = false,
64 Real illegalLocalVolOverwrite = -Null<Real>());
65
66 void calculate() const override;
67
68 private:
69 ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
76 };
77
78}
79
80#endif
Finite-differences Black/Scholes barrier-option engine.
ext::shared_ptr< GeneralizedBlackScholesProcess > process_
template class providing a null value for a given type.
Definition: null.hpp:76
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
static FdmSchemeDesc Douglas()