|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Security
This interface defines methods for retrieving Calculators for the
implemented Security. It also defines some convenience calculation methods.
If more than one calculation must be run for a given settlement to
Redemption period, then it is always more efficient to get a
Calculator for that period and run the calculations from that
Calculator.
| Method Summary | |
|---|---|
Analytics |
calculate(AnalyticValueType givenType,
double givenValue,
FISADate settlementDate)
A convenience method to calculate an Analytics object using the provided
value and settlementDate. |
Analytics |
calculate(AnalyticValueType givenType,
double givenValue,
FISADate settlementDate,
Redemption redemption)
A convenience method to calculate an Analytics object using the provided
value and settlementDate to Redemption period. |
double |
calculateAccruedInterest(FISADate settlementDate)
A convenience method to calculate the accrued interest for the provided settlementDate. |
double |
calculatePrice(double yield,
FISADate settlementDate)
A convenience method to calculate the price from the provided yield and settlementDate. |
double |
calculatePrice(double yield,
FISADate settlementDate,
Redemption redemption)
A convenience method to calculate the price from the provided yield and settlement to Redemption period. |
double |
calculateYield(double price,
FISADate settlementDate)
A convenience method to calculate the yield from the provided price and settlementDate. |
double |
calculateYield(double price,
FISADate settlementDate,
Redemption redemption)
A convenience method to calculate the yield from the provided price and settlement to Redemption period. |
QuoteAnalytics |
createQuoteAnalytics(Quote quote,
FISADate settlementDate)
|
Calculator |
getCalculator(FISADate settlementDate)
Get a Calculator for this Security and provided settlementDate. |
Calculator |
getCalculator(FISADate settlementDate,
Redemption redemption)
Get a Calculator for this Security and provided settlementDate to
Redemption period. |
Market |
getMarket()
Get the Market for this Security. |
java.util.Collection |
getRedemptions()
Get a Collection of all provided Redemptions for this
Security. |
| Method Detail |
|---|
Market getMarket()
Market for this Security.
Market for this Security.
Calculator getCalculator(FISADate settlementDate)
throws CalculationException
Calculator for this Security and provided settlementDate.
It is up to the implementation to determine which Redemption to
use if any, although this will usually be to Maturity.
settlementDate - The binding settlementDate for which all calculations
will be run.
Calculator for this Security and provided settlementDate.
com.ftlabs.fis.calc.CalculationException
CalculationException
Calculator getCalculator(FISADate settlementDate,
Redemption redemption)
throws CalculationException
Calculator for this Security and provided settlementDate to
Redemption period.
settlementDate - The binding settlementDate for which all calculations
will be run.redemption - The binding Redemption to which all calculations
will be run.
Calculator bound to this Security and provided
settlementDate to Redemption period.
com.ftlabs.fis.calc.CalculationException
CalculationException
QuoteAnalytics createQuoteAnalytics(Quote quote,
FISADate settlementDate)
throws CalculationException
CalculationException
double calculatePrice(double yield,
FISADate settlementDate)
throws CalculationException
Redemption to use if any, although this will usually be Maturity.
yield - The yield from which to calculate a price.settlementDate - The settlement date.
com.ftlabs.fis.calc.CalculationException
CalculationException
double calculatePrice(double yield,
FISADate settlementDate,
Redemption redemption)
throws CalculationException
Redemption period.
yield - The yield from which to calculate a price.settlementDate - The settlement date for which this calculation is run.redemption - The Redemption to which this calculation is run.
Redemption period.
com.ftlabs.fis.calc.CalculationException
CalculationException
double calculateYield(double price,
FISADate settlementDate)
throws CalculationException
Redemption to use if any, although this will usually be Maturity.
price - The price from which to calculate a yield.settlementDate - The settlement date.
com.ftlabs.fis.calc.CalculationException
CalculationException
double calculateYield(double price,
FISADate settlementDate,
Redemption redemption)
throws CalculationException
Redemption period.
price - The price from which to calculate a yield.settlementDate - The settlement date for which this calculation is run.redemption - The Redemption to which this calculation is run.
Redemption period.
com.ftlabs.fis.calc.CalculationException
CalculationException
Analytics calculate(AnalyticValueType givenType,
double givenValue,
FISADate settlementDate)
throws CalculationException
Analytics object using the provided
value and settlementDate. It is up to the implementation to determine which
Redemption to use if any, although this will usually be Maturity.
givenType - The AnalyticValueType of the givenValue.givenValue - The value to calculate the Analytics from.settlementDate - The settlement date.
Analytics for this Security calcluated from the provided
value and settlement date.
com.ftlabs.fis.calc.CalculationException
CalculationException
Analytics calculate(AnalyticValueType givenType,
double givenValue,
FISADate settlementDate,
Redemption redemption)
throws CalculationException
Analytics object using the provided
value and settlementDate to Redemption period.
givenType - The AnalyticValueType of the givenValue.givenValue - The value to calculate the Analytics from.settlementDate - The settlement date.redemption - The Redemption.
Analytics for this Security calcluated from the provided
value and settlementDate to Redemption period.
com.ftlabs.fis.calc.CalculationException
CalculationException
double calculateAccruedInterest(FISADate settlementDate)
throws CalculationException
settlementDate - The settlement date.
com.ftlabs.fis.calc.CalculationException
CalculationExceptionjava.util.Collection getRedemptions()
Collection of all provided Redemptions for this
Security. All Security implementations may not have any Redemptions.
In this case this method will return null.
Collection of all provided Redemptions for this
Security. If a Security doesn't support any Redemptions, such as
a non callable perpetual, then this method will return null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||