Description Usage Arguments Details Value See Also Examples
calculate unclosed holdings' dynamic profit. require setting unclosed=TRUE in HFTsimulator. total_profit = holdings_profit + closed_profit
1 | holdingsprofit(instrumentid = character(), side = "long")
|
instrumentid |
character, instrument identifier. |
side |
character, "long" or "short", specifying holdings's side. |
long holdings' dynamic profit = holdings * (last_price - mean_open_price), short holdings' dynamic profit = holdings * (mean_open_price - lastprice).
numeric, holdings profit.
HFTsimulator meanopen closedprofit
1 2 3 4 5 | ## Not run:
## get longholding's profit of TF1603
holdingsprofit("TF1603","long")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.