public void test_createFullTransform() {
SabrIborCapletFloorletVolatilityCalibrationDefinition fixedBeta =
SabrIborCapletFloorletVolatilityCalibrationDefinition.ofFixedBeta(
NAME, USD_LIBOR_3M, ACT_365F, BETA_RHO, ALPHA_KNOTS, BETA_RHO_KNOTS, NU_KNOTS, DOUBLE_QUADRATIC, FLAT, LINEAR, HAGAN);
SabrIborCapletFloorletVolatilityCalibrationDefinition fixedRho =
SabrIborCapletFloorletVolatilityCalibrationDefinition.ofFixedRho(
NAME, USD_LIBOR_3M, ACT_365F, BETA_RHO, ALPHA_KNOTS, BETA_RHO_KNOTS, NU_KNOTS, DOUBLE_QUADRATIC, FLAT, LINEAR, HAGAN);
ParameterLimitsTransform[] transf = new ParameterLimitsTransform[] {
new SingleRangeLimitTransform(0.0, LimitType.GREATER_THAN),
new DoubleRangeLimitTransform(0.0, 1.0),
new DoubleRangeLimitTransform(-0.99, 0.99),
new DoubleRangeLimitTransform(0.001d, 2.50d)};
ParameterLimitsTransform[] computedFixedBeta = fixedBeta.createFullTransform(transf);
ParameterLimitsTransform[] computedFixedRho = fixedRho.createFullTransform(transf);
ParameterLimitsTransform[] expectedFixedBeta = new ParameterLimitsTransform[] {
transf[0], transf[0], transf[0], transf[0], transf[0], transf[0], transf[2], transf[2], transf[2],
transf[3], transf[3], transf[3], transf[3], transf[3], transf[3]};
ParameterLimitsTransform[] expectedFixedRho = new ParameterLimitsTransform[] {
transf[0], transf[0], transf[0], transf[0], transf[0], transf[0], transf[1], transf[1], transf[1],
transf[3], transf[3], transf[3], transf[3], transf[3], transf[3]};
assertEquals(computedFixedBeta, expectedFixedBeta);
assertEquals(computedFixedRho, expectedFixedRho);
}