File tree Expand file tree Collapse file tree
OREAnalytics/orea/aggregation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ const vector<Real>& FlatDynamicInitialMarginCalculator::dimResults(const std::st
4949void FlatDynamicInitialMarginCalculator::build () {
5050 LOG (" FlatDynamicInitialMarginCalculator:build() called" );
5151
52- Size stopDatesLoop = datesLoopSize_;
5352 Size samples = cube_->samples ();
5453
5554 if (!inputs_->collateralBalances ()) {
@@ -65,7 +64,7 @@ void FlatDynamicInitialMarginCalculator::build() {
6564 LOG (" Found initial margin balance " << currentIM << " for netting set " << n);
6665 }
6766
68- for (Size j = 0 ; j < stopDatesLoop ; ++j) {
67+ for (Size j = 0 ; j < cube_-> dates (). size () ; ++j) {
6968 nettingSetExpectedDIM_[n][j] = currentIM;
7069 for (Size k = 0 ; k < samples; ++k)
7170 nettingSetDIM_[n][j][k] = currentIM;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ void CompositeTrade::build(const QuantLib::ext::shared_ptr<EngineFactory>& engin
3838 fxRates_.clear ();
3939 fxRatesNotional_.clear ();
4040 legs_.clear ();
41+ QL_REQUIRE (trades_.size () > 0 , " Failed to build composite trade." );
4142 for (const QuantLib::ext::shared_ptr<Trade>& trade : trades_) {
4243
4344 trade->reset ();
You can’t perform that action at this time.
0 commit comments