QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
fdmblackscholesmesher.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) 2009 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file fdmblackscholesmesher.hpp
21 \brief 1-d mesher for the Black-Scholes process (in ln(S))
22*/
23
24#ifndef quantlib_fdm_black_scholes_mesher_hpp
25#define quantlib_fdm_black_scholes_mesher_hpp
26
29
30#include <ql/handle.hpp>
31#include <ql/quote.hpp>
32
33namespace QuantLib {
34
35 class FdmQuantoHelper;
36 class YieldTermStructure;
37 class GeneralizedBlackScholesProcess;
38
40 public:
42 Size size,
43 const ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
44 Time maturity, Real strike,
45 Real xMinConstraint = Null<Real>(),
46 Real xMaxConstraint = Null<Real>(),
47 Real eps = 0.0001,
48 Real scaleFactor = 1.5,
49 const std::pair<Real, Real>& cPoint = { Null<Real>(), Null<Real>() },
50 const DividendSchedule& dividendSchedule = {},
51 const ext::shared_ptr<FdmQuantoHelper>& fdmQuantoHelper = {},
52 Real spotAdjustment = 0.0);
53
54 static ext::shared_ptr<GeneralizedBlackScholesProcess> processHelper(
55 const Handle<Quote>& s0,
58 Volatility vol);
59 };
60}
61
62#endif
static ext::shared_ptr< GeneralizedBlackScholesProcess > processHelper(const Handle< Quote > &s0, const Handle< YieldTermStructure > &rTS, const Handle< YieldTermStructure > &qTS, Volatility vol)
Shared handle to an observable.
Definition: handle.hpp:41
template class providing a null value for a given type.
Definition: null.hpp:76
Schedule of dividend dates.
One-dimensional simple FDM mesher object working on an index.
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real Volatility
volatility
Definition: types.hpp:78
std::size_t Size
size of a container
Definition: types.hpp:58
Globally accessible relinkable pointer.
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
purely virtual base class for market observables