133134135136137138139140141142143
//Let's change the dateToday to current date today.subAssign(1); System.out.println("Today's date dateToday has been updated to = "+today); clock.stopClock(); clock.log(); } }
949596979899100101102103104
rp.compute(hedgesNum, scenarios); hedgesNum = 84; rp.compute(hedgesNum, scenarios); clock.stopClock(); clock.log(); } catch(final Exception ex){ ex.printStackTrace();
602603604605606607608609610611
); /* "Yield to Price" "Price to Yield" */ clock.stopClock(); clock.log(); } }
208209210211212213214215216
//Essentially both the lists obtained above are same if(listOfHoliDays.equals(holidayListObtainedUsingCalAPI)){ System.out.println("Lists listOfHoliDays and holidayListObtainedUsingCalAPI of joint calendar are same"); } clock.stopClock(); clock.log(); } }
72737475767778798081
final Date settlementDate = new Date(19, February, 2002); new Settings().setEvaluationDate(todaysDate); // TODO: code review :: please verify against QL/C++ code clock.stopClock(); clock.log(); } }
320321322323324325326327328329330
// .withCalibrationSamples(4096) // .withTolerance(0.02) // . withSeed(mcSeed); // System.out.printf(fmt, method, europeanOption.NPV(), Double.NaN, Double.NaN); clock.stopClock(); clock.log(); } }
159160161162163164165166167168
//Calculating covariance of the process final Matrix covariance = process.covariance(process.time(date18.clone()), new Array(1).fill(5.6), 0.01); System.out.println("Covariance = "+covariance.get(0, 0)); clock.stopClock(); clock.log(); } }
414415416417418419420421422423
//TODO // System.out.println("//================================LocalVolSurface========================================"); clock.stopClock(); clock.log(); } }
274275276277278279280281282283
europeanBond.setPricingEngine(engine); americanBond.setPricingEngine(engine); System.out.printf(fmt, method, europeanBond.NPV(), americanBond.NPV() ); clock.stopClock(); clock.log(); } }
118119120121122123124125126127128
//===========================================ZeroSpreadedTermStructure======================= //TODO as the code has to be updated for the PiecewiseYieldDiscountCurve clock.stopClock(); clock.log(); } }