Need high performance computer for back testing on historical data
I am into trading for a while and now I want to automate my trades. I have developed some strategies and want to back test them on historical data. I am facing a problem because of low processing power on my computer. I am written codes in PERL programming language and when I run my strategies on Core i7 4510U with 4 threads, it takes 36 hours to finish running one strategy. I need to run 44 such strategies. So I am really looking for a high performance computer, preferably online.
I dont want to buy a work station and I am only looking for services that offer high computing power online. The platform may be windows/linux based. Can someone suggest me such a service where high processing power can be hired cheaply? Key word "Cheap".
I was facing similar situation.
while I do have a powerful machine.
Things i have done to win time are :
I wrote a simulator to speed things up +/- 20.000 x times.
this works in a scenario, where the data and the indicators are stable but you want to try various
combinations of filters. In this solution i wrote all the data (bar + indicators) to a file and read them in the simulator.
2. virtual machine
i have been doing back-testing with 4 VM's on my server and run 4 periods in parallel
that is another way to win time.
If i read you are using perl (which is not a compiled language)
that could be optimized if some scripts run 50.000 times, that might not be efficient
versus another technical choice..
would need more general info
to give further advice
The following user says Thank You to rleplae for this post:
I think using Virtual service is the best way to go forward for me (I have no idea of the simulation you are talking of. I aint a big time programmer frankly). I have actually looked for VPN in Godaddy etc., but I am not sure how useful they will be or if they will allow installing perl and some associated modules. So I am looking for an advice regarding this. Please do suggest me some such services that offer high computing power.
I am using perl since thats the language I find easy to write codes in, no other reason. Please suggest another language. I shall try to code in that from next time, but for now, I prefer sticking to perl. By the way, I am only using perl to have an estimate of my profits using different strategies. I am using Ninja trader to write my code that does real trading.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following 4 users say Thank You to Big Mike for this post:
Well, I haven't really written anything that needs 36 hours to run for one backtest. For me, one backtest with up to 5 years of data usually only takes minutes. But a parameter sweeper (which tries all variations) may take up to 12 hours. I used single thread PHP script. I can manually divide the parameter space into 3 subsets and run them on three different instances simultaneously to save time. I also backtested tick data before. It is slower but not that slow. For me, tick level strategy either work or it doesn't. I felt it didn't help to backtest tick data for a long period. For optimization, it helps to put all your data to memory and try to save and reuse the intermediate data that has already been computed. For example, if you need the moving average for one strategy, the moving average itself can be calculated once and saved to be used later by your other strategies. In my opinion, I7 is already a powerful machine and optimizing/profiling your code will help you the most.
The following user says Thank You to oasisjoe for this post:
Perl is not fast. Use a compiled language like C, C++, C#, or Java (JVM) for speed. This will help you more than using expensive VMs or cloud computing services. Your i7 should be fast enough but I'm not certain since you didn't disclose what kind of strategy it is and what kind of data set you are testing across.
As others mentioned, look to use caching of things that are being calculated over and over again, like a SMA(200), so you don't keep re-calculating the same things with each iteration.
I use Ninjatrader, which allows me to code strategies in C#, and I can backtest several years of data across thousands of stocks in a few minutes using daily bar data.
The following 3 users say Thank You to shodson for this post: