QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
fdmblackscholessolver.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) 2008 Andreas Gaida
5 Copyright (C) 2008, 2009 Ralph Schreyer
6 Copyright (C) 2008, 2009 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
22/*! \file fdmblackscholessolver.hpp
23*/
24
25#ifndef quantlib_fdm_black_scholes_solver_hpp
26#define quantlib_fdm_black_scholes_solver_hpp
27
28#include <ql/handle.hpp>
33
34namespace QuantLib {
35
36 class Fdm1DimSolver;
37 class FdmSnapshotCondition;
38 class GeneralizedBlackScholesProcess;
39
41 public:
43 Real strike,
44 FdmSolverDesc solverDesc,
45 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Douglas(),
46 bool localVol = false,
47 Real illegalLocalVolOverwrite = -Null<Real>(),
49
50 Real valueAt(Real s) const;
51 Real deltaAt(Real s) const;
52 Real gammaAt(Real s) const;
53 Real thetaAt(Real s) const;
54
55 protected:
56 void performCalculations() const override;
57
58 private:
63 const bool localVol_;
66
67 mutable ext::shared_ptr<Fdm1DimSolver> solver_;
68 };
69}
70
71#endif /* quantlib_fdm_black_scholes_solver_hpp */
ext::shared_ptr< Fdm1DimSolver > solver_
const Handle< FdmQuantoHelper > quantoHelper_
Handle< GeneralizedBlackScholesProcess > process_
Shared handle to an observable.
Definition: handle.hpp:41
Framework for calculation on demand and result caching.
Definition: lazyobject.hpp:35
template class providing a null value for a given type.
Definition: null.hpp:76
helper class storing market data needed for the quanto adjustment.
QL_REAL Real
real number
Definition: types.hpp:50
Globally accessible relinkable pointer.
framework for calculation on demand and result caching
Definition: any.hpp:35
static FdmSchemeDesc Douglas()