Skip to content

Commit 0ba19c9

Browse files
rolandlichtersjenkins
authored andcommitted
return ORE version
1 parent 921505a commit 0ba19c9

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

OREAnalytics/orea/app/oreapp.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ class OREApp {
7575

7676
//! time for executing run(...) in seconds
7777
Real getRunTime();
78+
79+
std::string version() {
80+
return std::string(OPEN_SOURCE_RISK_VERSION);
81+
}
7882

7983
protected:
8084
virtual void analytics();

OREData/ored/model/localvolmodelbuilder.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <ql/termstructures/volatility/equityfx/andreasenhugevolatilityinterpl.hpp>
3131
#include <ql/termstructures/volatility/equityfx/localconstantvol.hpp>
3232
#include <ql/termstructures/volatility/equityfx/localvolsurface.hpp>
33+
#include <ql/termstructures/volatility/equityfx/noexceptlocalvolsurface.hpp>
3334
#include <ql/time/daycounters/actualactual.hpp>
3435
#include <ql/pricingengines/vanilla/analyticeuropeanengine.hpp>
3536

@@ -133,11 +134,15 @@ std::vector<boost::shared_ptr<GeneralizedBlackScholesProcess>> LocalVolModelBuil
133134
"calibration error min="
134135
<< std::scientific << std::setprecision(6) << boost::get<0>(ah->calibrationError()) << " max="
135136
<< boost::get<1>(ah->calibrationError()) << " avg=" << boost::get<2>(ah->calibrationError()));
136-
} else if (lvType_ == Type::Dupire || lvType_ == Type::DupireFloored) {
137+
} else if (lvType_ == Type::Dupire) {
137138
localVol = Handle<LocalVolTermStructure>(
138139
boost::make_shared<LocalVolSurface>(processes_[l]->blackVolatility(), processes_[l]->riskFreeRate(),
139-
processes_[l]->dividendYield(), processes_[l]->stateVariable(),
140-
lvType_ == Type::DupireFloored ? true : false));
140+
processes_[l]->dividendYield(), processes_[l]->stateVariable()));
141+
} else if (lvType_ == Type::DupireFloored) {
142+
localVol = Handle<LocalVolTermStructure>(
143+
boost::make_shared<NoExceptLocalVolSurface>(processes_[l]->blackVolatility(), processes_[l]->riskFreeRate(),
144+
processes_[l]->dividendYield(), processes_[l]->stateVariable(),
145+
0.0));
141146
} else {
142147
QL_FAIL("unexpected local vol type");
143148
}

0 commit comments

Comments
 (0)