How long should you backtest a day trading strategy?

Status
Not open for further replies.
If I make 100 trades a day, and each trade I am risking $30 to make $90 (forget pips for this example), the gross loss of the losing trades is $1500 and the gross profit is $4500. It doesn't matter how many times you flip that coin, you will always make money at the end of the day under those circumstances. Account size is irreverent here as these trades are not relative to account size, but rather a fixed trade size that doesn't change.

If you assume a binomial distribution perhaps. But that's not how trading works.

You'll find in a monte carlo simulation your gains can be substantially less. This code assumes a uniform distribution, which is also not correct, but far more accurate than your binomial assumption.

Your contrived example also has a flaw in assuming that account size doesn't matter. In fact, it matters a lot. Moreover risking $30 to make $90 is entirely unrealistic. I've never seen such a lopsided profit/loss and I've watched every single tastytrade video where they pretend reality is like that.

Code:
import random
def flip():
    flips = 100
    sum = 0
    current_worst = 0
    worst = 0

    for _ in range(flips):
         flip = random.randint(0, 1)
         if (flip == 0):
              sum = sum + 90
              if current_worst > worst:
                worst = current_worst
              current_worst = 0

         else:
              sum = sum - 30
              current_worst = current_worst + 1


    return (worst, sum)

if __name__ == '__main__':
  realizations = []
  drawdowns = []

  i = 10000
  while i > 0:
    results = flip()
    realizations.append(results[1])
    drawdowns.append(results[0])
    i = i - 1

  print(min(realizations))
  print(max(drawdowns))

In my runs I saw a maximum drawdown period of 17. That means in at least one realization there were 17 straight periods of drawdown. It absolutely matters what your account size is and this scales with leverage. Assuming a 25x leverage a 17 period drawdown will ruin you. Feel free to play with it. I set it to 100 trades which was quite generous for this assumption and ran 10,000 simulations.
 
Shouldn't you be asking how long should I forward test a strategy?

I have been experimenting using free trials of some ninjatrader scripts have found that some of them were profitable in the long run (one year) but had some positive and negative months in the process. This concerns me, shouldn't a day trading script be positive every day? Think about the math here, suppose you make 100 trades a day and half of them fail. As long as you are making 3 dollars for every dollar you lose you will be positive at the end of the day. There shouldn't be good days and bad days, or even an entire bad month for that matter.

Can anyone refer me to some reliable (premium) strategies for NT 8? I'm not looking to get rich here, I would be happy to earn just 1% a day reliably.

Because this forum won't let me post replies but will let me post topics for some reason, I have to edit the original post.

"Making 1% a day is the equivalent of finding the exact high and low of the e-mini S&P500...every single day!"


Who do you take me for? Of course I'm using leverage, it is impossible to make any kind of sizable gains day trading without leverage. Look, I'm going to go back to forex factory. I thought this was an elite trading group, but apparently you don't even understand what leverage is so theres no point for me to even ask for advice with strategy testing. It's way past your level. Good day sir.
 
If you assume a binomial distribution perhaps. But that's not how trading works.

You'll find in a monte carlo simulation your gains can be substantially less. This code assumes a uniform distribution, which is also not correct, but far more accurate than your binomial assumption.

Your contrived example also has a flaw in assuming that account size doesn't matter. In fact, it matters a lot.

Code:
import random
def flip():
    flips = 100
    sum = 0
    current_worst = 0
    worst = 0

    for _ in range(flips):
         flip = random.randint(0, 1)
         if (flip == 0):
              sum = sum + 90
              if current_worst > worst:
                worst = current_worst
              current_worst = 0

         else:
              sum = sum - 30
              current_worst = current_worst + 1


    return (worst, sum)

if __name__ == '__main__':
  realizations = []
  drawdowns = []

  i = 10000
  while i > 0:
    results = flip()
    realizations.append(results[1])
    drawdowns.append(results[0])
    i = i - 1

  print(min(realizations))
  print(max(drawdowns))

