Backtesting period
Forums › ProRealTime English forum › ProOrder support › Backtesting period
- This topic has 36 replies, 5 voices, and was last updated 6 years ago by
ChrisNYE.
-
-
05/31/2018 at 9:59 PM #71898
Hi Guys,
I am backtesting and optimizing my strategies over the past 6 months. I know this may not be ideal as if I extrapulate this over 5 -10 years my results would probably be disaterious. My question is:
- What period is an ideal backtest sample period for 4hr charts
- I was going to review my strategy every month and fine tune my settings to start the 1st day of the next month – this seems like a lot of work and must be a better way of doing this
I see equity curves on this forum that go up consistently over 10-15 yrs and think how did he/she manage to get that and I must be doing something wrong as I can only get that over 6 months. Which brought me to my insight of I must be doing something incorrectly OR I am optimizing the crap out of my strategy for the past 6 months but in the real world of over a period of time I will be broke quite quickly.
Chris
05/31/2018 at 11:40 PM #71899for what its worth, heres how i do it:
https://www.prorealcode.com/topic/how-i-create-strategies-and-optimize/
also maybe this might help u, might wanna read this first!
https://www.prorealcode.com/topic/thoughts-on-profitable-trading-systems/
heres a few of my strategies, no code tho sry. Pics only:
https://www.prorealcode.com/topic/lets-compare-some-notes/
06/01/2018 at 5:35 AM #71906So my understanding is to optimize a system over a sample period and then use this same system over say 10 yrs to see if it can withstand the tests of the market and be profitable over the long term? Keeping in mind that not all systems make money all the time. So it is recommended I develop other systems over this same period on other markets (i.e fx pairs) that may produce profits when system 1 or 4 are loosing?
How long a period do you suggest for optimization (i.e. 6 mths) and what period do you suggest to test a system in the long term (i.e. 10yrs)?
06/01/2018 at 7:38 AM #71914“So my understanding is to optimize a system over a sample period and then use this same system over say 10 yrs to see if it can withstand the tests of the market and be profitable over the long term?”Yes
“So it is recommended I develop other systems over this same period on other markets (i.e fx pairs) that may produce profits when system 1 or 4 are loosing?”
Yes, there is no 1 holy grail system, but if u got 10 profitable systems running 24/7 and they are not very correlated you should be fine with minimized drawdown on total equity.
“How long a period do you suggest for optimization (i.e. 6 mths) and what period do you suggest to test a system in the long term (i.e. 10yrs)?”
The more data the better. As i wrote in my post on how I do it, i use roughly 30-60% of my data for optimizing as “in sample” and the rest is then “out of sample”.
The % of data i used for optimizing is chosen based on how confident i am. If i think this is a strategy that u can easily curve-fit i use 30% of the data. If i feel like the strategy is very robust and hard to curvefit, i use 50% ~. I want every year to be green (would you run a systsem for 12 months with every month being red? Thats very very hard to do, unless u got 9 other great systems picking up the slack…) But a full red year should be a big red flag unless the markets where horrible (2008 crash or something like that.) I suggest u get as much data as possible. On PRT PRemium 1h u get roughly 11 years worth of data on most markets. Some even more (spain, eur/usd u get data from 1999-2001 -> 2018. Thats very very nice.Another tip is that after ur done optimizing u should be able to expect similar results in similar markets. F example if you make something good for Dow jones, it should be profitable in same timeframe on dax! Maybe not as good as in dow jones, but it shouldnt be fucked. Thats another big red flag about the robustness of your system..
1 user thanked author for this post.
06/03/2018 at 12:58 AM #72093Thank you Jebus89.
As you know the volatility over the past 14 yrs has been up and down. I typically use the ATR over say 30 periods to work out my stop. How do I factor this in when trying to develop a robust system over 10+yrs when the ATR can fluctuate significantly? lets say today the ATR is 12, but 4 years ago it was 20 due to volatility and lets say in 2008 in the crash it was 40. What stop loss value would I use, as you can see depending on the volatility my stop loss will need to be adjusted. To tight and during volatilie times will be stopped out quickly and a large stop of 40 pips may take weeks to reach in less volatile periods. Your thoughts?
06/03/2018 at 9:36 PM #72144Thank you Jebus89.
As you know the volatility over the past 14 yrs has been up and down. I typically use the ATR over say 30 periods to work out my stop. How do I factor this in when trying to develop a robust system over 10+yrs when the ATR can fluctuate significantly? lets say today the ATR is 12, but 4 years ago it was 20 due to volatility and lets say in 2008 in the crash it was 40. What stop loss value would I use, as you can see depending on the volatility my stop loss will need to be adjusted. To tight and during volatilie times will be stopped out quickly and a large stop of 40 pips may take weeks to reach in less volatile periods. Your thoughts?
Well tbh u would need to re-optimize ur atr stop when u mean that volatility has indeed increased. One way to put that into system would be to maybe use a large atr filter and say “use atr 30 as stop if “big atr” is below 150″ or smthn like that. I use a static “stop loss X pips” stop + a more dynamic trailing stop loss, that activates a trailing stop if my trades goes above X pips in profit.
06/04/2018 at 5:50 AM #7214906/04/2018 at 9:18 AM #72167can only get 4 years on 4 hour charts.
What broker and instrument please?
06/04/2018 at 9:03 PM #7227606/04/2018 at 9:59 PM #72285Also why when I back test I can use decimal quantities say 2.2 contracts but when I go live I have to use whole number orders say 2?
With IG live trading you have to round the position size to two decimal places otherwise it will ignore the decimal places.
There is a sticky thread dedicated to this:
https://www.prorealcode.com/topic/trading-with-decimal-quantities-possible-on-proorder-live/
06/04/2018 at 10:03 PM #7228706/04/2018 at 10:05 PM #7228906/04/2018 at 10:07 PM #72290So you are saying I need to input 2.20 instead of 2.2? If not, it doesnt work and comes up red
If you read the thread all will be revealed!
You have to multiply by 100 and round it and then divide by 100.
06/04/2018 at 10:32 PM #72293I have read the thread and I am telling you it doesnt allow me to change it beyond whole numbers. Even manual trading all I can select is + or – 1 quantity. Pls see attcahed and same attachment only has data going to 2014. I feel it may have something to do with the country you are in. Which if it is the case seems silly
06/04/2018 at 10:36 PM #72298 -
AuthorPosts
Find exclusive trading pro-tools on