holdingsprofit: holdingsprofit

Description Usage Arguments Details Value See Also Examples

Description

calculate unclosed holdings' dynamic profit. require setting unclosed=TRUE in HFTsimulator. total_profit = holdings_profit + closed_profit

Usage

1
holdingsprofit(instrumentid = character(), side = "long")

Arguments

instrumentid

character, instrument identifier.

side

character, "long" or "short", specifying holdings's side.

Details

long holdings' dynamic profit = holdings * (last_price - mean_open_price), short holdings' dynamic profit = holdings * (mean_open_price - lastprice).

Value

numeric, holdings profit.

See Also

HFTsimulator meanopen closedprofit

Examples

1
2
3
4
5
## Not run: 
## get longholding's profit of TF1603
holdingsprofit("TF1603","long")

## End(Not run)

chenhaotian/High-Frequency-Trading-Simulation-System documentation built on May 13, 2019, 3:52 p.m.