Some of us see this as a data-driven, empirical problem. And for *Programming with Data*, you could do a lot worse than picking [R](http://www.r-project.org) which was made for the task. The [CRAN Task View on Finance](http://cran.r-project.org/web/views/Finance.html) lists a number of relevant packages. For trading strategies in particular, the quantstrat and blotter --which are both still on [R-Forge in the TradeAnalytics bundle](http://r-forge.r-project.org/R/?group_id=316)--are a very good start and are often discussed on the [R-SIG-Finance](https://stat.ethz.ch/pipermail/r-sig-finance/) mailing list.