NexusFi: Find Your Edge


Home Menu

 





How many days to back test a 1 minute algorithm?


Discussion in Emini and Emicro Index

Updated
      Top Posters
    1. looks_one Bionan with 13 posts (7 thanks)
    2. looks_two kevinkdog with 4 posts (11 thanks)
    3. looks_3 AllSeeker with 3 posts (4 thanks)
    4. looks_4 DoubleUCapital with 2 posts (1 thanks)
      Best Posters
    1. looks_one kevinkdog with 2.8 thanks per post
    2. looks_two bobwest with 2 thanks per post
    3. looks_3 AllSeeker with 1.3 thanks per post
    4. looks_4 Bionan with 0.5 thanks per post
    1. trending_up 7,729 views
    2. thumb_up 33 thanks given
    3. group 12 followers
    1. forum 31 posts
    2. attach_file 0 attachments




 
Search this Thread

How many days to back test a 1 minute algorithm?

  #21 (permalink)
 Bionan 
Palm Harbor, Florida/USA
 
Experience: Intermediate
Platform: NinjaTrader, SharkIndicat
Broker: Interactive Brokers, NinjaTrader Brokerage, TD Ameritrade
Trading: ES
Posts: 76 since Dec 2019
Thanks Given: 78
Thanks Received: 98


mattz View Post
Yes, I agree that markets are range-bound, but one-minute signal based systems require hosting, direct API and exchange memberships to lower costs. They rarely work for regular retail.

Matt Z
Optimus Futures

There is a substantial risk of loss in futures trading. Past performance is not indicative of future results.

Thanks. That bears consideration.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
Quant vue
Trading Reviews and Vendors
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
  #22 (permalink)
 
AllSeeker's Avatar
 AllSeeker 
Mumbai, India
Legendary Pratik_4Clover
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: NIFTY, BANKNIFTY
Frequency: Daily
Duration: Minutes
Posts: 1,424 since Jan 2019
Thanks Given: 5,249
Thanks Received: 5,012

Bobwest and Kevindogs advice can be like elixir of life from very experienced traders to us, what kevindog has mentioned about "Curve fitting" was something that took me very very long time to figure out, almost half of my trading life.

Do not ignore them, those are very wise words.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #23 (permalink)
 Bionan 
Palm Harbor, Florida/USA
 
Experience: Intermediate
Platform: NinjaTrader, SharkIndicat
Broker: Interactive Brokers, NinjaTrader Brokerage, TD Ameritrade
Trading: ES
Posts: 76 since Dec 2019
Thanks Given: 78
Thanks Received: 98



kevinkdog View Post
You mention:
Sideways markets are likely to have overlapping bars,
lots of tails,
poor follow through
lack of consecutive trend bars
prices oscillate around the twenty-bar moving average.
two or more moving averages are close together.

All those things can be defined and coded (although defining "poor follow through" will be tough).

Let's just take one of those:

"lots of tails"

1. Define what exactly is and is not a tail bar

2. Define what "lots" is


Just break all those in pieces, and code each piece.

In my opinion, coding those will not be the hard part. What will be hard is, after you program, you realize that many of those sideways "tells" are not as good as you originally thought... if that is the case, that is a major blow to your strategy.

Sideways action is easy to pinpoint in hindsight, but much tougher to see in real time.

Good points, and I really do appreciate your taking the time to help me. First, sideways action, as I have used it in this case, maybe too broad a term. I am not talking about trade-able swings in a trading range. I am referring in this case to tight, horizontal trading ranges of 4-8 points with defined support and resistance. To me, those are relatively easy to spot after spending 2 years in Al Brooks' trading room. It's just that I have tried purely price action trading, and while it works great for Al, I have accepted my limitations, and I have discovered I need more clear entry and exit criteria, so I am trying to create code to mimic Al's discretionary rules.

I haven't really tried yet to add conditions to make the strategy viable in all timeframes. I certainly can do this. The strategy was profitable across all tested timeframes, albeit with unacceptable drawdowns. I can add an ADX filter, etc., especially if I can add a 5-minute ADX into the one-minute strategy. I know this can be done with BloodHound, but I don't know if I can do it with NT Strategy Builder.

I am confident that I will be able to get it to work, because the strategy uses a 1-minute chart to mimic the common tactic of placing limit orders to buy below bars and sell above bars on the 5-minute chart in a tight trading range. I have a limit of 1 trade every 4 bars to avoid excessive overhead and overtrading. My target is 8 ticks to cover commissions and slippage, and to allow one scale in to increase probability.

This is a work in progress, so I will continue to refine and test it. If you have any other comments, I wholeheartedly welcome them.
Thanks.

Started this thread Reply With Quote
Thanked by:
  #24 (permalink)
 Bionan 
Palm Harbor, Florida/USA
 
Experience: Intermediate
Platform: NinjaTrader, SharkIndicat
Broker: Interactive Brokers, NinjaTrader Brokerage, TD Ameritrade
Trading: ES
Posts: 76 since Dec 2019
Thanks Given: 78
Thanks Received: 98


