[R-SIG-Finance] quanstrat rule to exit same day close (using daily data)

Brian G. Peterson brian at braverock.com
Sun May 13 22:20:32 CEST 2012


On Sun, 2012-05-13 at 15:55 -0400, s p wrote:
> okay so that means I can't use quantstrat for strategies where the
> entry and exit are on the same bar (in this case daily bar).

Sure you can, if the signal is on the same observation.  

I'm not sure how realistic a backtest of market on open and market on
close is going to be, of course, because of slippage, but it should
'work' in quantstrat.

Your entry rule would use prefer='Open' and your exit rule would use
prefer='Close'. 

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list