Package com.opengamma.analytics.financial.montecarlo

Examples of com.opengamma.analytics.financial.montecarlo.MonteCarloDiscountFactorDerivativeDataBundle


            y[i][looppath] += x[j][looppath] * covCD[i][j];
          }
        }
      }
      final Double[][][] pD = pathGeneratorDiscount(pDI, y, h, h2, gamma);
      final MonteCarloDiscountFactorDerivativeDataBundle mcdDB = new MonteCarloDiscountFactorDerivativeDataBundle(pD, impactAmount);
      pvBlock[loopblock] = instrument.accept(MCDC, mcdDB) * nbPath2[loopblock];
      pv += pvBlock[loopblock];
      // Backward sweep (in block loop)
      for (int loopjump = 0; loopjump < nbJump; loopjump++) {
        for (int loopimp = 0; loopimp < impactAmount[loopjump].length; loopimp++) {
          impactAmountBar[loopjump][loopimp] += mcdDB.getImpactAmountDerivative()[loopjump][loopimp] * nbPath2[loopblock] * pvBlockBar[loopblock];
        }
      }
      final Double[][][] pDBar = new Double[nbPath2[loopblock]][nbJump][];
      for (int looppath = 0; looppath < nbPath2[loopblock]; looppath++) {
        for (int loopjump = 0; loopjump < nbJump; loopjump++) {
          pDBar[looppath][loopjump] = new Double[impactAmount[loopjump].length];
          for (int loopimp = 0; loopimp < impactAmount[loopjump].length; loopimp++) {
            pDBar[looppath][loopjump][loopimp] = mcdDB.getPathDiscountingFactorDerivative()[looppath][loopjump][loopimp] * nbPath2[loopblock] * pvBlockBar[loopblock];
          }
        }
      }
      final double[][] pDIBarTemp = pathGeneratorDiscountAdjointIDF(pDI, y, h, h2, gamma, pDBar);
      for (int loopjump = 0; loopjump < nbJump; loopjump++) {
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.montecarlo.MonteCarloDiscountFactorDerivativeDataBundle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.