I was considering to trade some systems in real and for that I would like to have some kind of system-failure control, some rules that stop a system when it´s not profitable, temporary or permanently.
Something like: stop operating in real when the total result of the last 10 trades is negative, an restart when it goes back to green. A roughly analisys of this filter shows a decrease in DD but also a decrease of benefits, when there are benefits of course, if the system goes south this filter would avoid bigger losses.
My question: Do you use some failure-control? If so how it works?
LeoParticipant
Veteran
This is what I use if things are going wrong, even if things were good at the beginning and then start to be wrong
//QUIT THEN ROBOT
//totalrisk=100 //money maximum to risk
Q=MAX(Q,STRATEGYPROFIT)
R=Q-STRATEGYPROFIT
IF R > totalrisk THEN
QUIT
ENDIF
IF STRATEGYPROFIT < (-1* totalrisk) THEN
QUIT
ENDIF
Great ‘Fuse’ coding Leo. I’ll add that to my armoury.
Another idea is trading an average of the strategy profit curve:
https://www.prorealcode.com/blog/trading-strategy-profit-curve/
Leo, if understand the code well it stops the system when a fixed DrawDown is reached (“totalrisk”), isn´t it?. Thanks for sharing, I like the idea. Do you restart the system at some point?
Vonasi, thanks, that´s also another good way
Trading an average of the equity curve or similar will only yield good results if there is serial correlation between the trades. This is true for only very few strategies.
LeoParticipant
Veteran
Hi Tempus, if an strategy quits by using this code, then something is wrong… then I rewrite, backtest, etc, etc, etc… until I improve the system.
Cheers
Trading an average of the equity curve or similar will only yield good results if there is serial correlation between the trades. This is true for only very few strategies.
Right, I wrote an interesting article about this last year: https://www.prorealcode.com/blog/trading-strategy-profit-curve/