Dear OpenGamma Community,

For those, who would be interested in the solution, there should be only 1 unit:

private static final int NB_UNITS[] = new int[] {1};

//Additive generator:

final GeneratorYDCurve genAddExistFwd = new GeneratorCurveAddYieldExisiting(genIntLin, false, CURVE_NAME_FWD3_GBP);

//used in the unit:

GENERATORS_UNITS[0][0] = new GeneratorYDCurve[] {genIntLin, genAddExistFwd};

// and now important order of curves in the unit - first the curve that is known:

NAMES_UNITS[0][0] = new String[] {CURVE_NAME_FWD3_GBP, CURVE_NAME_DSC_GBP };

The problem I am facing is building s set of curves {DSC, FWD1M, FWD3M, FWD6M}, where only one is constructed by interpolation, for simplicity using:

final GeneratorYDCurve genIntLin = new GeneratorCurveYieldInterpolated(MATURITY_CALCULATOR, INTERPOLATOR_LINEAR);

and all the others are constructed as a spread. w.r.t. the curve with neighbouring period of the underlying index.

E.g. assuming, that FWD3M is generated by genIntLin, I would like to have generators:

final GeneratorYDCurve genIntCCS = CurveCalibrationConventionDataSets.generatorYDMatCcs();

final GeneratorYDCurve genAddExistFwd1M = new GeneratorCurveAddYieldExisiting(genIntCCS, false, FWD1M); //generator for the DSC curve

final GeneratorYDCurve genAddExistFwd3M = new GeneratorCurveAddYieldExisiting(genIntCCS, false, FWD3M); //generator for the FWD1M and FWD6M curves

If I put this kind of set up to one unit, it does not converge.

I am not interested in a set up like:

GENERATORS_UNITS[0][0] = new GeneratorYDCurve[] {genIntLin, genAddExistFwd3M, genAddExistFwd3M, genAddExistFwd3M};

NAMES_UNITS[0][0] = new String[] {FWD3M, DSC, FWD1M, FWD6M};

The reason for this kind of set up I am asking is that I found, that it is the only way to have meaningful forward basis between all curves. Other set up (like the one unwanted above) usually produces some poor effects in forward basis purely related to interpolation scheme, while it can be avoided by building up basis spreads one on top of the other.

Any hint how to create a working unit with such construction would be very appreciated.

To make it even more difficult, I could imagine that even I would like to have FWD3M as my “root” curve, there may be data valid only out to 30Y, while there are quotes for FWD6M available out to 50Y, so I would like to extrapolate it based on the flat spread w.r.t. FWD6M curve - as I understand I have a problem of entanglement, as construction of FWD6M curve requires a FWD3M curve and vice versa.

Thank you in advance for your support.

Regards,

Slusek