QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
math
modifiedbessel.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) 2014 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 modifiedbessel.hpp
21
\brief modified Bessel functions of first and second kind
22
*/
23
24
#ifndef quantlib_modified_bessel_hpp
25
#define quantlib_modified_bessel_hpp
26
27
#include <
ql/types.hpp
>
28
#include <complex>
29
30
namespace
QuantLib
{
31
32
/* Compute modified Bessel functions I_nv(x) and K_nv(x)
33
34
Based on series expansion outlined in e.g.
35
http://www.mhtlab.uwaterloo.ca/courses/me755/web_chap4.pdf
36
37
The exponentially weighted versions return the function value
38
times exp(-x) resp exp(-z)
39
*/
40
Real
modifiedBesselFunction_i
(
Real
nu
,
Real
x);
41
Real
modifiedBesselFunction_k
(
Real
nu
,
Real
x);
42
Real
modifiedBesselFunction_i_exponentiallyWeighted
(
Real
nu
,
Real
x);
43
Real
modifiedBesselFunction_k_exponentiallyWeighted
(
Real
nu
,
Real
x);
44
45
std::complex<Real>
modifiedBesselFunction_i
(
Real
nu
,
46
const
std::complex<Real>& z);
47
std::complex<Real>
modifiedBesselFunction_k
(
Real
nu
,
48
const
std::complex<Real>& z);
49
std::complex<Real>
50
modifiedBesselFunction_i_exponentiallyWeighted
(
Real
nu
,
51
const
std::complex<Real> &z);
52
std::complex<Real>
53
modifiedBesselFunction_k_exponentiallyWeighted
(
Real
nu
,
54
const
std::complex<Real> &z);
55
}
56
#endif
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib
Definition:
any.hpp:35
QuantLib::modifiedBesselFunction_k_exponentiallyWeighted
Real modifiedBesselFunction_k_exponentiallyWeighted(Real nu, Real x)
Definition:
modifiedbessel.cpp:142
QuantLib::modifiedBesselFunction_k
Real modifiedBesselFunction_k(Real nu, Real x)
Definition:
modifiedbessel.cpp:111
QuantLib::modifiedBesselFunction_i
Real modifiedBesselFunction_i(Real nu, Real x)
Definition:
modifiedbessel.cpp:96
QuantLib::modifiedBesselFunction_i_exponentiallyWeighted
Real modifiedBesselFunction_i_exponentiallyWeighted(Real nu, Real x)
Definition:
modifiedbessel.cpp:124
nu
Real nu
Definition:
sabr.cpp:200
types.hpp
Custom types.
Generated by
Doxygen
1.9.5