Support Board
Date/Time: Sun, 24 Nov 2024 18:29:24 +0000
Performing Backtest for my automated trading system
View Count: 825
[2024-05-11 06:18:49] |
alexo2022 - Posts: 47 |
I've created an automated trading system, and I want to perform a backtest for 2 years back, what are the options I have ? is there a way I can perform a backtest like in MT4 ? |
[2024-05-11 17:23:40] |
ForgivingComputers.com - Posts: 960 |
I want to perform a backtest for 2 years back
You will need to make sure the chart has all the dates you want. The most accurate form of backtest is to use the Chart>>Replay Chart>>Replay Chart (Control Panel) Ctrl-R. (Tip: Use Ctrl-R). If the system relies on data from other charts, then set Charts to Replay = All Charts in Chartbook, otherwise single chart is fine. Set Replay Mode to Accurate Trading System Back Test Mode. Check Use Start Date-Time Set Date and Time to 2 years back. Set Speed to 1 at first, and then set to a faster speed. Check Skip Empty Periods. When you click Play, Clear All Data for Symbol and Account and set the Processing Step to 60 seconds, if you don't need to watch in slow motion. Results my vary if you change the speed too much, depending on your charts and trading Bot. I recommend doing tests at different speeds to see where they match Speed = 1. is there a way I can perform a backtest like in MT4 ?
If you are looking to optimize parameters, there is no automated way to do that.
|
[2024-05-11 18:20:14] |
alexo2022 - Posts: 47 |
Thank u for your response, how long will it take to run this process, just to be clear, I want to run backtest of period of 2 years, it means since may 2022 until may 2024. what's the difference between what you offered and autotrade system replay backtest ? |
[2024-05-11 18:34:50] |
ForgivingComputers.com - Posts: 960 |
A backtest of two years at 60x would take just over 12 days. (Divide Number of days by the speed.) what's the difference between what you offered and autotrade system replay backtest ?
One is based on the other, as a shortcut. It is worth comparing results. Your mileage may vary. Auto Trade System Back Testing: Replay Back Testing - Automatic The Primary difference is it runs at speed = 100,000 and only works with Single Charts. |
[2024-05-19 21:57:49] |
OctoPi - Posts: 37 |
This depends on bar size and your CPU & harddrive, but generally: Backtesting ~4 years of data on hourly chart takes me about 30 seconds using Bar Based replay and about 2 hours using tick-data replay. Your strategy must not use anything that might give forward bias or have really tight stoploss or targets when using bar-based, but it works really quick and well for rule-based entry/exit systems. I always start with bar-based once I am certain the logic works and then verify it once using tick-by-tick replay. You've picked a GREAT platform for what you are doing. Sierra will reliably return the result you are looking for. |
[2024-05-20 14:34:31] |
alexo2022 - Posts: 47 |
I want to run the backtest on 50 tick chart, when I tried using the Bar Based replay, it took long time, so I canceled the process. |
[2024-05-20 19:31:36] |
OctoPi - Posts: 37 |
50-tick chart is a lot of data for 2 years. What kind of CPU are you running? Single core performance is important here, so if you have like a 1.x Ghz laptop with a mobile processor it will take much longer than a proper full size at 5ghz. Lots of variables, but I doubt you'll find a much faster backtest engine for sequential data. |
[2024-05-20 20:54:33] |
alexo2022 - Posts: 47 |
and if I narrow it to 3 months, how long you think it will take ?
|
[2024-05-20 21:10:32] |
User254520 - Posts: 16 |
Please read my comments. It depends on what you are doing and what you are doing it with. Do you have a Ford Pinto or Porche 911 GT3RS? Give it a test and you will know exactly |
[2024-05-21 00:44:21] |
ForgivingComputers.com - Posts: 960 |
and if I narrow it to 3 months, how long you think it will take ?
Try testing 24 hours of data then multiply the time by 90. That should give you a ballpark number. Also, you can speed up the tick-based backtests, but I recommend you do some tests to make sure the results are consistent at higher speeds. Date Time Of Last Edit: 2024-05-21 00:54:48
|
To post a message in this thread, you need to log in with your Sierra Chart account: