Out of Sample in Forex.
Dear traders, today I will talk about the In Sample and the Out of Sample in Forex trading when using the EA Studio software.
In the Generator, I leave it to In Sample, actually from the drop-down menu, you can see that there is 10% Out of Sample, 20% Out of Sample, until 50% Out of Sample.
What is the Out of Sample in Forex?
If I leave it to In Sample, this means that the Generator will use all the historical data we have from our data source. So it will use all the bars from the 3rd of October, 2014 till today. It will generate strategies based on this data over these 99,695 bars that I have at the moment.
Now, if I switch to let’s say 20% Out of Sample, it means that the Generator will generate strategies eliminating the most recent 20% of the historical data. I will click on the start, and the green zone appears.
The green zone is 20%. And all the strategies into the collection, they will have a separate green zone.
So the thing here is that the Generator uses only this white zone. And it generates strategies for the first 80% of the historical data that we have. And then for the rest 20% which is the Out of Sample in Forex. I
It simulates trading like what would be the result if we were trading this strategy on the market.
The In Sample in Forex.
One more time, it generates strategies from 80% of the historical data. And for the last 20%, it shows the results like simulated trading.
This is very useful because we can see how this strategy would perform if we placed it back some time ago.
And I can tell you precisely what is the time if I click on it, and I go to Out of Sample monitor.
So the In Sample is the white zone, 80%. This is from the 3rd of October 2014 till the 6th of June, 2018. And the Out of Sample, the green zone, is from the 6th of June, 2018 till today. So it’s like 1 year and 1, 2 months or something.
And you can see that this strategy actually made losses until the end of the In Sample part.
And on the Out of Sample part, it made great profits. And if you test this method of Out of Sample in Forex you will see that some strategies, they make a profit in the green zone. Some of them make losses.
So just to summarize it, one more time, when we use In Sample, it’s like we simulate trading with the strategy, and the Generator uses 80% of the historical data to generate the strategies, and for the last 20%, it simulates trading.
And if you select, for example, 30%, this green zone will be 30%. Now, the thing is that I don’t want to have into the generator strategies that are losing in the Out of Sample. I don’t want to filter them manually. I don’t want to close them this way and to spend time filtering the strategies.
The acceptance criteria for Out of Sample in Forex.
Now, there was an update recently, which changed a lot the Out of Sample. In some of my courses, probably you might hear that I was not a fan of Out of Sample in Forex before. But when the update came, it changed my view for the Out of Sample. And I use it almost every day when I generate strategies.
So if I go to the Acceptance criteria, you can see that below there is this In Sample part, which is 80%, and it’s called training. And we have the Out of Sample, which is 20%, the green zone and it’s called the trading part.
So if I add a minimum Net profit of 0, or let’s say $10, something small, this means that all the strategies will be profitable in the In Sample part. In the white zone. This is more important now than the Out of Sample in Forex testing.
Now, if I add the same thing in the Out of Sample part, let’s say $10 of a profit, this means that all generated strategies, they will be profitable in the green zone. So I will filter the strategies that are profiting in the simulated period. I will remove all these strategies that are losing.
Let me go back to the collection. I will remove all of these strategies that are losing. I don’t want to see them. I don’t want to trade with them. I don’t want even to test them. I don’t want to spend time on them. Because obviously, they are losing on the unknown historical data.
Unknown historical data.
And we call it unknown historical data because the Generator uses 80%. And after that, it simulates trading in the last 20%. So this is like unknown data for the program when it is generating the strategies. So by having this filter in the Acceptance criteria, we can remove the losing strategies.
And this is great because this way we can filter a lot more the strategies when we are using the Out of Sample in Forex trading.
Simply, we can require the strategies that are not just profitable but, for example, that have R-squared above 70, or above 50, above 60, or any other Acceptance criteria like Profit factor.
For example, we can require from the Generator to give us strategies that have a minimum Profit factor of 1.1 in the green zone, in the Out of Sample part.
This is how it’s working. You can learn more about the Out of Sample in Forex in the Forex Money Management Strategy in 2020: Top 10 NZDUSD EAs . And you will see what great strategies we get at the end when we filter those with the Acceptance criteria and with the Out of Sample and In Sample parts.
Thank you very much for reading. I hope you have a great day.