3

After using Quantstrat to successfully backtest a strategy, is there any way to use the same signal/indicator/rule code to generate orders for production trading?

It seems like this might be possible by using the order book, but I haven't been able to find any examples or demos that explain how to generate orders for the future using data up to the present time.

Any pointers or advice on how to accomplish this would be appreciated.

1 Answers1

1

It's theoretically possible, but why would you want to? quantstrat is designed to make it easier to test ideas quickly and accurately. That's a very different problem domain than production trading. In short, use the right tool for the job.

If you really want to go this route, you would need to:

  1. update your mktdata object for each new piece of relevant market data you receive,
  2. run applyIndicators, applySignals, and applyRules on the necessary subset,
  3. write a new ruleOrderProc (and maybe ruleSignal) to send orders to your broker.
Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
  • Thank you, my reason for wanting to use quantstrat is that it appeared to be a quick and easy way of moving strategies from the backtest environment to production while avoiding the risk of errors due to reimplementation. I am working with interday strategies so speed is not an issue. – Anthony Mulcahy Dec 16 '14 at 20:32