public class IndexMarket extends Market
addMarkets(List[Market]) to add underlying components.
plham.index.IndexScheme) (unset by default).
Market.AgentUpdate, Market.ExecutionLog, Market.MarketEvent, Market.OrderEvent| Modifier and Type | Field and Description |
|---|---|
List<Long> |
components
The list of its underlying markets by their ids.
|
IndexScheme |
fundamentalIndexScheme |
List<Double> |
fundamentalIndices |
IndexScheme |
marketIndexScheme |
List<Double> |
marketIndices |
NO_TICKSIZE, ROUND_LOWER, ROUND_UPPER, _isRunning, afterOrderHandlingEvents, afterSimulationStepEvents, agentUpdates, beforeOrderHandlingEvents, beforeSimulationStepEvents, buyOrderBook, buyOrdersCounts, env, executedOrdersCounts, executionLogs, fundamentalPrices, id, lastExecutedPrices, marketPrices, name, outstandingShares, random, sellOrderBook, sellOrdersCounts, sumExecutedVolumes, tickSize, time| Constructor and Description |
|---|
IndexMarket() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMarket(Market market) |
void |
addMarkets(List<Market> markets) |
Double |
computeFundamentalIndex()
Compute the latest fundamental index value.
|
Double |
computeMarketIndex()
Compute the latest market index value.
|
List<Long> |
getComponents()
Get a list of market ids, the components of the index.
|
Double |
getFundamentalIndex()
Get the latest fundamental index value.
|
Double |
getFundamentalIndex(Long t)
Get the fundamental index value at time
t. |
IndexScheme |
getFundamentalIndexScheme()
Declaration: getFundamentalIndexScheme():plham.index.IndexScheme.
|
Double |
getIndex()
Get the latest market index value.
|
Double |
getIndex(Long t)
Get the market index at time
t. |
Double |
getMarketIndex()
Get the latest market index value.
|
Double |
getMarketIndex(Long t)
Get the market index at time
t. |
IndexScheme |
getMarketIndexScheme()
Declaration: getMarketIndexScheme():plham.index.IndexScheme.
Get this market index calculation scheme.
|
List<Market> |
getMarkets()
Get a list of markets.
|
Boolean |
isAllMarketsRunning() |
IndexScheme |
setFundamentalIndexScheme(IndexScheme scheme)
Declaration: setFundamentalIndexScheme(scheme:plham.index.IndexScheme):plham.index.IndexScheme.
|
void |
setInitialFundamentalIndex(Double index) |
void |
setInitialMarketIndex(Double index) |
IndexScheme |
setMarketIndexScheme(IndexScheme scheme)
Declaration: setMarketIndexScheme(scheme:plham.index.IndexScheme):plham.index.IndexScheme.
Set this market index calculation scheme.
|
void |
tickUpdateMarketPrice() |
void |
updateFundamentalPrice(Double price) |
void |
updateMarketPrice(Double price) |
addAfterOrderHandlingEvent, addAfterSimulationStepEvent, addBeforeOrderHandlingEvent, addBeforeSimulationStepEvent, cancelBuyOrder, cancelSellOrder, check, executeAgentUpdate, executeBuyOrders, executeOrders, executeSellOrders, getBestBuyPrice, getBestSellPrice, getBuyOrderBook, getFundamentalPrice, getFundamentalPrice, getMarketPrice, getMarketPrice, getMidPrice, getNextMarketPrice, getOutstandingShares, getPrice, getPrice, getRandom, getSellOrderBook, getTickSize, getTime, getTradeVolume, getTradeVolume, handleAgentUpdate, handleBuyLimitOrder, handleBuyMarketOrder, handleBuyOrder, handleOrder, handleOrders, handleSellLimitOrder, handleSellMarketOrder, handleSellOrder, isRunning, itayoseOrderBooks, roundBuyPrice, roundPrice, roundSellPrice, setId, setInitialFundamentalPrice, setInitialMarketPrice, setName, setOutstandingShares, setRandom, setRunning, setTickSize, setTime, setTradeVolume, tickUpdateMarketPrice, triggerAfterOrderHandlingEvents, triggerAfterSimulationStepEvents, triggerBeforeOrderHandlingEvents, triggerBeforeSimulationStepEvents, updateFundamentalPrice, updateMarketPrice, updateMarketPrice, updateOrderBooks, updateTimepublic List<Long> components
public List<Double> marketIndices
public List<Double> fundamentalIndices
public IndexScheme marketIndexScheme
public IndexScheme fundamentalIndexScheme
public void addMarket(Market market)
public void addMarkets(List<Market> markets)
public List<Long> getComponents()
env field.public List<Market> getMarkets()
env field.public Boolean isAllMarketsRunning()
public Double getIndex()
getMarketIndex().public Double getIndex(Long t)
t.
Same as getMarketIndex(t).t - tpublic Double getMarketIndex()
getIndex().public Double getMarketIndex(Long t)
t.
Same as getIndex(t).t - tpublic Double getFundamentalIndex()
public Double getFundamentalIndex(Long t)
t.t - tpublic Double computeMarketIndex()
public Double computeFundamentalIndex()
public IndexScheme getMarketIndexScheme()
Get this market index calculation scheme.
public IndexScheme setMarketIndexScheme(IndexScheme scheme)
Set this market index calculation scheme.
scheme - public IndexScheme getFundamentalIndexScheme()
public IndexScheme setFundamentalIndexScheme(IndexScheme scheme)
public void tickUpdateMarketPrice()
public void updateMarketPrice(Double price)
public void updateFundamentalPrice(Double price)
public void setInitialMarketIndex(Double index)
public void setInitialFundamentalIndex(Double index)