Stop trading In backtest

Avatar
  • updated
  • Completed

For saving time in backtest set some conditions to stopping the current one. 

For example I am trying to make a set for prop farm trading. It is important for me to respect to the rules. I want to break the test if total dd% is greater than 10% (base on initial balance) and continue to the next one. 

set some feature especially for prop farms rules.  

Thanks a lot. 

Avatar
1
Andrey Khatimlianskyi
  • Started

Ok, let's start with MaxDD and Min trades per year.

Then will add other limits, if they are requested.

Avatar
1
parsa shafiee

i have similar scenario
Start backtest with 200$
after few stoploss im near 3$ Balance and EA can`t open new order because no money for trade
but EA works until end of time and this makes optimization test very slow   

Avatar
0
babak raufi

The Max DD% is 10%. 

scenario 1: for example your initial balance 1000$. if your balance or equity goes under 900$ you lose the challenge. 

scenario 2: if you gain the balance to 1500$ your max dd% is 60%. because you gain 50%. 

Avatar
0
Andrey Khatimlianskyi
Quote from babak raufi

I agree with first part 👍.

Becuase  of the prop farm rules. You lose the challenge if  your total DD% > 10% of initial balance for example.  You can lose 3%  a day for 3 days (9% total and under 5% of the dd% limitation in a day), but you do not lose the challenge.
please have a look to this page: 

https://ftmo.com/en/   (Know your Trading Objectives)

or 

https://tradersunion.com/interesting-articles/what-is-prop-trading/prop-firm-challenge/ 

I know what are the limitations.

I will try to rephrase.

Let's say you have balance like this: 1000 - 950 - 1100 - 1050 - 1500 - 1200 - 1750

Max absolute DD is $50 = 5% (from 1000 to 950), but the max DD is $300 = 20% (from 1500 to 1200).

If you start trading from the 1st day, you'll probably pass the challenge. But if you start when balance is 1500, you'll fail.

So, you need to filter out strategies, that have Max DD >= 10%, otherwise you'll fail the challenge.

Avatar
0
babak raufi

I agree with first part 👍.

Becuase  of the prop farm rules. You lose the challenge if  your total DD% > 10% of initial balance for example.  You can lose 3%  a day for 3 days (9% total and under 5% of the dd% limitation in a day), but you do not lose the challenge.
please have a look to this page: 

https://ftmo.com/en/   (Know your Trading Objectives)

or 

https://tradersunion.com/interesting-articles/what-is-prop-trading/prop-firm-challenge/ 

Avatar
0
Andrey Khatimlianskyi

We already have Max Daily/weekly/monthly DD and profit in Period Limits section.

Maybe we just need a flag to stop testing when they are reached?

As for the Global DD and Profit, we can add them.

But why do you want to calculate DD from the start balance? What if you start the EA later, and it will reach the DD without having any profit before? As for me, we always need to analyze Max relative DD from the last Balance maximum, as we do now.

Avatar
0
babak raufi

First of all, all prop rules in my idea. daily DD% base on account balance at the beginning of the day and total dd% base on initial balance. 

Another Idea if the balance got to specific % or $.  I mean set target for balance. 

Avatar
0
Andrey Khatimlianskyi
  • Under review

This is really good idea to improve optimization speed.

Let's define a list of stoppers and implement it.

Your suggestions?

Avatar
1
Jan Corsair

You could set a very high risk in settings. For instance set the risk 10 times higher than you want it to be later on the account and many backtests will fail with 100 DD. If one strategy passes with 99 % DD set the risk back to one-tenth. Result will be a strategy with max 9,9 % DD.