forked from Lainports/opnsense-ports
36 lines
1.5 KiB
Text
36 lines
1.5 KiB
Text
See:
|
|
|
|
https://github.com/lballabio/QuantLib/pull/507/
|
|
|
|
--- ql/termstructures/volatility/equityfx/fixedlocalvolsurface.cpp
|
|
+++ ql/termstructures/volatility/equityfx/fixedlocalvolsurface.cpp
|
|
@@ -132,7 +132,8 @@ namespace QuantLib {
|
|
|
|
for (Size i=0; i < strikes_.size(); ++i)
|
|
for (Size j=1; j<strikes_[i]->size(); j++) {
|
|
- QL_REQUIRE(strikes_[i]->at(j)>=strikes_[i]->at(j-1),
|
|
+ QL_REQUIRE(strikes_[i]->at(j)>=strikes_[i]->at(j-1)
|
|
+ || close_enough(strikes_[i]->at(j),strikes_[i]->at(j-1)),
|
|
"strikes must be sorted");
|
|
}
|
|
}
|
|
--- test-suite/hestonslvmodel.cpp
|
|
+++ test-suite/hestonslvmodel.cpp
|
|
@@ -2446,7 +2446,7 @@ void HestonSLVModelTest::testMoustacheGraph() {
|
|
-0.0293,-0.0297,-0.0251,-0.0192,-0.0134,-0.0084,-0.0045,
|
|
-0.0015, 0.0005, 0.0017, 0.0020
|
|
};
|
|
- const Real tol = 8e-3;
|
|
+ const Real tol = 1e-2;
|
|
|
|
for (Size i=0; i < 18; ++i) {
|
|
const Real dist = 10.0+5.0*i;
|
|
--- test-suite/fdheston.cpp 2018-05-21 08:58:38.000000000 -0400
|
|
+++ test-suite/fdheston.cpp 2018-07-20 18:51:34.213199000 -0400
|
|
@@ -469,5 +469,5 @@
|
|
new FdHestonVanillaEngine(boost::shared_ptr<HestonModel>(
|
|
new HestonModel(hestonProcess)),
|
|
- 500, 400, 3, 0,
|
|
+ 4000, 400, 3, 0,
|
|
FdmSchemeDesc::ExplicitEuler())));
|
|
|