new Period(frequency), calendar,
convention, convention,
DateGeneration.Rule.Backward, false);
final DividendSchedule dividends = new DividendSchedule();
final CallabilitySchedule callability = new CallabilitySchedule();
final double[] coupons = new double[] { 1.0, 0.05 };
final DayCounter bondDayCount = new Thirty360();
// Call dates, years 2, 4
final int[] callLength = { 2, 4 };
// Put dates year 3
final int[] putLength = { 3 };
final double[] callPrices = {101.5, 100.85};
final double[] putPrices = { 105.0 };
for(int i=0; i<callLength.length; i++){
callability.add(
new SoftCallability(
new Callability.Price(callPrices[i], Callability.Price.Type.Clean),
schedule.date(callLength[i]),
1.20));
}
for (int j=0; j<putLength.length; j++) {
callability.add(
new Callability(
new Callability.Price(putPrices[j],Callability.Price.Type.Clean),
Callability.Type.Put,
schedule.date(putLength[j])));
}