In my runs I saw a maximum drawdown period of 17. That means in at least one realization there were 17 straight periods of drawdown. It absolutely matters what your account size is and this scales with leverage. Assuming a 25x leverage a 17 period drawdown will ruin you. Feel free to play with it. I set it to 100 trades which was quite generous for this assumption and ran 10,000 simulations.

You are completely missing the point and overthinking the whole thing. Its not code, its math! It has nothing to do with the automated system. If you are making $90 or per trade 50% of the time, and losing $30 the other 50% of the time. It doesn't matter whether you are making 10 trades a day, 100, or even 1000. And the example I used of $90/30 was an example. Realistically I would have a template that would look for a very specific setup where I can make 9 pips/ risk 3 pips. The account size is only relevent when defining an order size in order to calculate profits in USD based on Pips.
 
If you are making $90 or per trade 50% of the time, and losing $30 the other 50% of the time.

Again, trading systems that earn 3 times the risk 50% of the time do NOT exit, period.

Unless you are using inside information and you always know stuff that the general public does not know yet.
 
Last edited:
You are completely missing the point and overthinking the whole thing. Its not code, its math! It has nothing to do with the automated system. If you are making $90 or per trade 50% of the time, and losing $30 the other 50% of the time. It doesn't matter whether you are making 10 trades a day, 100, or even 1000. And the example I used of $90/30 was an example. Realistically I would have a template that would look for a very specific setup where I can make 9 pips/ risk 3 pips. The account size is only relevent when defining an order size in order to calculate profits in USD based on Pips.
You are missing the point. You couldn't trade yourself out of a brown paper bag let alone make 1% per day. Go find another hobby.
 
Again, trading systems making 3 times the risk 50% of the time do NOT exit, period.

Unless you are using inside information and you consistently know stuff that the general public does not know.

What are you on about?
You are missing the point. You couldn't trade yourself out of a brown paper bag let alone make 1% per day. Go find another hobby.

Why would I need to do that? I have proven several strategies are highly capable of making this meager return. I am actually trying to find how to make 5% a day. But that's right, if I could make $500 a day instead of $100 that would overpower the forces of the world and cause the fucking Illuminati to put a hit out on me. Give me a fucking break. Kys and get off my thread asshole.
 

Attachments

  • Un2titled.png
    Un2titled.png
    266.8 KB · Views: 24
The point, jackass, was that I am building a resource list of strategies that I plan on backtesting to see which ones are profitable in a three year time frame. Not to ask for useless advice and bickering about unrelated topics.

No need to be testy.


You already found one, which you have shown. So why not just use that one? Do you not trust it after it's 3-year run? At what point will a strategy become viable to you? Are you trying to find that holy grail that has no losing days?

...This concerns me, shouldn't a day trading script be positive every day? Think about the math here, suppose you make 100 trades a day and half of them fail. As long as you are making 3 dollars for every dollar you lose you will be positive at the end of the day. There shouldn't be good days and bad days, or even an entire bad month for that matter.

As you will invariably find, no system can have 100% winners without some caveat. I.E. Losing days. Math is math, and like all academia, it works on paper. Then the variable of the real world comes in and *poof*!, math folds like origami to the dynamics of real world application.

The new variable that will come into your 3-year runs will be the election. No matter who wins, the dynamics of the market will change. For better or for worse remains to be seen.
 
Why would I need to do that? I have proven several strategies are highly capable of making this meager return. I am actually trying to find how to make 5% a day. But that's right, if I could make $500 a day instead of $100 that would overpower the forces of the world and cause the fucking Illuminati to put a hit out on me. Give me a fucking break. Kys and get off my thread asshole.

I think we got him guys.
 
I think we got him guys.

What, you mean how he wants to make 5% per day, after stating the following about 8 hours ago?

...Can anyone refer me to some reliable (premium) strategies for NT 8? I'm not looking to get rich here, I would be happy to earn just 1% a day reliably.

Indeed. Maybe FF is the right place for him.
 
Status
Not open for further replies.
Back
Top