|
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.DailyReporting
Within this class we consider methods related to the daily reporting and management of a futures trading account. This includes margin requirements, daily P&L, total equity and excess margin.
| Constructor Summary | |
DailyReporting()
Creates a new instance. |
|
| Method Summary | |
int |
aggregatePosition(int shortContracts,
int longContracts)
Calculates the aggregate number of futures contracts held. |
double |
excessMargin(double marginRequired,
double totalEquity)
Calculates the excess margin within a trading account. |
double |
exchange(double balance,
double exchangeRate)
Converts a cash balance into another currency. |
double |
margin(double price,
double contractsHeld,
double contractSize,
double maintenanceRate)
Calculates the margin required on a (long or short) futures position. |
double |
markToMarket(double firstDaysPrice,
double secondDaysPrice,
double contractsHeld,
double contractSize)
Calculates the over night mark-to-market P&L from a futures position. |
double |
priceAdjustment(double price,
double adjustment)
This function allows for price adjustments of the futures contract. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DailyReporting()
| Method Detail |
public int aggregatePosition(int shortContracts,
int longContracts)
throws DailyReportingDemoException
shortContracts - the number of future contracts sold shortlongContracts - the number of future contracts brought
DailyReportingDemoException
public double margin(double price,
double contractsHeld,
double contractSize,
double maintenanceRate)
throws DailyReportingDemoException
price - the present price of the underlying assetcontractsHeld - the total aggregate number of futures contracts held.contractSize - the amount of the underlying asset which must be delivered against one contractmaintenanceRate - in percent of the value of the underlying assets which need to be deposited with the future broker as margin for the outstanding futures contract in decimal format (i.e. 1 percent = 0.01)
DailyReportingDemoException
public double markToMarket(double firstDaysPrice,
double secondDaysPrice,
double contractsHeld,
double contractSize)
throws DailyReportingDemoException
firstDaysPrice - the closing price on the first daysecondDaysPrice - the closing price on the second daycontractSize - the amount of the underlying asset which must be delivered for one contract heldcontractsHeld - aggregate number of future contracts held
DailyReportingDemoException
public double excessMargin(double marginRequired,
double totalEquity)
throws DailyReportingDemoException
marginRequired - the margin required to support the present positionstotalEquity - the total amount of equity within the account
DailyReportingDemoException
public double exchange(double balance,
double exchangeRate)
throws DailyReportingDemoException
balance - the cash balance in the base currencyexchangeRate - the exchange rate between the two currencies
DailyReportingDemoException
public double priceAdjustment(double price,
double adjustment)
throws DailyReportingDemoException
price - the price of the futures contractadjustment - the absolute price adjustment of the futures contract
DailyReportingDemoException
|
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 | |||||||||