Dealing with high MFE - page 2

 
LJ #:

I believe you'll have to run the back test again and more detailed this time. 


First off, start testing your algo without any sort of stops so no target price nor stop loss nor trailing stop. This will allow you to acquire an actual MFE and MAE of your model in the past X years which I recommend X to be greater than 10, but due to each broker's circumstance of available historical data just make sure that your model trades enough to make your stats significant.

Next, optimization for a target price and a stop loss, find a cluster of MAE that is below zero line and negative; any point below that cluster is determined, generally, as a good area for setting your stop (shown on X-axis in points), but make sure to not set it in such a way that it interferes with your sell logic e.g. your model has a cluster of negative and positive MAE of around 100-200 points due to a sell logic and mostly negative MAE beyond 200 points so you should set your stop anywhere above or equal to 200 points.   

As for the target price, find a cluster of MFE that is above zero line and positive; any point beyond that cluster that it starts to drop in a parabolic-like shape is usually determined, generally, as a good area for setting your target (show on X-axis in points), but, again, make sure to not set it in such a way that it interferes with your sell logic e.g. your model has a cluster of positive and negative MFE that of around 100-200 points and MFE starts dropping around 250 points so 200-250 point range is a good zone for setting your target price. 


Remember, once you incorporate these stops into your model then it's a whole new model, so you'll have to run a new test again. 

That's a really interesting way of testing i've never thought of that. Just curious, say someone does a whole optimization and has parameters to test all of these different stoploss and take profit levels, wouldn't the results automatically pick the best performing levels in the same way that this would? (one showing up on a list and you're method showing up on a graph? (just trying to understand)).

 
@RustyKanuck #: That's a really interesting way of testing i've never thought of that. Just curious, say someone does a whole optimization and has parameters to test all of these different stoploss and take profit levels, wouldn't the results automatically pick the best performing levels in the same way that this would? (one showing up on a list and you're method showing up on a graph? (just trying to understand)).

Yes, in a sense that would be the case. However, you would not know nor understand what factors are playing a role or causing that outcome. By understanding what is happening with the "real" MFE/MAE (with no stops), you will have a better understanding of how to improve the strategy or what money management methods are better suited.

For example, a fixed stop size may not actually be the better choice, and the "real" MFE/MAE study may suggest that you should use an adaptive or dynamic stop size instead, or it may even suggest that a time based stop may be better than a price based one, or some other combination of exit management methods.

 
RustyKanuck #:

Thanks for you're feedback I appreciate that, is there anything into the strategy side of things that I can do? I believe that's were the problem is stemming from in my opinion. As a side note I have taken care of all you're points (thanks for that formula by the way I didn't realize there was such a thing for that that is awesome). I've got multiple scale-outs and trails implemented and that little blip was just an experiment gone wrong lol.

It sure is wild how I can have everything dialed in in the strategy tester (MFE included) but it just falls flat on it's face in live trading, I do my best to avoid curve fitting but maybe it really is just that simple..

Firstly, thanks for triggering a great discussion... here's my contribution.

It must be over 13 years ago that I lost count of the number of eas and strategies that I gave up on after I had previously been convinced by strategy tester -- that the strategy was good.

These eas and strategies, I often discovered that they would prove in the thousands percent in profit in strategy tester, but when I added an equity stop to the code, and made the ea to stop testing after 60% dd, they would always hit that 60% dd -- this is after the previous tests showed huge profits.

And nowadays, I still use this in my testing of my strategies. But I find out why that dd event happend, and then, alter my strategy to either detect and avoid that scenario, OR alter the strategy to allow signal direction to change.

Trail stops are my bread and butter, but they only manage ranging price. The floating profits will counter a dd event, however, you will have lost much of the profits that you may have had when you did not have the trail stop.

 

Forum on trading, automated trading systems and testing trading strategies

Manual intervention into algo's?

RustyKanuck, 2025.01.17 20:24

Well I had a look at my recent performance and this has sure got me wondering if I should either:

  • inquire about/develop some sort of better way to capturing profits.
  • sit on my hands begrudgingly and let the algo's do their thing.
  • close my trades at the end of each day.

... look at the profit i leave on the table!

Thoughts?


 


 

If you are measuring your MAE and MFE, then you should also be measuring your e-ratio, and entry & exit accuracies.

These other metrics are more difficult to interpret from your graph, but it does seem as if your exit accuracy is especially low (probably averaging below 50%).

If this is your own EA, then I would definitely go with the first option and find ways to improve the accuracy metrics.

For the exit, I would definitely experiment with different types of trailing stops.

However, this is not the first time you ask a similar question and I gave a similar answer back then too.

So, I have to ask, why have you not applied the advice yet?

 
Fernando Carreiro #:

However, this is not the first time you ask a similar question and I gave a similar answer back then too.

So, I have to ask, why have you not applied the advice yet?

Merely trying to spur additional conversation around the topic. I have implemented and always implemented all sorts of take profits, trails and scale-outs, I'm starting prep for a re-opt of my algo portfolio soon & potential tweaks if I can brain up something interesting or learn something new that might help with these issues. starting to think about an equity trail or just have a function to close all trades at the end of the week. I haven't dug into how the MFE is all calculated but I would imagine it's just daily potential profit that just keeps getting rolled over to the next day until those trades are closed, so that being said I'm figuring my MFE isn't truly as high as the graph has suggested so potentially a weekly closing of all trades is more logical, I've started trading h1 and above lately so I would imagine closing all trades daily is a bit much... I've never heard of this "e-ratio" so that's interesting i'll have to look into that.

 
RustyKanuck #: Merely trying to spur additional conversation around the topic.

Then you should have continued on the existing topic. I have moved the posts here and remove the other topic.

 
RustyKanuck #: I haven't dug into how the MFE is all calculated but I would imagine it's just daily potential profit that just keeps getting rolled over to the next day until those trades are closed, so that being said I'm figuring my MFE isn't truly as high as the graph has suggested so potentially a weekly closing of all trades is more logical

I suggest you put some effort into understanding how MFE and MAE are calculated and used because your "interpretation" is way off.

Otherwise you will never understand why a trailing stop (or other methods) can affect your exit accuracy.

 
Fernando Carreiro #:

I suggest you put some effort into understanding how MFE and MAE are calculated and used because your "interpretation" is way off.

Otherwise you will never understand why a trailing stop (or other methods) can affect your exit accuracy.

Ok I'll do some digging, thanks.