com.ftlabs.fisa
Class SteppedCouponSecurity

java.lang.Object
  extended by com.ftlabs.fisa.AbstractSecurity
      extended by com.ftlabs.fisa.MaturingSecurity
          extended by com.ftlabs.fisa.MaturingCallableSecurity
              extended by com.ftlabs.fisa.SteppedCouponSecurity
All Implemented Interfaces:
Security, java.io.Serializable

public class SteppedCouponSecurity
extends MaturingCallableSecurity

A stepped coupon implementation of Security.

See Also:
Serialized Form

Constructor Summary
SteppedCouponSecurity(Market market)
          Creates a SteppedCouponSecurity object of the given Market.
 
Method Summary
 Calculator getCalculator(FISADate settlementDate, Redemption redemption)
          Get a Calculator for this SteppedCouponSecurity and provided settlementDate to Redemption period using the overriding DayCountBasis.
 FISADate getFirstInterestDate()
          Get the first interest date.
 InterestFrequency getInterestFrequency()
          Get the current InterestFrequency.
 int getInterestFrequencyValue()
          A convenience method to get the value of the current InterestFrequency.
 InterestRateSchedule getInterestRateSchedule()
          Returns the InterestRateSchedule for this SteppedCouponSecurity.
 void setFirstInterestDate(FISADate firstInterestDate)
          Set the first interest date.
 void setInterestFrequency(InterestFrequency interestFrequency)
          Set the InterestFrequency.
 void setInterestRateSchedule(InterestRateSchedule interestRateSchedule)
          Set the interestRateSchedule for this SteppedCouponSecurity.
protected  void validateData(FISADate settlementDate, FISADate redemptionDate, FISADate lastInterestDate)
           
 
Methods inherited from class com.ftlabs.fisa.MaturingCallableSecurity
createQuoteAnalytics, getCallSchedule, getRedemptions, setCallSchedule
 
Methods inherited from class com.ftlabs.fisa.MaturingSecurity
calculate, calculate, calculateAccruedInterest, calculatePrice, calculatePrice, calculateYield, calculateYield, getCalculator, getMaturity, getMaturityDate, setMaturity, setMaturity, setMaturity
 
Methods inherited from class com.ftlabs.fisa.AbstractSecurity
addSecurityInvalidationListener, getDatedDate, getDayCountBasis, getMarket, getParValue, invalidate, isEomAdjust, removeSecurityInvalidationListener, setDatedDate, setDayCountBasis, setEomAdjust, setParValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SteppedCouponSecurity

public SteppedCouponSecurity(Market market)
Creates a SteppedCouponSecurity object of the given Market.

Parameters:
market - required and immutable Market for this security. This constructor will throw a java.lang.NullPointerException if Market is null.
Method Detail

setInterestRateSchedule

public void setInterestRateSchedule(InterestRateSchedule interestRateSchedule)
Set the interestRateSchedule for this SteppedCouponSecurity.

Parameters:
interestRateSchedule - An InterestRateSchedule.

getInterestRateSchedule

public InterestRateSchedule getInterestRateSchedule()
Returns the InterestRateSchedule for this SteppedCouponSecurity.

Returns:
the InterestRateSchedule assigned to this security.

getInterestFrequency

public final InterestFrequency getInterestFrequency()
Get the current InterestFrequency.

Returns:
The current InterestFrequency.

getInterestFrequencyValue

public final int getInterestFrequencyValue()
A convenience method to get the value of the current InterestFrequency.

Returns:
The value of the current InterestFrequency.

setInterestFrequency

public final void setInterestFrequency(InterestFrequency interestFrequency)
Set the InterestFrequency.

Parameters:
interestFrequency - The new InterestFrequency.

getFirstInterestDate

public final FISADate getFirstInterestDate()
Get the first interest date.

Returns:
The first interest date.

setFirstInterestDate

public final void setFirstInterestDate(FISADate firstInterestDate)
Set the first interest date.

Parameters:
firstInterestDate - The new first interest date.

getCalculator

public Calculator getCalculator(FISADate settlementDate,
                                Redemption redemption)
                         throws CalculationException
Get a Calculator for this SteppedCouponSecurity and provided settlementDate to Redemption period using the overriding DayCountBasis.

Parameters:
settlementDate - The binding settlementDate for which all calculations will be run.
redemption - The binding Redemption to which all calculations will be run.
Returns:
A Calculator for this Security and provided settlementDate to Redemption period.
Throws:
com.ftlabs.fis.calc.CalculationException
CalculationException

validateData

protected void validateData(FISADate settlementDate,
                            FISADate redemptionDate,
                            FISADate lastInterestDate)
                     throws CalculationException
Throws:
CalculationException