com.ftlabs.fisa.calc
Class SteppedCouponCalculator

java.lang.Object
  extended by com.ftlabs.fisa.calc.AbstractCalculator
      extended by com.ftlabs.fisa.calc.MultipleCashFlowCalculator
          extended by com.ftlabs.fisa.calc.MultiplePeriodCalculator
              extended by com.ftlabs.fisa.calc.SteppedCouponCalculator
All Implemented Interfaces:
Calculator, YieldConvergable, java.io.Serializable
Direct Known Subclasses:
CDSteppedCouponCalculator, SteppedCouponCompoundingCalculator

public abstract class SteppedCouponCalculator
extends MultiplePeriodCalculator

See Also:
Serialized Form

Field Summary
protected  double[] interestRates
           
protected  double interestTaxRate
           
protected  double taxAdjustedRedemptionValue
           
 
Fields inherited from class com.ftlabs.fisa.calc.MultiplePeriodCalculator
act_df, act_ldf, aif, df, fcf, lcf, ldf
 
Fields inherited from class com.ftlabs.fisa.calc.MultipleCashFlowCalculator
eomAdjust, interestFrequency, nextCouponDate, parValue, redemption, settlementDate
 
Constructor Summary
protected SteppedCouponCalculator()
           
protected SteppedCouponCalculator(FISADate settlementDate, Redemption redemption, double parValue, InterestRateSchedule interestRateSchedule, DayCountBasis dayCountBasis, int interestFrequency, boolean eomAdjust, FISADate datedDate, FISADate firstInterestDate)
           
 
Method Summary
 Analytics calculate(AnalyticValueType givenType, double givenValue)
          Calculate an Analytics object using the provided AnalyticValueType and value.
 double calculateCurrentYield(double price)
          Calculate current yield for the given price.
 double calculatePeriodicYield(double price)
          Calculate a periodic discounted cash flow yield for use with convexity/duration methods.
 double calculateYield(double price)
          Calculate yield for the given price.
 int getCashFlowCount()
          Get the number of cashflows within the supported settlement to Redemption period.
protected  void setValues(FISADate settlementDate, Redemption redemption, double parValue, InterestRateSchedule interestRateSchedule, DayCountBasis dayCountBasis, int interestFrequency, boolean eomAdjust, FISADate datedDate, FISADate firstInterestDate)
           
 
Methods inherited from class com.ftlabs.fisa.calc.MultiplePeriodCalculator
getPeriodicTimeToFlow, getTimeToFlow, setValues
 
Methods inherited from class com.ftlabs.fisa.calc.MultipleCashFlowCalculator
calculateConvexity, calculateEstimatedMacaulayDuration, calculateEstimatedModifiedDuration, calculateEstimatedModifiedDuration, calculateInterestOnInterest, calculateMacaulayDuration, calculateModifiedDuration, calculateModifiedDuration, calculateYieldValue1_32, getCashFlowDate, getCashFlowDate, getPrincipal, getRedemption, getSettlementDate, getTotalCashFlow, setValues
 
Methods inherited from class com.ftlabs.fisa.calc.AbstractCalculator
calculateApproximateYield, calculateMPCIPrice, calculateSPSIPrice, calculateSPSIYield, calculateTotalInterestFlows
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ftlabs.fisa.calc.Calculator
calculateAccruedInterest, calculateEstimatedConvexity, calculatePrice, calculatePriceValue1BP, getInterest
 

Field Detail

interestRates

protected double[] interestRates

interestTaxRate

protected double interestTaxRate

taxAdjustedRedemptionValue

protected double taxAdjustedRedemptionValue
Constructor Detail

SteppedCouponCalculator

protected SteppedCouponCalculator()

SteppedCouponCalculator

protected SteppedCouponCalculator(FISADate settlementDate,
                                  Redemption redemption,
                                  double parValue,
                                  InterestRateSchedule interestRateSchedule,
                                  DayCountBasis dayCountBasis,
                                  int interestFrequency,
                                  boolean eomAdjust,
                                  FISADate datedDate,
                                  FISADate firstInterestDate)
                           throws CalculationException
Throws:
CalculationException
Method Detail

setValues

protected void setValues(FISADate settlementDate,
                         Redemption redemption,
                         double parValue,
                         InterestRateSchedule interestRateSchedule,
                         DayCountBasis dayCountBasis,
                         int interestFrequency,
                         boolean eomAdjust,
                         FISADate datedDate,
                         FISADate firstInterestDate)
                  throws CalculationException
Throws:
CalculationException

calculateCurrentYield

public double calculateCurrentYield(double price)
                             throws CalculationException
Description copied from interface: Calculator
Calculate current yield for the given price.

Parameters:
price - price
Returns:
current yield as calculated for the given price.
Throws:
CalculationException

calculateYield

public double calculateYield(double price)
                      throws CalculationException
Description copied from interface: Calculator
Calculate yield for the given price.

Parameters:
price - price
Returns:
yield as calculated for the given price.
Throws:
CalculationException

getCashFlowCount

public int getCashFlowCount()
Description copied from interface: Calculator
Get the number of cashflows within the supported settlement to Redemption period.

Returns:
The number of cashflows within the supported settlement to Redemption period.

calculatePeriodicYield

public double calculatePeriodicYield(double price)
                              throws CalculationException
Description copied from interface: Calculator
Calculate a periodic discounted cash flow yield for use with convexity/duration methods.

Parameters:
price - the price.
Returns:
Periodic discounted cash flow yield.
Throws:
CalculationException

calculate

public Analytics calculate(AnalyticValueType givenType,
                           double givenValue)
                    throws CalculationException
Description copied from interface: Calculator
Calculate an Analytics object using the provided AnalyticValueType and value.

Parameters:
givenType - The AnalyticValueType of the givenValue.
givenValue - The value to calculate the Analytics from.
Throws:
CalculationException