CalibratedCurves: Replaced SwapLegWithResetting with SwapLeg
@@ -29,7 +29,6 @@ import net.finmath.marketdata.products.Deposit;
import net.finmath.marketdata.products.ForwardRateAgreement;
import net.finmath.marketdata.products.Swap;
import net.finmath.marketdata.products.SwapLeg;
-import net.finmath.marketdata.products.SwapLegWithResetting;
import net.finmath.optimizer.SolverException;
import net.finmath.time.RegularSchedule;
import net.finmath.time.ScheduleInterface;
@@ -472,22 +471,20 @@ public class CalibratedCurves {
product = new SwapLeg(tenorReceiver, forwardCurveReceiverName, calibrationSpec.spreadReceiver, calibrationSpec.discountCurveReceiverName, true);
}
else if(calibrationSpec.type.toLowerCase().equals("swap")) {
- // note that a swap is always assumed to have a notional reset
- // this does not have an effect on a "normal" swap where both legs have the same start and endDate and for both legs periodEnd(i)=periodStart(i+1) holds
SwapLeg legReceiver = new SwapLeg(tenorReceiver, forwardCurveReceiverName, calibrationSpec.spreadReceiver, calibrationSpec.discountCurveReceiverName, true);
SwapLeg legPayer = new SwapLeg(tenorPayer, forwardCurvePayerName, calibrationSpec.spreadPayer, calibrationSpec.discountCurvePayerName, true);
product = new Swap(legReceiver, legPayer);
}
else if(calibrationSpec.type.toLowerCase().equals("swapwithresetonreceiver")) {
String discountCurveForNotionalResetName = calibrationSpec.discountCurvePayerName;
- SwapLegWithResetting legReceiver = new SwapLegWithResetting(tenorReceiver, forwardCurveReceiverName, calibrationSpec.spreadReceiver, calibrationSpec.discountCurveReceiverName, discountCurveForNotionalResetName, true);
+ SwapLeg legReceiver = new SwapLeg(tenorReceiver, forwardCurveReceiverName, calibrationSpec.spreadReceiver, calibrationSpec.discountCurveReceiverName, discountCurveForNotionalResetName, true);
SwapLeg legPayer = new SwapLeg(tenorPayer, forwardCurvePayerName, calibrationSpec.spreadPayer, calibrationSpec.discountCurvePayerName, true);
product = new Swap(legReceiver, legPayer);
}
else if(calibrationSpec.type.toLowerCase().equals("swapwithresetonpayer")) {
String discountCurveForNotionalResetName = calibrationSpec.discountCurveReceiverName;
SwapLeg legReceiver = new SwapLeg(tenorReceiver, forwardCurveReceiverName, calibrationSpec.spreadReceiver, calibrationSpec.discountCurveReceiverName, true);
- SwapLegWithResetting legPayer = new SwapLegWithResetting(tenorPayer, forwardCurvePayerName, calibrationSpec.spreadPayer, calibrationSpec.discountCurvePayerName, discountCurveForNotionalResetName, true);
+ SwapLeg legPayer = new SwapLeg(tenorPayer, forwardCurvePayerName, calibrationSpec.spreadPayer, calibrationSpec.discountCurvePayerName, discountCurveForNotionalResetName, true);
product = new Swap(legReceiver, legPayer);
}
