Walk Forward Optimization


What would you say for walk forward optimization.
How shall it be decided at what time period the EA strategy for the certain pair must be re-optimized?

Thank you!

Not heard of this before, what is it?

There is no EA strategy which will run forever.

Trends are constantly changing as well as the parameters for each EA.
That is why most of the EA owners are doing WFO approach.

I would say that this is the most important question when you create an EA.
“What back period of time data I have optimize, so that the EA parameters are valid for X future period of time??”

Just my personal approach, but I go back to 1/1/2005. Since then we’ve seen a couple major bubbles, a Great Recession, all sorts of interest rate change, a range of oil valuations, and a global pandemic. If my strategy kicks *** through all of that I feel decent about its resilience. Your mileage may vary. :grin:

Here is my two pence worth.
If you believe the market direction is still valid going forward as it was for your period of backtesting, then walk forward with pride. The moment you believe the fundamental market direction is changing / has changed, all walk forward bets and all recent backtesting bets are off.

Yes. A good strategy and optimization of data since 2005 is a good approach.

How do you choose which factor the genetic algorithm to look at when performing the optimization?
I mean, - profit/ profit factor/ dd/ complex criterion max… and vice versa.

Also, after the optimization, how do you decide which set of settings to trade with?
Do you sort the optimization results by profit, result, dd or …

Is that mean the moment of re-optimization is when the back-test max drown-down is reached?

I use the default Balance parameter, because in my mind that is the primary pursuit/goal in the first place. I don’t worry too much about that, because that’s primarily a deduplication mechanism. From there, when results come in, I do heavily consider profit factor and drawdowns. When I am looking for optimal parameters, I’ll sort the results by Profit, and then start looking down the Profit Factor column to see where the best intersection was between those two (favoring PF). For example, if one pass got me 2100 in profit, but had a 1.19 PF, and another pass got me 2000 at a 1.5 PF, I would certainly choose the latter. You can normally expect drawdown amount/% and total trades to have certain relative relationships to that as well (but not always). I definitely try to shy away from results with big DD.

I will say this, nothing will teach you patience like being 400 hrs into an optimization test with 200 hrs to go. You can’t imagine how jealously you’re guarding your laptop at that point. I literally have mine on a $500 UPS lol. I’m considering super gluing the AC adapter in just in case!

For anyone reading this, I want to be clear, the discussion I’m having with world right now is related only to the traditional backtesting I do. It is not “walk forward optimization”.

Fair enough.

Haha yes, I understand. The computational power is very important.
Are you using the MQL5 cloud as well?

Erm… I am not so sure. We may be talking apples and oranges here. Let’s assume I have a back-tested strategy and it is in use (in a live account). I am tracking my account performance regularly and notice that my edge is disappearing fast. I check my plan and its rules. If I do not know why performance is degrading, I would naturally reduce the amount at risk on a per trade basis. Quite what each trader means by “walk forward optimisation” is something I had not thought of before, but I have exercised a change in amount risked based on recent past performance.

Not right now. I use MT4 and I don’t think it’s compatible with that. I have been thinking about MQL5 cloud lately though. I noticed you can actually rent your CPU cycles to people. I have this massive old DELL server I bought to run VMs a while back that I don’t use anymore. It has like 128GB of RAM and several quad core Xeons. Wonder what renting out CPU cycles pays?

Fair enough.
Thank you.

Yes, MT5 is very very advanced regarding EAs. MT5 is light years much better than MT4 regarding EAs.

Yes, you can attach the server to the cloud, but not quite sure how much they pay. There is a formula in their site where you can check.

However, I am interested of using your server and paying rent? How many CPU the server contain?

Regarding WFO,

I am working over the establishment of a such a Tester software, which can be attached to MT5.

I am looking for a feedback and partners//associates, where we can work over this software and a few more useful tools for automated trading.


Hey world! It’s just an old 2U R900. Has 128GB of RAM and 4 quad core Xeons. I have actually decided to dedicate it to folding@home for the Dogecoin team. :slight_smile: Installing a fresh OS on it for that purpose as we speak!

Fair enough.

LOL. Not sure whether you are serious or not. I have no practical experience of mining myself, but I had cause to think about this a couple of weeks ago when I saw someone I follow (Market Oracle?) showing a vid of his kids admiring a crypto mining rig in his front room somewhere in Yorkshire. It was a gaming full height desktop with a fairly recent GPU. He said he expected to make about £3 a day after electricity costs.

So I turned to looking at overall power consumption (being an electrical engineer of old). Not sure what you all pay for leccie, but ours runs us at about £0.15 / kWh after 5% VAT. For the non-Brits that is about USD0.207 / kWh (can’t do this in BTU, sorry). Anyway this may be up to double that paid in some US states. The UK is not known to be cheap for much. So with your ancient 2U rack mount I would expect it to be less efficient than that of my Market Oracle guru. And I am not sure that the software application he was using was telling him the truth. Suffice it to say that when I did the calcs myself, the leccie cost was more than 100% of the estimated BTC mining income. It was a non-starter. By all means set it up, but be aware of your leccie bill.

Worst case scenario. It runs 24x7 and consumes 1,100W
Source of power consumption figure:

1,100W x 24 hrs = 26.4kWh / day x £0.15 / kWh = £3.96

Estimated BTC mining earning (top of my head) £3.00 / day (this is really optimistic).

Net cost of the experiment to you: £0.96/day x 365 = £350 a year. I could think of cheaper hobbies. :grimacing:

For sure, I’m not too worried about it. I’ve ran that sucker for a while as an ESXi host and it didn’t hurt too bad IIRC. I’m not actually going to mine with it. I’m going to plug it into folding@home to help find disease cures. Dogecoin has a team you can sign up for where you earn donated Dogecoins for helping the folding research.


It certainly won’t be profitable for me any time soon if at all. That’s okay. :slight_smile: