Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added pricing engines for spread- and basket options #2110

Merged
merged 48 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bf1d880
Bjerksund-Stensland spread engine
klausspanderen Feb 23, 2024
df45fa9
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Feb 23, 2024
d295a28
fixed syntax error
klausspanderen Feb 23, 2024
6f0f78b
first light
klausspanderen Apr 1, 2024
b6ad17f
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Apr 1, 2024
f25d362
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Apr 22, 2024
a628143
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Apr 22, 2024
b293a99
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen May 27, 2024
e525781
first version ready
klausspanderen Jun 2, 2024
cb2dd82
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Jun 2, 2024
ed9ee5b
second order approximation
klausspanderen Jun 27, 2024
ad14f6f
first step for Choi engine
klausspanderen Jul 8, 2024
b78d059
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Jul 8, 2024
b01e2d8
.
klausspanderen Jul 11, 2024
a0d0cec
Update denglizhoubasketengine.cpp
klausspanderen Jul 26, 2024
a306a54
added halley solver
klausspanderen Aug 11, 2024
ad57ee3
add halley solver
klausspanderen Aug 11, 2024
fcbe0a5
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Aug 11, 2024
0a160fd
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Aug 11, 2024
67b3201
.
klausspanderen Sep 1, 2024
4aec58e
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Sep 1, 2024
4dcbb23
first light Choi engine
klausspanderen Sep 10, 2024
92aed57
.
klausspanderen Sep 21, 2024
571a4f2
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Sep 23, 2024
b1f1ae0
secure intermediate results
klausspanderen Oct 9, 2024
75bc084
forward deltas for Choi engine
klausspanderen Oct 19, 2024
49b8825
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Oct 19, 2024
4e44689
large spread and basket option test case
klausspanderen Oct 21, 2024
3ffc47a
fixed smaller issues
klausspanderen Oct 21, 2024
7472600
fixed smaller issues
klausspanderen Oct 21, 2024
bd3a01d
added all.hpp files
klausspanderen Oct 21, 2024
b40e6e8
fixed VS build files
klausspanderen Oct 21, 2024
1d4be64
fixed VS build files
klausspanderen Oct 21, 2024
84e7237
Choi engine supports spread payoffs
klausspanderen Oct 28, 2024
a7fa540
introduced FDM Wiener operator
klausspanderen Nov 5, 2024
7418b93
removed old multi dim Black-Scholes Op
klausspanderen Nov 6, 2024
095f862
fixed test cases
klausspanderen Nov 6, 2024
3c0b6e2
remove print statement
klausspanderen Nov 6, 2024
736809e
fixed compile bug
klausspanderen Nov 6, 2024
932ed9e
fixed compile bug
klausspanderen Nov 6, 2024
fd38501
fixed test suite runtime
klausspanderen Nov 9, 2024
da97a45
Merge remote-tracking branch 'origin/spread_option' into spread_option
klausspanderen Nov 9, 2024
313700a
enable examples
klausspanderen Nov 9, 2024
22f4e82
fixed typos
klausspanderen Nov 9, 2024
90cf671
fixed missing explicit
klausspanderen Nov 9, 2024
8c1e9ac
fixed typo
klausspanderen Nov 10, 2024
efb1c78
fixed typo
klausspanderen Nov 10, 2024
4529267
moved SumExponentialsRootSolver to detail namespace
klausspanderen Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions QuantLib.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@
<ClInclude Include="ql\math\matrixutilities\factorreduction.hpp" />
<ClInclude Include="ql\math\matrixutilities\getcovariance.hpp" />
<ClInclude Include="ql\math\matrixutilities\gmres.hpp" />
<ClInclude Include="ql\math\matrixutilities\householder.hpp" />
<ClInclude Include="ql\math\matrixutilities\pseudosqrt.hpp" />
<ClInclude Include="ql\math\matrixutilities\qrdecomposition.hpp" />
<ClInclude Include="ql\math\matrixutilities\sparseilupreconditioner.hpp" />
Expand Down Expand Up @@ -1137,6 +1138,7 @@
<ClInclude Include="ql\math\solvers1d\brent.hpp" />
<ClInclude Include="ql\math\solvers1d\falseposition.hpp" />
<ClInclude Include="ql\math\solvers1d\finitedifferencenewtonsafe.hpp" />
<ClInclude Include="ql\math\solvers1d\halley.hpp" />
<ClInclude Include="ql\math\solvers1d\newton.hpp" />
<ClInclude Include="ql\math\solvers1d\newtonsafe.hpp" />
<ClInclude Include="ql\math\solvers1d\ridder.hpp" />
Expand Down Expand Up @@ -1198,6 +1200,7 @@
<ClInclude Include="ql\methods\finitedifferences\operators\fdmlinearopiterator.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmlinearoplayout.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmlocalvolfwdop.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmwienerop.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmornsteinuhlenbeckop.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmsabrop.hpp" />
<ClInclude Include="ql\methods\finitedifferences\operators\fdmsquarerootfwdop.hpp" />
Expand Down Expand Up @@ -1495,11 +1498,19 @@
<ClInclude Include="ql\pricingengines\barrier\fdhestonrebateengine.hpp" />
<ClInclude Include="ql\pricingengines\barrier\mcbarrierengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\all.hpp" />
<ClInclude Include="ql\pricingengines\basket\bjerksundstenslandspreadengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\choibasketengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\denglizhoubasketengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\fd2dblackscholesvanillaengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\fdndimblackscholesvanillaengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\kirkengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\mcamericanbasketengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\mceuropeanbasketengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\operatorsplittingspreadengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\singlefactorbsmbasketengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\spreadblackscholesvanillaengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\stulzengine.hpp" />
<ClInclude Include="ql\pricingengines\basket\vectorbsmprocessextractor.hpp" />
<ClInclude Include="ql\pricingengines\blackcalculator.hpp" />
<ClInclude Include="ql\pricingengines\blackformula.hpp" />
<ClInclude Include="ql\pricingengines\blackscholescalculator.hpp" />
Expand Down Expand Up @@ -2271,6 +2282,7 @@
<ClCompile Include="ql\math\matrixutilities\factorreduction.cpp" />
<ClCompile Include="ql\math\matrixutilities\getcovariance.cpp" />
<ClCompile Include="ql\math\matrixutilities\gmres.cpp" />
<ClCompile Include="ql\math\matrixutilities\householder.cpp" />
<ClCompile Include="ql\math\matrixutilities\pseudosqrt.cpp" />
<ClCompile Include="ql\math\matrixutilities\qrdecomposition.cpp" />
<ClCompile Include="ql\math\matrixutilities\sparseilupreconditioner.cpp" />
Expand Down Expand Up @@ -2344,6 +2356,7 @@
<ClCompile Include="ql\methods\finitedifferences\operators\fdmhullwhiteop.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmlinearoplayout.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmlocalvolfwdop.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmwienerop.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmornsteinuhlenbeckop.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmsabrop.cpp" />
<ClCompile Include="ql\methods\finitedifferences\operators\fdmsquarerootfwdop.cpp" />
Expand Down Expand Up @@ -2555,11 +2568,19 @@
<ClCompile Include="ql\pricingengines\barrier\fdhestondoublebarrierengine.cpp" />
<ClCompile Include="ql\pricingengines\barrier\fdhestonrebateengine.cpp" />
<ClCompile Include="ql\pricingengines\barrier\mcbarrierengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\bjerksundstenslandspreadengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\choibasketengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\denglizhoubasketengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\fd2dblackscholesvanillaengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\fdndimblackscholesvanillaengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\kirkengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\mcamericanbasketengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\mceuropeanbasketengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\operatorsplittingspreadengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\singlefactorbsmbasketengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\spreadblackscholesvanillaengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\stulzengine.cpp" />
<ClCompile Include="ql\pricingengines\basket\vectorbsmprocessextractor.cpp" />
<ClCompile Include="ql\pricingengines\blackcalculator.cpp" />
<ClCompile Include="ql\pricingengines\blackformula.cpp" />
<ClCompile Include="ql\pricingengines\blackscholescalculator.cpp" />
Expand Down
67 changes: 65 additions & 2 deletions QuantLib.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Natvis Include="QuantLib.natvis" />
Expand Down Expand Up @@ -4413,6 +4413,39 @@
<ClInclude Include="ql\indexes\ibor\swestr.hpp">
<Filter>indexes\ibor</Filter>
</ClInclude>
<ClInclude Include="ql\math\matrixutilities\householder.hpp">
<Filter>math\matrixutilities</Filter>
</ClInclude>
<ClInclude Include="ql\math\solvers1d\halley.hpp">
<Filter>math\solvers1D</Filter>
</ClInclude>
<ClInclude Include="ql\methods\finitedifferences\operators\fdmwienerop.hpp">
<Filter>methods\finitedifferences\operators</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\bjerksundstenslandspreadengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\choibasketengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\denglizhoubasketengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\fdndimblackscholesvanillaengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\operatorsplittingspreadengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\singlefactorbsmbasketengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\spreadblackscholesvanillaengine.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
<ClInclude Include="ql\pricingengines\basket\vectorbsmprocessextractor.hpp">
<Filter>pricingengines\basket</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ql\methods\montecarlo\brownianbridge.cpp">
Expand Down Expand Up @@ -7161,5 +7194,35 @@
<ClCompile Include="ql\time\daycounters\yearfractiontodate.cpp">
<Filter>time\daycounters</Filter>
</ClCompile>
<ClCompile Include="ql\math\matrixutilities\householder.cpp">
<Filter>math\matrixutilities</Filter>
</ClCompile>
<ClCompile Include="ql\methods\finitedifferences\operators\fdmwienerop.cpp">
<Filter>methods\finitedifferences\operators</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\bjerksundstenslandspreadengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\choibasketengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\denglizhoubasketengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\fdndimblackscholesvanillaengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\operatorsplittingspreadengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\singlefactorbsmbasketengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\spreadblackscholesvanillaengine.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
<ClCompile Include="ql\pricingengines\basket\vectorbsmprocessextractor.cpp">
<Filter>pricingengines\basket</Filter>
</ClCompile>
</ItemGroup>
</Project>
</Project>
21 changes: 21 additions & 0 deletions ql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ set(QL_SOURCES
math/matrixutilities/factorreduction.cpp
math/matrixutilities/getcovariance.cpp
math/matrixutilities/gmres.cpp
math/matrixutilities/householder.cpp
math/matrixutilities/pseudosqrt.cpp
math/matrixutilities/qrdecomposition.cpp
math/matrixutilities/sparseilupreconditioner.cpp
Expand Down Expand Up @@ -461,6 +462,7 @@ set(QL_SOURCES
methods/finitedifferences/operators/fdmornsteinuhlenbeckop.cpp
methods/finitedifferences/operators/fdmsabrop.cpp
methods/finitedifferences/operators/fdmsquarerootfwdop.cpp
methods/finitedifferences/operators/fdmwienerop.cpp
methods/finitedifferences/operators/firstderivativeop.cpp
methods/finitedifferences/operators/ninepointlinearop.cpp
methods/finitedifferences/operators/nthorderderivativeop.cpp
Expand Down Expand Up @@ -672,10 +674,18 @@ set(QL_SOURCES
pricingengines/barrier/fdhestondoublebarrierengine.cpp
pricingengines/barrier/fdhestonrebateengine.cpp
pricingengines/barrier/mcbarrierengine.cpp
pricingengines/basket/bjerksundstenslandspreadengine.cpp
pricingengines/basket/choibasketengine.cpp
pricingengines/basket/vectorbsmprocessextractor.cpp
pricingengines/basket/denglizhoubasketengine.cpp
pricingengines/basket/fd2dblackscholesvanillaengine.cpp
pricingengines/basket/fdndimblackscholesvanillaengine.cpp
pricingengines/basket/kirkengine.cpp
pricingengines/basket/mcamericanbasketengine.cpp
pricingengines/basket/mceuropeanbasketengine.cpp
pricingengines/basket/operatorsplittingspreadengine.cpp
pricingengines/basket/singlefactorbsmbasketengine.cpp
pricingengines/basket/spreadblackscholesvanillaengine.cpp
pricingengines/basket/stulzengine.cpp
pricingengines/blackcalculator.cpp
pricingengines/blackformula.cpp
Expand Down Expand Up @@ -1468,6 +1478,7 @@ set(QL_HEADERS
math/matrixutilities/expm.hpp
math/matrixutilities/getcovariance.hpp
math/matrixutilities/gmres.hpp
math/matrixutilities/householder.hpp
math/matrixutilities/pseudosqrt.hpp
math/matrixutilities/qrdecomposition.hpp
math/matrixutilities/sparseilupreconditioner.hpp
Expand Down Expand Up @@ -1535,6 +1546,7 @@ set(QL_HEADERS
math/solvers1d/brent.hpp
math/solvers1d/falseposition.hpp
math/solvers1d/finitedifferencenewtonsafe.hpp
math/solvers1d/halley.hpp
math/solvers1d/newton.hpp
math/solvers1d/newtonsafe.hpp
math/solvers1d/ridder.hpp
Expand Down Expand Up @@ -1595,6 +1607,7 @@ set(QL_HEADERS
methods/finitedifferences/operators/fdmornsteinuhlenbeckop.hpp
methods/finitedifferences/operators/fdmsabrop.hpp
methods/finitedifferences/operators/fdmsquarerootfwdop.hpp
methods/finitedifferences/operators/fdmwienerop.hpp
methods/finitedifferences/operators/firstderivativeop.hpp
methods/finitedifferences/operators/modtriplebandlinearop.hpp
methods/finitedifferences/operators/ninepointlinearop.hpp
Expand Down Expand Up @@ -1865,10 +1878,18 @@ set(QL_HEADERS
pricingengines/barrier/fdhestondoublebarrierengine.hpp
pricingengines/barrier/fdhestonrebateengine.hpp
pricingengines/barrier/mcbarrierengine.hpp
pricingengines/basket/bjerksundstenslandspreadengine.hpp
pricingengines/basket/choibasketengine.hpp
pricingengines/basket/vectorbsmprocessextractor.hpp
pricingengines/basket/denglizhoubasketengine.hpp
pricingengines/basket/fd2dblackscholesvanillaengine.hpp
pricingengines/basket/fdndimblackscholesvanillaengine.hpp
pricingengines/basket/kirkengine.hpp
pricingengines/basket/mcamericanbasketengine.hpp
pricingengines/basket/mceuropeanbasketengine.hpp
pricingengines/basket/operatorsplittingspreadengine.hpp
pricingengines/basket/singlefactorbsmbasketengine.hpp
pricingengines/basket/spreadblackscholesvanillaengine.hpp
pricingengines/basket/stulzengine.hpp
pricingengines/blackcalculator.hpp
pricingengines/blackformula.hpp
Expand Down
6 changes: 4 additions & 2 deletions ql/instruments/basketoption.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ namespace QuantLib {

class AverageBasketPayoff : public BasketPayoff {
public:
AverageBasketPayoff(const ext::shared_ptr<Payoff>& p, Array a)
: BasketPayoff(p), weights_(std::move(a)) {}
AverageBasketPayoff(const ext::shared_ptr<Payoff>& p, Array weights)
: BasketPayoff(p), weights_(std::move(weights)) {}
AverageBasketPayoff(const ext::shared_ptr<Payoff> &p,
Size n)
: BasketPayoff(p), weights_(n, 1.0/static_cast<Real>(n)) {}
Expand All @@ -80,6 +80,8 @@ namespace QuantLib {
a.begin(), Real(0.0));
}

const Array& weights() const { return weights_; }

private:
Array weights_;
};
Expand Down
46 changes: 46 additions & 0 deletions ql/math/integrals/gaussianquadratures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <ql/math/matrixutilities/tqreigendecomposition.hpp>
#include <ql/math/matrixutilities/symmetricschurdecomposition.hpp>

#include <map>

namespace QuantLib {

GaussianQuadrature::GaussianQuadrature(
Expand Down Expand Up @@ -59,6 +61,50 @@ namespace QuantLib {
}


MultiDimGaussianIntegration::MultiDimGaussianIntegration(
const std::vector<Size>& ns,
const std::function<ext::shared_ptr<GaussianQuadrature>(Size)>& genQuad)
: weights_(std::accumulate(ns.begin(), ns.end(), Size(1), std::multiplies<>()), 1.0),
x_(weights_.size(), Array(ns.size())) {

const Size m = ns.size();
const Size n = x_.size();

std::vector<Size> spacing(m);
spacing[0] = 1;
std::partial_sum(ns.begin(), ns.end()-1, spacing.begin()+1, std::multiplies<>());

std::map<Size, Array> n2weights, n2x;
for (auto order: ns) {
if (n2x.find(order) == n2x.end()) {
const ext::shared_ptr<GaussianQuadrature> quad = genQuad(order);
n2x[order] = quad->x();
n2weights[order] = quad->weights();
}
}

for (Size i=0; i < n; ++i) {
for (Size j=0; j < m; ++j) {
const Size order = ns[j];
const Size nx = (i / spacing[j]) % ns[j];
weights_[i] *= n2weights[order][nx];
x_[i][j] = n2x[order][nx];
}
}
}

Real MultiDimGaussianIntegration::operator()(
const std::function<Real(Array)>& f) const {
Real s = 0.0;
const Size n = x_.size();
for (Size i=0; i < n; ++i)
s += weights_[i]*f(x_[i]);

return s;
}



namespace detail {
template <class Integration>
GaussianQuadratureIntegrator<Integration>::GaussianQuadratureIntegrator(
Expand Down
16 changes: 16 additions & 0 deletions ql/math/integrals/gaussianquadratures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ namespace QuantLib {
Array x_, w_;
};

class MultiDimGaussianIntegration {
public:
MultiDimGaussianIntegration(
const std::vector<Size>& ns,
const std::function<ext::shared_ptr<GaussianQuadrature>(Size)>& genQuad);

Real operator()(const std::function<Real(Array)>& f) const;

const Array& weights() const { return weights_; }
const std::vector<Array>& x() const { return x_; }

private:
Array weights_;
std::vector<Array> x_;
};


//! generalized Gauss-Laguerre integration
/*! This class performs a 1-dimensional Gauss-Laguerre integration.
Expand Down
6 changes: 3 additions & 3 deletions ql/math/interpolations/chebyshevinterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@


namespace QuantLib {
class LagrangeInterpolation;

/*! References:
S.A. Sarra: Chebyshev Interpolation: An Interactive Tour,
https://www.maa.org/sites/default/files/images/upload_library/4/vol6/Sarra/Chebyshev.html
Expand All @@ -47,6 +45,9 @@ namespace QuantLib {
Size n, const std::function<Real(Real)>& f,
PointsType pointsType = SecondKind);

explicit ChebyshevInterpolation(const ChebyshevInterpolation&) = delete;
ChebyshevInterpolation& operator=(const ChebyshevInterpolation&) = delete;

void updateY(const Array& y);

Array nodes() const;
Expand All @@ -55,7 +56,6 @@ namespace QuantLib {
private:
const Array x_;
Array y_;
ext::shared_ptr<LagrangeInterpolation> lagrangeInterp_;
};
}

Expand Down
2 changes: 2 additions & 0 deletions ql/math/matrixutilities/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ this_include_HEADERS = \
factorreduction.hpp \
getcovariance.hpp \
gmres.hpp \
householder.hpp \
pseudosqrt.hpp \
qrdecomposition.hpp \
sparseilupreconditioner.hpp \
Expand All @@ -28,6 +29,7 @@ cpp_files = \
factorreduction.cpp \
getcovariance.cpp \
gmres.cpp \
householder.cpp \
pseudosqrt.cpp \
qrdecomposition.cpp \
sparseilupreconditioner.cpp \
Expand Down
1 change: 1 addition & 0 deletions ql/math/matrixutilities/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <ql/math/matrixutilities/factorreduction.hpp>
#include <ql/math/matrixutilities/getcovariance.hpp>
#include <ql/math/matrixutilities/gmres.hpp>
#include <ql/math/matrixutilities/householder.hpp>
#include <ql/math/matrixutilities/pseudosqrt.hpp>
#include <ql/math/matrixutilities/qrdecomposition.hpp>
#include <ql/math/matrixutilities/sparseilupreconditioner.hpp>
Expand Down
Loading
Loading