QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
vegastressedblackscholesprocess.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) 2010 Michael Heckl
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 vegastressedblackscholesprocess.hpp
21 \brief Black-Scholes process which supports local vega stress tests
22*/
23
24#ifndef quantlib_vega_stressed_black_scholes_process_hpp
25#define quantlib_vega_stressed_black_scholes_process_hpp
26
28
29namespace QuantLib {
30
31 //! Black-Scholes process which supports local vega stress tests
34 public:
36 const Handle<Quote>& x0,
37 const Handle<YieldTermStructure>& dividendTS,
38 const Handle<YieldTermStructure>& riskFreeTS,
39 const Handle<BlackVolTermStructure>& blackVolTS,
40 Time lowerTimeBorderForStressTest = 0,
41 Time upperTimeBorderForStressTest = 1000000,
42 Real lowerAssetBorderForStressTest = 0,
43 Real upperAssetBorderForStressTest = 1000000,
44 Real stressLevel = 0,
45 const ext::shared_ptr<discretization>& d =
46 ext::shared_ptr<discretization>(new EulerDiscretization));
47 //! \name StochasticProcess1D interface
48 //@{
49 Real diffusion(Time t, Real x) const override;
50 //@}
51 //! \name interface for vega stress test
52 //@{
53 // give back lower time border for stress test
55 // set lower time border for stress test
57 // give back upper time border for stress test
59 // set upper time border for stress test
61 // give back lower asset border for stress test
63 // set lower asset border for stress test
65 // give back upper asset border for stress test
67 // set upper asset border for stress test
69 // give back stress level
70 Real getStressLevel() const;
71 // set stress level
72 void setStressLevel(Real SL);
73 //@}
74 private:
80 };
81
82}
83
84
85#endif
Black-Scholes processes.
Euler discretization for stochastic processes.
Generalized Black-Scholes stochastic process.
Real x0() const override
returns the initial value of the state variable
Shared handle to an observable.
Definition: handle.hpp:41
Black-Scholes process which supports local vega stress tests.
Real diffusion(Time t, Real x) const override
returns the diffusion part of the equation, i.e.
const DefaultType & t
Date d
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35