Greetings!
Pls forgive me if this is an old topic. I have searched through list
archives extensively but I am just not sure if I am using quantstrat
correctly with intraday data.

I've attached sample minute ohlc data. after loading it, an xts object
spy.test would be populated as shown below:

> nrow(spy.test)
[1] 1074
> head(spy.test)
                    spy.Open spy.High spy.Low spy.Close spy.Volume
2012-03-29 07:32:00   140.14   140.15  140.14    140.15        800
2012-03-29 07:33:00   140.15   140.15  140.14    140.14       2700
2012-03-29 07:36:00   140.16   140.16  140.12    140.12       5105
2012-03-29 07:40:00   140.17   140.17  140.17    140.17        200
2012-03-29 07:41:00   140.15   140.16  140.15    140.16       1798
2012-03-29 07:42:00   140.16   140.16  140.16    140.16       2052
> tail(spy.test)
                    spy.Open spy.High spy.Low spy.Close spy.Volume
2012-03-30 16:26:00   140.86   140.87  140.85    140.87      10900
2012-03-30 16:27:00   140.86   140.86  140.79    140.79      27770
2012-03-30 16:28:00   140.84   140.86  140.84    140.86      20400
2012-03-30 16:29:00   140.85   140.86  140.84    140.86      18500
2012-03-30 16:30:00   140.86   140.86  140.85    140.85      11035
2012-03-30 16:31:00   140.85   140.86  140.85    140.85       1100


Currently I use something similar to attached test.R to do intraday
work. in the code I liquidate everything before close so that I don't
need to worry about splits and dividends. Is what I am doing the
correct way of using quantstrat with intraday data?

Also if in future I will hold overnight positions, How would I make
sure dividends and splits are correctly adjusted for pnl and summary
statistics? would underlying blotter be smart enough to handle all the
housekeeping?

Thanks!

Jim.

Attachment: spy.test.Rdata
Description: Binary data

Attachment: test.R
Description: Binary data

_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to