|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--webcab.lib.finance.futures.FuturesEvaluation
Within this class we consider evaluation of futures contracts on stocks, bonds and indexes.
| Constructor Summary | |
FuturesEvaluation()
Creates a new instance. |
|
| Method Summary | |
int |
aggregatePosition(int shortContracts,
int longConctracts)
Calculates the aggregate number of futures contract held. |
double |
futureOnCurrencies(double exchangeRate,
double riskFreeForeign,
double riskFreeBase,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Calculates the price of a futures contract on currencies. |
double |
futureOnCurrencies(double exchangeRate,
double riskFreeForeign,
double riskFreeBase,
double timeToMaturity)
Calculates the price of a futures contract on currencies. |
double |
futureOnIndex(double indexValue,
double yield,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Calculates the price of a index future. |
double |
futureOnIndex(double indexValue,
double yield,
double riskFree,
double timeToMaturity)
Calculates the price of a index future. |
double |
futuresPriceNoIncome(double price,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the futures price on an asset which does not pay an income. |
double |
futuresPriceNoIncome(double price,
double riskFree,
double timeToMaturity)
Evaluates the futures price on an asset which does not pay an income. |
double |
futuresPriceWithDividend(double price,
double yield,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the future price on an asset which has a continuous yield. |
double |
futuresPriceWithDividend(double price,
double yield,
double riskFree,
double timeToMaturity)
Evaluates the future price on an asset which has a continuous yield. |
double |
futuresPriceWithIncome(double price,
double income,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the futures price on an asset which pays a known income during the life of the contract. |
double |
futuresPriceWithIncome(double price,
double income,
double riskFree,
double timeToMaturity)
Evaluates the futures price on an asset which pays a known income during the life of the contract. |
double |
gearing(double margin)
Calculates the effective gearing factor from holding an exchange traded futures contract. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FuturesEvaluation()
| Method Detail |
public int aggregatePosition(int shortContracts,
int longConctracts)
throws FuturesEvaluationDemoException
shortContracts - the number of future contracts sold short
FuturesEvaluationDemoException
public double futuresPriceNoIncome(double price,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws FuturesEvaluationDemoException
price - the present price of an assetriskFree - the continuously compounded risk free interest rate during the life of the futures contractevaluationDate - the date when the futures contract is evaluatedmaturityDate - the date when the futures contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FuturesEvaluationDemoException
public double futuresPriceNoIncome(double price,
double riskFree,
double timeToMaturity)
throws FuturesEvaluationDemoException
price - the present price of an assetriskFree - the continuously compounded risk free interest rate during the life of the futures contracttimeToMaturity - the time period (in years) until the futures contract expires
FuturesEvaluationDemoException
public double futuresPriceWithIncome(double price,
double income,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws FuturesEvaluationDemoException
price - the present price of an assetincome - the present value of the income from the underlying asset during the life of the future contractriskFree - the continuously compounded risk free interest rate during the life of the future contractevaluationDate - the date when the futures contract is evaluatedmaturityDate - the date when the futures contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FuturesEvaluationDemoException
public double futuresPriceWithIncome(double price,
double income,
double riskFree,
double timeToMaturity)
throws FuturesEvaluationDemoException
price - the present price of an assetincome - the present value of the income from the underlying asset during the life of the future contractriskFree - the continuously compounded risk free interest rate during the life of the future contracttimeToMaturity - the time period (in years) until the futures contract expires
FuturesEvaluationDemoException
public double futuresPriceWithDividend(double price,
double yield,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws FuturesEvaluationDemoException
price - the present price of the underlying assetyield - the continuously compounded yield from the underlying assetriskFree - the continuously compounded risk free interest rate during the life of the futures contractevaluationDate - the date when the futures contract is evaluatedmaturityDate - the date when the futures contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FuturesEvaluationDemoException
public double futuresPriceWithDividend(double price,
double yield,
double riskFree,
double timeToMaturity)
throws FuturesEvaluationDemoException
price - the present price of the underlying assetyield - the continuously compounded yield from the underlying assetriskFree - the continuously compounded risk free interest rate during the life of the futures contracttimeToMaturity - the time until the futures contract expires
FuturesEvaluationDemoException
public double futureOnIndex(double indexValue,
double yield,
double riskFree,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws FuturesEvaluationDemoException
indexValue - the value of the indexriskFree - the continuously compounded risk free interest rateyield - the average yield of the index during the life of the futures contractevaluationDate - the date when the futures contract is evaluatedmaturityDate - the date when the futures contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FuturesEvaluationDemoException
public double futureOnIndex(double indexValue,
double yield,
double riskFree,
double timeToMaturity)
throws FuturesEvaluationDemoException
indexValue - the value of the indexriskFree - the continuously compounded risk free interest rateyield - the average yield of the index during the life of the futures contracttimeToMaturity - time to maturity of the futures contract
FuturesEvaluationDemoException
public double futureOnCurrencies(double exchangeRate,
double riskFreeForeign,
double riskFreeBase,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws FuturesEvaluationDemoException
exchangeRate - the exchange rate between the two currenciesriskFreeBase - the risk free interest rate in the domestic currencyriskFreeForeign - the risk free interest rate in the foreign currencyevaluationDate - the date when the futures contract is evaluatedmaturityDate - the date when the futures contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
FuturesEvaluationDemoException
public double futureOnCurrencies(double exchangeRate,
double riskFreeForeign,
double riskFreeBase,
double timeToMaturity)
throws FuturesEvaluationDemoException
exchangeRate - the exchange rate between the two currenciesriskFreeBase - the risk free interest rate in the domestic currencyriskFreeForeign - the risk free interest rate in the foreign currencytimeToMaturity - the time to maturity of the futures contract
FuturesEvaluationDemoException
public double gearing(double margin)
throws FuturesEvaluationDemoException
margin - the margin required in percent (i.e. 4% for FX positions) in order to hold the futures contract.
FuturesEvaluationDemoException
|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||