com.ftlabs.fisa
Class ZeroCouponSecurity

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.ZeroCouponSecurity
All Implemented Interfaces:
Security, java.io.Serializable

public class ZeroCouponSecurity
extends MaturingCallableSecurity

A zero coupon implementation of Security.

See Also:
Serialized Form

Constructor Summary
ZeroCouponSecurity(Market market)
          Creates a ZeroCouponSecurity object of the given Market.
ZeroCouponSecurity(Market market, Redemption maturity, InterestFrequency interestFrequency)
          Creates a ZeroCouponSecurity object of the given Market.
 
Method Summary
 double calculateAccruedInterest(FISADate settlementDate)
          A convenience method to calculate the accrued interest for the provided settlementDate.
 Calculator getCalculator(FISADate settlementDate, Redemption redemption)
          Get a Calculator for this ZeroCouponSecurity and provided settlementDate to Redemption period using the overriding DayCountBasis.
 InterestFrequency getInterestFrequency()
          Get the current InterestFrequency.
 int getInterestFrequencyValue()
          A convenience method to get the value of the current InterestFrequency.
 void setInterestFrequency(InterestFrequency interestFrequency)
          Set the InterestFrequency.
 
Methods inherited from class com.ftlabs.fisa.MaturingCallableSecurity
createQuoteAnalytics, getCallSchedule, getRedemptions, setCallSchedule
 
Methods inherited from class com.ftlabs.fisa.MaturingSecurity
calculate, calculate, 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

ZeroCouponSecurity

public ZeroCouponSecurity(Market market)
Creates a ZeroCouponSecurity 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.

ZeroCouponSecurity

public ZeroCouponSecurity(Market market,
                          Redemption maturity,
                          InterestFrequency interestFrequency)
Creates a ZeroCouponSecurity 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.
maturity - the maturity Redemption
interestFrequency - The InterestFrequency that represents the number of quasi-coupon periods per year for this Security.
Method Detail

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.

getCalculator

public Calculator getCalculator(FISADate settlementDate,
                                Redemption redemption)
                         throws CalculationException
Get a Calculator for this ZeroCouponSecurity 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

calculateAccruedInterest

public double calculateAccruedInterest(FISADate settlementDate)
                                throws CalculationException
A convenience method to calculate the accrued interest for the provided settlementDate.

Specified by:
calculateAccruedInterest in interface Security
Overrides:
calculateAccruedInterest in class MaturingSecurity
Parameters:
settlementDate - The settlement date.
Returns:
The accrued interest of this Security for the provided settlement date.
Throws:
com.ftlabs.fis.calc.CalculationException
CalculationException