@Test(enabled = false)
/**
* Analyzes the shape of the forward curve.
*/
public void forwardAnalysis() {
final HullWhiteOneFactorProvider marketDsc = CURVES_PAR_SPREAD_MQ_WITHOUT_TODAY_BLOCK.get(0).getFirst();
final int jump = 1;
final int startIndex = 0;
final int nbDate = 2750;
ZonedDateTime startDate = ScheduleCalculator.getAdjustedDate(NOW, EURIBOR3M.getSpotLag() + startIndex * jump, TARGET);
final double[] rateDsc = new double[nbDate];
final double[] startTime = new double[nbDate];
try {
final FileWriter writer = new FileWriter("fwd-dsc.csv");
for (int loopdate = 0; loopdate < nbDate; loopdate++) {
startTime[loopdate] = TimeCalculator.getTimeBetween(NOW, startDate);
final ZonedDateTime endDate = ScheduleCalculator.getAdjustedDate(startDate, EURIBOR3M, TARGET);
final double endTime = TimeCalculator.getTimeBetween(NOW, endDate);
final double accrualFactor = EURIBOR3M.getDayCount().getDayCountFraction(startDate, endDate);
rateDsc[loopdate] = marketDsc.getMulticurveProvider().getForwardRate(EURIBOR3M, startTime[loopdate], endTime, accrualFactor);
startDate = ScheduleCalculator.getAdjustedDate(startDate, jump, TARGET);
writer.append(0.0 + "," + startTime[loopdate] + "," + rateDsc[loopdate] + "\n");
}
writer.flush();
writer.close();