|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ftlabs.fisa.calc.AbstractCalculator
com.ftlabs.fisa.calc.LastPeriodCalculator
com.ftlabs.fisa.calc.LastPeriodSimpleInterestCalculator
com.ftlabs.fisa.calc.indexed.InflationIndexedLastPeriodCalculator
public class InflationIndexedLastPeriodCalculator
Treasury-Inflation Protected Securities multiple period.
| Field Summary | |
|---|---|
protected int |
interestFrequency
|
protected double |
parValue
|
protected Redemption |
redemption
|
protected FISADate |
settlementDate
|
| Fields inherited from class com.ftlabs.fisa.calc.LastPeriodSimpleInterestCalculator |
|---|
interestRate, taxAdjustedInterestRate, taxAdjustedRedemptionValue |
| Fields inherited from class com.ftlabs.fisa.calc.LastPeriodCalculator |
|---|
act_df, aif, df, lcf |
| Constructor Summary | |
|---|---|
InflationIndexedLastPeriodCalculator(FISADate settlementDate,
Redemption redemption,
double parValue,
double interestRate,
DayCountBasis dayCountBasis,
int interestFrequency,
boolean eomAdjust,
FISADate datedDate,
CPIFactory cpiFactory)
|
|
| Method Summary | |
|---|---|
Analytics |
calculate(AnalyticValueType givenType,
double givenValue)
Calculate an Analytics object using the provided
AnalyticValueType and value. |
double |
calculateConvexity(double periodicYield)
Calculate the actual convexity. |
double |
calculateInterestOnInterest(double reinvestmentYield)
Calculate the interest earned on reinvested interest cashflows using the provided reinvestmentYield. |
double |
calculateMacaulayDuration(double periodicYield)
Calculate the actual Macaulay duration. |
double |
calculateModifiedDuration(double periodicYield)
Calculate the actual modified duration. |
double |
calculateModifiedDuration(double macaulayDuration,
double periodicYield)
Calculate the actual modified duration, given the Macaulay Duration. |
double |
calculatePeriodicYield(double price)
Calculate a periodic discounted cash flow yield for use with convexity/duration methods. |
double |
getAdjustedAccruedInterest()
|
double |
getAdjustedPrice(double price)
Get a price adjusted by the indexRatio. |
int |
getCashFlowCount()
Get the number of cashflows within the supported settlement to Redemption period. |
FISADate |
getCashFlowDate(int cashFlowIndex)
Get a cash flow date for a particular cashflow, as specified by the provided cashFlowIndex. |
void |
getCashFlowDate(int cashFlowIndex,
FISADate date)
Set the provided FISADate to the cash flow date of a particular cashflow, as specified by the provided cashFlowIndex. |
double |
getIndexRatio()
Get the Index Ratio for the datedDate and settlementDate to which this calculator is bound. |
Redemption |
getRedemption()
Get the Redemption to which this Calculator is bound. |
FISADate |
getSettlementDate()
Get the settlement date to which this Calculator is bound. |
double |
getTotalCashFlow(int cashFlowIndex)
Get the principal and interest to be paid for a particular cashflow, as specified by cashFlowIndex. |
void |
setValues(FISADate settlementDate,
Redemption redemption,
double parValue,
double interestRate,
DayCountBasis dayCountBasis,
int interestFrequency,
boolean eomAdjust,
FISADate datedDate,
CPIFactory cpiFactory)
|
protected void |
setValues(FISADate settlementDate,
Redemption redemption,
double parValue,
int interestFrequency)
|
| Methods inherited from class com.ftlabs.fisa.calc.LastPeriodSimpleInterestCalculator |
|---|
calculateAccruedInterest, calculateCurrentYield, calculatePrice, calculateYield, getInterest, setValues, setValues |
| Methods inherited from class com.ftlabs.fisa.calc.LastPeriodCalculator |
|---|
calculateEstimatedConvexity, calculateEstimatedMacaulayDuration, calculateEstimatedModifiedDuration, calculateEstimatedModifiedDuration, calculatePriceValue1BP, calculateYieldValue1_32, getPeriodicTimeToFlow, getPrincipal, getTimeToFlow, 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 |
| Field Detail |
|---|
protected FISADate settlementDate
protected Redemption redemption
protected double parValue
protected int interestFrequency
| Constructor Detail |
|---|
public InflationIndexedLastPeriodCalculator(FISADate settlementDate,
Redemption redemption,
double parValue,
double interestRate,
DayCountBasis dayCountBasis,
int interestFrequency,
boolean eomAdjust,
FISADate datedDate,
CPIFactory cpiFactory)
throws CalculationException
CalculationException| Method Detail |
|---|
public void setValues(FISADate settlementDate,
Redemption redemption,
double parValue,
double interestRate,
DayCountBasis dayCountBasis,
int interestFrequency,
boolean eomAdjust,
FISADate datedDate,
CPIFactory cpiFactory)
throws CalculationException
CalculationException
public double getIndexRatio()
throws CalculationException
getIndexRatio in interface InflationIndexedCalculatorCalculationException
public double getAdjustedPrice(double price)
throws CalculationException
getAdjustedPrice in interface InflationIndexedCalculatorprice - A price to adjust.
CalculationException
public double getAdjustedAccruedInterest()
throws CalculationException
getAdjustedAccruedInterest in interface InflationIndexedCalculatorCalculationException
protected void setValues(FISADate settlementDate,
Redemption redemption,
double parValue,
int interestFrequency)
public FISADate getSettlementDate()
Calculator
public Redemption getRedemption()
CalculatorRedemption to which this Calculator is bound.
public int getCashFlowCount()
CalculatorRedemption period.
Redemption period.public double getTotalCashFlow(int cashFlowIndex)
Calculator
cashFlowIndex - The cashflow index. cashFlowIndex is zero based
and must be a number from 0 to getCashFlowCount() - 1.
public FISADate getCashFlowDate(int cashFlowIndex)
Calculator
cashFlowIndex - The cashflow index. cashFlowIndex is zero based
and must be a number from 0 to getCashFlowCount() - 1.
public void getCashFlowDate(int cashFlowIndex,
FISADate date)
Calculator
cashFlowIndex - The cashflow index. cashFlowIndex is zero based
and must be a number from 0 to getCashFlowCount() - 1.date - A FISADate to be set to the specified cash flow date.
public double calculatePeriodicYield(double price)
throws CalculationException
price - the price.
CalculationException
public double calculateMacaulayDuration(double periodicYield)
throws CalculationException
periodicYield - The periodicYield as returned from the
calculatePeriodicYield method.
CalculationException
public double calculateModifiedDuration(double periodicYield)
throws CalculationException
periodicYield - The periodicYield as returned from the
calculatePeriodicYield method.
CalculationException
public double calculateModifiedDuration(double macaulayDuration,
double periodicYield)
throws CalculationException
macaulayDuration - The macaulayDuration as returned from the
calculateMacaulayDuration method.periodicYield - The periodicYield as returned from the
calculatePeriodicYield method.
CalculationException
public double calculateConvexity(double periodicYield)
throws CalculationException
periodicYield - The periodicYield as returned from the
calculatePeriodicYield method.
CalculationException
public Analytics calculate(AnalyticValueType givenType,
double givenValue)
throws CalculationException
CalculatorAnalytics object using the provided
AnalyticValueType and value.
givenType - The AnalyticValueType of the givenValue.givenValue - The value to calculate the Analytics from.
CalculationException
public double calculateInterestOnInterest(double reinvestmentYield)
throws CalculationException
Calculator
reinvestmentYield - The assumed yield of the reinvested interest
cashflows.
CalculationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||