rcyeh / cfem2013

Cornell Financial Engineering Manhattan 2013 Project
1 stars 1 forks source link

RScripts/parser.R #6

Closed rcyeh closed 11 years ago

rcyeh commented 11 years ago

I have read your RScripts/parser.R file. How does it perform? What kind of data do you get? Are the outputs sensible?

Is it correct to assign a sell when price == prev_price? Further, I think the paper is silent on sub-penny price improvement. For example, if a stock is bid 10.00 and offered 10.02, then a series of trades at 10.02, 10.0199, 10.02, 10.0199 will be marked buy, sell, buy, sell; even though all are close to the ask price. Enhancing the logic in buy/sell assignment is relatively important to this project, given the centrality of the buy/sell assignment to the estimation of VPIN.

zc238 commented 11 years ago

Saw your comments. Will take a look tomorrow.

zc238 commented 11 years ago

I included the logic to either consider or not consider sub-penny decimals depending on the call, it does not seem to have a difference for AMZN. As for the actual performance, regressions against instantaneous price change (defined as log(price@end_bucket / price@begin_bucket) does not seem to yield any significance; there are some significance for ma & ema of price changes, but R^2 is too tiny for it to be meaningful.

Regression against volatility of volume (paper suggests to use volume as proxy) shows R^2 at the range of 0.18-0.4 depending on the bucket size, but based from the plot, it is clear that if high volume volatilities are always accompanied by high TR-VPIN measure, but not necessarily the other way around. This is most likely because volume does not contain directional information whereas VPIN obviously does. I think it will become more clear once we start use U1-VPIN and U2-VPIN as benchmarks.

In terms of basic parsing and regressing against price changes, it is done. Please reopen the issue if you see any problem.