@@ -92,12 +92,12 @@ std::vector<QuantExt::RandomVariable>
9292simulatePathInterface2 (const QuantLib::ext::shared_ptr<AmcCalculator>& amcCalc, const std::vector<Real>& pathTimes,
9393 std::vector<std::vector<RandomVariable>>& paths, const std::vector<size_t >& pathIdx,
9494 const std::vector<size_t >& timeIdx,
95- const bool moveStateToPreviousTime, const std::string& tradeLabel,
95+ const std::string& tradeLabel,
9696 const std::string& tradeType) {
9797 QL_REQUIRE (pathIdx.size () == timeIdx.size (),
9898 " internal error, mismatch between relevant path idx and timegrid idx, please contact dev" );
9999 try {
100- return amcCalc->simulatePath (pathTimes, paths, pathIdx, timeIdx, moveStateToPreviousTime );
100+ return amcCalc->simulatePath (pathTimes, paths, pathIdx, timeIdx);
101101 } catch (const std::exception& e) {
102102 StructuredTradeErrorMessage (tradeLabel, tradeType, " error during amc path simulation for trade." , e.what ())
103103 .log ();
@@ -441,7 +441,7 @@ void runCoreEngine(const QuantLib::ext::shared_ptr<ore::data::Portfolio>& portfo
441441
442442 if (!sgd->withCloseOutLag ()) {
443443 // no close-out lag, fill depth 0 with npv on path
444- auto res = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, allTimes, allTimes, false , tradeLabel[j],
444+ auto res = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, allTimes, allTimes, tradeLabel[j],
445445 tradeType[j]);
446446 Real v = outputCube->getT0 (tradeId[j], 0 );
447447 outputCube->setT0 (v +
@@ -467,10 +467,10 @@ void runCoreEngine(const QuantLib::ext::shared_ptr<ore::data::Portfolio>& portfo
467467 if (sgd->withMporStickyDate ()) {
468468 // sticky date mpor mode. simulate the valuation times...
469469 auto res = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, valuationTimeIdx,
470- valuationTimeIdx, false , tradeLabel[j], tradeType[j]);
470+ valuationTimeIdx, tradeLabel[j], tradeType[j]);
471471 // ... and then the close-out times, but times moved to the valuation times
472472 auto resLag = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, closeOutTimeIdx,
473- valuationTimeIdx, true , tradeLabel[j], tradeType[j]);
473+ valuationTimeIdx, tradeLabel[j], tradeType[j]);
474474 Real v = outputCube->getT0 (tradeId[j], 0 );
475475 outputCube->setT0 (v +
476476 res[0 ].at (0 ) * fx (fxBuffer, currencyIndex[j], 0 , 0 ) *
@@ -519,7 +519,7 @@ void runCoreEngine(const QuantLib::ext::shared_ptr<ore::data::Portfolio>& portfo
519519 }
520520 } else {
521521 // actual date mpor mode: simulate all times in one go
522- auto res = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, allTimes, allTimes, false ,
522+ auto res = simulatePathInterface2 (amcCalculators[j], pathTimes, paths, allTimes, allTimes,
523523 tradeLabel[j], tradeType[j]);
524524 Real v = outputCube->getT0 (tradeId[j], 0 );
525525 outputCube->setT0 (v + res[0 ].at (0 ) * fx (fxBuffer, currencyIndex[j], 0 , 0 ) *
0 commit comments