meanopen: meanopen

Description Usage Arguments Details Value Examples

View source: R/hftsimulator.r

Description

calculate unclosed orders' mean open price for a specific instrument and holdings side.

Usage

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

Arguments

instrumentid

character, instrument identifier.

side

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

Details

meanopen will calculate mean price according to following rules: 1. earlier open orders are prior to be closed. 2. return volume weighted mean of unclosed order's transaction price.

Value

numeric, mean open price.

Examples

1
2
3
4
5
## Not run: 
## check long holdings' mean open price of TF1603
meanopen("TF1603","long")

## End(Not run)

chenhaotian/High-Frequency-Trading-Simulation-System documentation built on April 18, 2018, 9:24 p.m.