Loading [MathJax]/jax/output/HTML-CSS/config.js
QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
i
l
m
n
p
r
s
t
Typedefs
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
v
y
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
j
l
m
n
o
p
q
s
t
u
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
g
h
i
k
m
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
a
b
c
d
f
i
m
n
o
p
q
r
s
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
v
w
x
y
z
Macros
b
d
i
m
n
p
q
s
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
ql
math
optimization
goldstein.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) 2015 Cheng Li
5
This file is part of QuantLib, a free-software/open-source library
6
for financial quantitative analysts and developers - http://quantlib.org/
7
8
QuantLib is free software: you can redistribute it and/or modify it
9
under the terms of the QuantLib license. You should have received a
10
copy of the license along with this program; if not, please email
11
<quantlib-dev@lists.sf.net>. The license is also available online at
12
<http://quantlib.org/license.shtml>.
13
14
This program is distributed in the hope that it will be useful, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
FOR A PARTICULAR PURPOSE. See the license for more details.
17
*/
18
19
/*! \file goldstein.hpp
20
\brief Goldstein and Price line-search class
21
*/
22
23
#ifndef quantlib_optimization_goldstein_hpp
24
#define quantlib_optimization_goldstein_hpp
25
26
#include <
ql/math/optimization/linesearch.hpp
>
27
28
namespace
QuantLib
{
29
30
class
GoldsteinLineSearch
:
public
LineSearch
{
31
public
:
32
//! Default constructor
33
GoldsteinLineSearch
(
Real
eps = 1e-8,
34
Real
alpha
= 0.05,
35
Real
beta
= 0.65,
36
Real
extrapolation = 1.5)
37
:
LineSearch
(eps),
alpha_
(
alpha
),
beta_
(
beta
),
extrapolation_
(extrapolation) {}
38
39
//! Perform line search
40
Real
operator()
(
Problem
& P,
// Optimization problem
41
EndCriteria::Type
& ecType,
42
const
EndCriteria
&,
43
Real
t_ini)
override
;
// initial value of line-search step
44
45
private
:
46
Real
alpha_
,
beta_
;
47
Real
extrapolation_
;
48
};
49
50
}
51
52
#endif
QuantLib::EndCriteria
Criteria to end optimization process:
Definition:
endcriteria.hpp:40
QuantLib::EndCriteria::Type
Type
Definition:
endcriteria.hpp:42
QuantLib::GoldsteinLineSearch
Definition:
goldstein.hpp:30
QuantLib::GoldsteinLineSearch::extrapolation_
Real extrapolation_
Definition:
goldstein.hpp:47
QuantLib::GoldsteinLineSearch::beta_
Real beta_
Definition:
goldstein.hpp:46
QuantLib::GoldsteinLineSearch::operator()
Real operator()(Problem &P, EndCriteria::Type &ecType, const EndCriteria &, Real t_ini) override
Perform line search.
Definition:
goldstein.cpp:26
QuantLib::GoldsteinLineSearch::alpha_
Real alpha_
Definition:
goldstein.hpp:46
QuantLib::GoldsteinLineSearch::GoldsteinLineSearch
GoldsteinLineSearch(Real eps=1e-8, Real alpha=0.05, Real beta=0.65, Real extrapolation=1.5)
Default constructor.
Definition:
goldstein.hpp:33
QuantLib::LineSearch
Base class for line search.
Definition:
linesearch.hpp:38
QuantLib::Problem
Constrained optimization problem.
Definition:
problem.hpp:42
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
linesearch.hpp
Line search abstract class.
QuantLib
Definition:
any.hpp:35
beta
Real beta
Definition:
sabr.cpp:200
alpha
Real alpha
Definition:
sabr.cpp:200
Generated by
Doxygen
1.9.5