What software is fastest for backtesting?

Discussion in 'Trading Software' started by maxpi, Oct 13, 2003.

  1. maxpi

    maxpi

    I just wrote a lot of code for some backtesting on my favorite canned charting program only to find that it runs so slowly on tick data as to be useless. Any recos for a fast backtesting software?
     
  2. prophet

    prophet

    Yeah, a lot of canned programs don't handle tick data well. I wrote my own analysis, using a combination of Matlab at the high level and C for low level stuff.

    Depending on your analysis and implementation, processing speed on a typical PC could be around a million ticks per second, maybe better, maybe worse.
     
  3. maxpi

    maxpi

    That is way fast. I'm off to the Matlab site. I need an interim solution, something canned to get the near term tasks done as well. Maybe somebody sells a trading front end for Matlab?

    Thanks



    :D
     
  4. olintner

    olintner

    Hi Maxpi,

    we got started in programming and modelling intra-day timeseries data in 1995. Currently we run V6.1 of our own C++ libraries.

    Even with compressed data, a run over 10 years of tick-by-tick data can take up to 5 minutes on a P4 3.1Gig machine and 2Gig of Memory. Why that long?

    Because ever tick updates not only rules but also positions, risk-mgmt, performance- and trade-evaluation, etc. A good time series like Mini-SP or cash currency generates 2-3mn ticks a year. Therefore a 10 year file can increase in size to 2GB (binary struct for storage) or more.

    Sorry, didn't provide a solution to your problem but showed the immense task of handling and processing tick-by-tick data. Cheers, Olli
     
  5. maxpi

    maxpi

    It is immense. I was optimizing two days worth of data and it was taking 60 weconds per single step on one parameter!! This is incredibly slow. I really am thinking that one of the extant softwares has to be a lot faster than this. I could optimize my code a bit but I don't think I can get it to go much more than 50% faster.

    I took C classes a long time ago, had an awful time with it, no problems with Easy Language however. In time I may go the Matlab route and write the higher level stuff in VB or something, I had some success with VBA in the past.

    Maybe somebody with some experience with NeoTicker could compare it to TS2000?

    :)
     
  6. olintner

    olintner

    Hi maxpi,

    good luck with your optimization and at least you have an understanding of C/C++! One of the big tasks when working with tick data wasn't speed of processing or the handling of huge amounts of data, it was:
    a) filtering the data - especially the early 90ies (hand typed in for most commoditiy markets by CQG clarks)
    b) getting all contract data (change of point values, etc.) and session data for holidays, beginning and end of trading (especially lot's of early closings in the US).

    What are to trying to test / optimize? Maybe I can help.

    Regards, Oliver
     
  7. maxpi

    maxpi

    I am just testing some volatility expansion signals on some stocks. I am building my bar data in arrays from tick data, that is what is taking all the processor cycles. I think I can get by running the tests first on minute bars and then running the tick tests only on the time period where I know a signal is going to happen. Requires a little manual tweaking of the tick code for each test but hey, that's what I do!! Thanks much for the offer of help however.

    I just got an email from NeoTicker, they have a one-second mode for backtesting, that alone would speed things up and provide the accuracy I'm looking for. If their software was faster than the one I have by a couple of orders of magnitude, and it could be, mine is a little outdated, then that would be good.

    :)
     
  8. prophet

    prophet

    It can be fast if you use the C and vector Matlab code for per-tick analysis, then higher level operations on some slower interval, say every 10 ticks. Matlab is well suited for matrix/vector operations and data visualization, and provides more built-in numerical tools than you could ever want. Once you prototype an algorithm, compile it into C code and link it into a real time trading application.

    My current simulations (see my previous posts) require about 10 seconds of running time per day of analysis on a P4 2.5 GHz PC. This includes processing 100K ticks (NQ or ES, current day plus previous days), paper trading 30 subsystems, and heavy vector operations every 20 or 50 ticks.
     
  9. prophet

    prophet

    Yeah, tick-by-tick analysis is much slower than typical bar data. I try to digest the tick data into a lower frequency data stream or make the most of computational intermediates by testing simultaneous subsystems and simultaneous parameters in a single simulation run.
     
  10. olintner

    olintner

    Hi Maxpi,

    what you should be aware when implementing tick-by-tick tests, especially for stocks is the following data-provider specific problem: the number of ticks provided is dependent on the data-provider! The same move in a stock can vary widely in number of ticks when sourced from two or three different providers. Already the exchange has a big impact. If, for example, you compare the number of ticks of a Eurex Bund Future or Dax Future with a Mini-SP or Mini-Nq, then the US exchange will win by a wide margin. Why? Because the US exchange updates every 0.1 second while Eurex only updates every 0.3 to 0.5 second (to keep bandwidth usage low). So be cautious when doing tick-by-tick stuff und prefer time-based (minute) bars - they are more robust.

    good trading, Olli
     
    #10     Oct 13, 2003