QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
ql
pricingengines
basket
vectorbsmprocessextractor.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) 2024 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 vectorbsmprocessextractor.hpp
21
\brief helper class to extract underlying, volatility etc from a vector of processes
22
*/
23
24
#ifndef quantlib_vector_bsm_process_extractor_hpp
25
#define quantlib_vector_bsm_process_extractor_hpp
26
27
#include <
ql/processes/blackscholesprocess.hpp
>
28
#include <functional>
29
30
namespace
QuantLib::detail
{
31
32
class
VectorBsmProcessExtractor
{
33
public
:
34
explicit
VectorBsmProcessExtractor
(
35
std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess> > p);
36
37
Array
getSpot
()
const
;
38
Array
getBlackStdDev
(
const
Date
& maturityDate)
const
;
39
Array
getBlackVariance
(
const
Date
& maturityDate)
const
;
40
Array
getDividendYieldDf
(
const
Date
& maturityDate)
const
;
41
DiscountFactor
getInterestRateDf
(
const
Date
& maturityDate)
const
;
42
43
private
:
44
Array
extractProcesses
(
45
const
std::function<
Real
(
const
ext::shared_ptr<GeneralizedBlackScholesProcess>&)>&
f
)
const
;
46
47
const
std::vector<ext::shared_ptr<GeneralizedBlackScholesProcess> >
processes_
;
48
};
49
50
}
51
52
53
#endif
blackscholesprocess.hpp
Black-Scholes processes.
QuantLib::Array
1-D array used in linear algebra.
Definition:
array.hpp:52
QuantLib::Date
Concrete date class.
Definition:
date.hpp:125
QuantLib::detail::VectorBsmProcessExtractor
Definition:
vectorbsmprocessextractor.hpp:32
QuantLib::detail::VectorBsmProcessExtractor::getBlackStdDev
Array getBlackStdDev(const Date &maturityDate) const
Definition:
vectorbsmprocessextractor.cpp:85
QuantLib::detail::VectorBsmProcessExtractor::getDividendYieldDf
Array getDividendYieldDf(const Date &maturityDate) const
Definition:
vectorbsmprocessextractor.cpp:67
QuantLib::detail::VectorBsmProcessExtractor::getInterestRateDf
DiscountFactor getInterestRateDf(const Date &maturityDate) const
Definition:
vectorbsmprocessextractor.cpp:44
QuantLib::detail::VectorBsmProcessExtractor::extractProcesses
Array extractProcesses(const std::function< Real(const ext::shared_ptr< GeneralizedBlackScholesProcess > &)> &f) const
Definition:
vectorbsmprocessextractor.cpp:34
QuantLib::detail::VectorBsmProcessExtractor::getBlackVariance
Array getBlackVariance(const Date &maturityDate) const
Definition:
vectorbsmprocessextractor.cpp:76
QuantLib::detail::VectorBsmProcessExtractor::processes_
const std::vector< ext::shared_ptr< GeneralizedBlackScholesProcess > > processes_
Definition:
vectorbsmprocessextractor.hpp:47
QuantLib::detail::VectorBsmProcessExtractor::getSpot
Array getSpot() const
Definition:
vectorbsmprocessextractor.cpp:63
f
F f
Definition:
defaultdensitystructure.cpp:32
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib::DiscountFactor
Real DiscountFactor
discount factor between dates
Definition:
types.hpp:66
QuantLib::detail
Definition:
cashflowvectors.cpp:32
Generated by
Doxygen
1.9.5