kevinkdog View Post
You mention:
Sideways markets are likely to have overlapping bars,
lots of tails,
poor follow through
lack of consecutive trend bars
prices oscillate around the twenty-bar moving average.
two or more moving averages are close together.

All those things can be defined and coded (although defining "poor follow through" will be tough).

Let's just take one of those:

"lots of tails"

1. Define what exactly is and is not a tail bar

2. Define what "lots" is


Just break all those in pieces, and code each piece.

In my opinion, coding those will not be the hard part. What will be hard is, after you program, you realize that many of those sideways "tells" are not as good as you originally thought... if that is the case, that is a major blow to your strategy.

Sideways action is easy to pinpoint in hindsight, but much tougher to see in real time.

Kevin: as of 12:30, today is what I meant by lots of tails. My strategy is a 1-minute strategy, but it's based on the action on the 5-minute chart (I'm essentially trading the 5-minute chart using 1 minute entries). Most of the 5-minute bars have been reversing on the close, and every trend has been reversed. Limit order traders are making money buying below everything, and selling above everything. Price is oscillating around the 20 EMA. Breakouts on every timeframe are being faded. This is a sideways market, and it's pretty easy to identify in real time.

Rick

Started this thread Reply With Quote
Thanked by:
  #25 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,666 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,360


Bionan View Post
Kevin: as of 12:30, today is what I meant by lots of tails. My strategy is a 1-minute strategy, but it's based on the action on the 5-minute chart (I'm essentially trading the 5-minute chart using 1 minute entries). Most of the 5-minute bars have been reversing on the close, and every trend has been reversed. Limit order traders are making money buying below everything, and selling above everything. Price is oscillating around the 20 EMA. Breakouts on every timeframe are being faded. This is a sideways market, and it's pretty easy to identify in real time.

Rick

Great! So you just need to code that up, and use that as your criteria for sideways markets. Then, you should be able to test that historically.

Follow me on Twitter Reply With Quote
Thanked by:
  #26 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106

7 months is the most I can use in TOS on 5 min and it works great

Visit my NexusFi Trade Journal Reply With Quote
  #27 (permalink)
 DoubleUCapital 
Tel-Aviv Israel
 
Experience: Advanced
Platform: NT
Broker: NT
Trading: UB
Posts: 82 since Dec 2019
Thanks Given: 55
Thanks Received: 143

At a fund I used to work for we got 5 years data to build an Algo.
Will try to look for the source we got it from if you like me 2.

Reply With Quote
  #28 (permalink)
 LionTrader3 
Grapevine, Texas
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Emini
Posts: 1 since Jun 2018
Thanks Given: 1
Thanks Received: 1

Back testing is more a function of how many trades you log in your back test than how many days you back test. I would suggest googling margin of error for more information on the topic. Let’s say you log 500 trades which would give you a 4% margin of error for your win rate. This means that your win rate could be +-4%. The more trades you do the lower the margin for error will be so a 2,000 trade sample gives you a 2% margin of error.

This is important because if you know your win rate with a given strategy then you can look at your RR to determine if your going to be profitable or not. Hope this helps.

Reply With Quote
Thanked by:
  #29 (permalink)
 Bionan 
Palm Harbor, Florida/USA
 
Experience: Intermediate
Platform: NinjaTrader, SharkIndicat
Broker: Interactive Brokers, NinjaTrader Brokerage, TD Ameritrade
Trading: ES
Posts: 76 since Dec 2019
Thanks Given: 78
Thanks Received: 98


DoubleUCapital View Post
At a fund I used to work for we got 5 years data to build an Algo.
Will try to look for the source we got it from if you like me 2.

Thanks for the reply. Are you speaking about a source for the algorithm? Would it be useful to an individual trader? I'm currently building my own algorithms to have the computer take the trades that I would take as a discretionary trader, but the computer can take them more quickly, more accurately, and without emotion.

I understand that institutions are constantly reevaluating their algorithms and updating them. Has that been your experience as an institutional trader? Or do they usually leave them alone until they stop working?

Thanks for the insight!
Rick

Started this thread Reply With Quote
  #30 (permalink)
 Bionan 
Palm Harbor, Florida/USA
 
Experience: Intermediate
Platform: NinjaTrader, SharkIndicat
Broker: Interactive Brokers, NinjaTrader Brokerage, TD Ameritrade
Trading: ES
Posts: 76 since Dec 2019
Thanks Given: 78
Thanks Received: 98



LionTrader3 View Post
Back testing is more a function of how many trades you log in your back test than how many days you back test. I would suggest googling margin of error for more information on the topic. Let’s say you log 500 trades which would give you a 4% margin of error for your win rate. This means that your win rate could be +-4%. The more trades you do the lower the margin for error will be so a 2,000 trade sample gives you a 2% margin of error.

This is important because if you know your win rate with a given strategy then you can look at your RR to determine if your going to be profitable or not. Hope this helps.

Thanks. I will check that out. I understand what statistical significance is; I just don't know how to find the margin of error for my own trades. That will be useful. Currently my algorithms show win rate of ~> 70%. One is a 1 minute strategy, so I have tested well over 500 trades.

Thanks-
Rick

Started this thread Reply With Quote
Thanked by:




Last Updated on December 28, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts