}
}
final DoubleMatrix2D jacT = new DoubleMatrix2D(res);
// System.out.println(jacT.toString());
final LUDecompositionCommons decomp = new LUDecompositionCommons();
final LUDecompositionResult luRes = decomp.evaluate(jacT);
out.append("\\begin{tabular}{");
for (int i = 0; i < nPillars + 1; i++) {
out.append("c|");
}
out.append("}\n");
out.append("\\cline{2-" + (nPillars + 1) + "}\n");
out.append("& \\multicolumn{" + nPillars + "}{c|}{Hedge Instrument Maturity}\\\\\n");
out.append("\\hline\n");
out.append("\\multicolumn{1}{|c|}{CDS Maturity}");
for (int i = 0; i < nPillars; i++) {
out.append("& " + TENORS[i].toString());
}
out.append("\\\\\n");
out.append("\\hline\n");
for (int i = 0; i < IMM_DATES.length; i = i + 2) {
final LocalDate mat = IMM_DATES[i];
out.append("\\multicolumn{1}{|c|}{" + mat.toString(formatt) + "}");
final CDSAnalytic cds = factory.makeCDS(TRADE_DATE, STARTDATE, mat);
final double[] temp = new double[nPillars];
for (int j = 0; j < nPillars; j++) {
final double sense = PRICER.pvCreditSensitivity(cds, YIELD_CURVE, CREDIT_CURVE, coupon, j);
temp[j] = sense;
}
final DoubleMatrix1D vLambda = new DoubleMatrix1D(temp);
// System.out.println(vLambda);
final DoubleMatrix1D w = luRes.solve(vLambda);
for (int j = 0; j < nPillars; j++) {
out.append(String.format("& %.5f", w.getEntry(j)));
}
out.append("\\\\\n");