12
$\begingroup$

A lot of the tools/libraries out there seem to focus on close to close time series analysis. This is all fine but I typically do not trade close to close, I will use limit or stop orders that may or may not get filled.

So for example if I get a buy signal at time t, I would place a buy limit for time t+1 at the level suggested by my model.

I was wondering if there was an existing library or package out there that I could use for backtesting such a system. Ideally, it could handle signals based off a daily series, but move through using hourly bars so I can test different intraday trade management strategies as well. It would also be good if I could put OCO bracket orders for profit/loss stops.

I am using R at the moment but can use whatever has what I am after.

$\endgroup$
3
  • 1
    $\begingroup$ I implemented mine myself in R. $\endgroup$
    – SRKX
    Dec 9, 2011 at 10:50
  • 4
    $\begingroup$ Have you looked at quantstrat et al? $\endgroup$ Dec 9, 2011 at 18:13
  • 2
    $\begingroup$ quantstrat is probably the closest one can get out of the box, but I agree with @SRKX - writing your own solution is a viable option. Especially if you need some specific functionality, writing from scratch may be easier in the long run than trying to adapt preexisting solutions (talking from my perspective and small problems like this). Depends on how much testing you need performed. $\endgroup$ Dec 10, 2011 at 14:44

1 Answer 1

1
$\begingroup$

The quantstrat R package (which seems to be a part of TradeAnalytics) might be a good solution if you're already using R for analysis. This introductory blog post explains some of the features. There was a presentation at R/Finance 2011 by Brian Peterson about developing quantitivate strategies in R, here is the PDF of the talk.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.