Backtesting software ideas

Yeah. TradeLink generally gets solid reviews, but it doesn't really serve a few of my specific needs. I need to take a class in software engineering, because I have really no idea how to manage a real project outside of our little assignments in school. Maybe I'll find one online. A quick Google of 'Agile' seems to hammer home some of your sentiments.
 
What has helped me with backtesting software I have written is to have in my mind what I need to be able to do. For me, I wanted to be able to combine multiple time frames in a single backtest and I wanted to build strategies directly from the ticker's chart. My project is web based, so I started prototyping with php/mySQL and an open source trader library (http://pecl.php.net/package/trader/0.3.0) and built quick prototypes just to prove that a given technique would meet a requirement I had for the project. Once I proved that everything I wanted to do could be done with the technologies I chose, I began to build the product in earnest.

Happy coding!
fan27
 
I'm back after a few iterations. I now have two systems. The time based strategy that processes every minute is now a huge SQL script. It takes all my tick data, builds bars, computes intermediate data, and spits out trades for a bunch of different parameters all in one CTE (not quite as big as the 5000 line beasts I inherited at work). The query did take 40 hours on the 2 core Azure, but probably because Azure's disks are slower than me reading a book by hand.

The other system is purely ticks based. There's a Market object that does everything:
  • reads ticks
  • pipes ticks to everything that wants it
  • evaluates the entry strategies to see if they want to enter
  • evaluates the exit strategies to see if they want to exit
  • saves the results
I've also split the strategies into multiple interfaces:
  • IEntryStrategy - knows how it wants to open a position with what kind of exit strategy
  • IExitStrategy - knows to close position or not
  • ITicker - wants to receive ticks
  • IIndicator - can compute values for others
  • IRequireIndicators - specifies the indicators that it needs
I am most excited about the way Indicators work (probably because it's my latest development). I was having trouble with every strategy recomputing similar values since they have similar parameters. Now I can share those intermediate values. IRequireIndicators was needed so that I don't need to register all these indicators separately for each strategy. The market can query the strategy for its requirements.
 
Back
Top