Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tick vs. 1 minute in backtesting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tick vs. 1 minute in backtesting

    I have been frustrated with my backtesting vs. live trading results. There seems to be a smoothing process affecting the backtesting that is absent in live trading. I suspect it may be some combination of the historical data and/or the backtesting engine.

    I use the backtesting/optimization in large part to establish settings on indicators to optimize them. I am simply trying to get minimum lag without excessive spurrious signals from 'noise'.

    I have access the Gain Demo, MBTrading, and Kenetick as data sources. I typically have been using the Gain Demo lately. Forex.

    Typically, I download historic data via Hist Data Mgr and request both tick and 1-min data for selected dates. Usually ranging from 6 months to 24 months.

    I don't know what limits Gain has for tick data, but I assume it is 12 months or less.

    Under these general parameters, I don't really know what am I getting and how is it being translated by the backtesting engine. Is all data converted to 1-min if the date range exceeds the tick data available?

    If the data is effectively all 1-min (again, in forex), I assume that means that actual data is delivered in 1-minute bars and the intra-bar time sequence information is lost. i.e. OHLC points are there but proper sequence is lost thus smoothing the data stream itself.

    If this is true, then I assume this is the smoothing that is taking place. Am I correct? If so, then any smoothing caused by backtesting logic or chart types creates a second degree of smoothing, i.e. everything is "double smoothed".

    If I stay within the tick data range limitations of the data provider, is this smoothing reduced back to the limitations of the charts that I build on that tick data? i.e. not pre-smoothed by the OHLC problem of the data stream itself?

    Please let me know if I need to clarify or re-state my question. Admittedly poor sentence structure.

    Thanks.

    #2
    Hello Billr,

    For sure there can be differences between backtesting and live trading.


    One of the main things is that during a backtest, conditions can only be evaluated based on bar close, not tick by tick as is possible when running live.

    Right, you don't know the sequence of events in a backtest- - only the 4 data points (OHLC)

    You can see this reference sample for ways of achieving an intrabar granularity during a backtest.

    NinjaTrader runs the backtest against the series you specify. It won't replace 1 minute series for tick if you had specified tick. You can always see visually the data used by brining up a chart of that series.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      hello Ryan,
      Thanks for the response. I do understand the granularity issue and intrabar trading from NT charts etc. My question is really about the data feed into those charts and the fact that they may be pre-smoothing as part of the creation of the charts. I was also remiss in mentioning the fact that I am using renko and range charts.

      So back to my original question, if I request a download for an instrument for 12 months, both tick and 1-min box checked, what happens if the tick data is only available for 3 months back AND I am trying to create a tick based chart such as Renko? What do I get? Is the last three month period more correct than the first 9 mos? Can a chart be built on both types of data?

      A tick based chart built on 1-min OHLC with no time sequence is much 'smoother' potentially than one built on true tick data. When a tick based chart such as renko or range is built on 1-min data and then backtested, it is smoothed twice. Once during the creation of the charts and indicators, and again using the NT backtesting logic for fills etc.

      I am trying to figure out a work around or set of parameters to adjust to the probable distortions caused by the first, chart creation stage of data smoothing within NT.

      To give a very specific example: Setting aside backtesting and strategies, my stochastics built on historic data seem artificially smoothed when compared to live trading. This makes it quite difficult to optimize indicator settings correctly.

      Finally, assuming my comments above are correct, is there a data provider you know of that provides at lease 1 year of tick data (mainly for forex)?

      Thanks.

      Comment


        #4
        Hello Billr,

        The chart is built based on available data. The strategy is run against available data. It doesn't plug in minute values if tick data is unavailable. If you'd like to see what data is available, chart the instrument with the same series you are running the strategy against.

        Base Data used to Build Bars
        A chart bar (interval type) requires a base data value as its source for bar construction. Following are NinjaTrader supported interval types and their required base data values.


        Tick - tick data
        Volume - tick data
        Range - tick data
        Second - tick data
        Minute - minute bar data
        Day - daily bar data
        Week - daily bar data
        Month - daily bar data
        Year - daily bar data


        Why can my chart look different after reloading historical data from the server?
        As ticks come into NinjaTrader in real-time, they are time stamped based on your local PC time if they do not already have an associated time stamp that is provided from the real-time data source. The majority of our supported brokerage feeds DO NOT time stamp ticks where most of our supported market data vendor feeds do provide time stamped ticks. NinjaTrader then builds bars based on the time stamp of the incoming tick and displays these bars in your chart in real-time.

        Let's say you have a tick (tick "A") with a time stamp of 10:31:00 AM which gets packaged into the 10:32:00 AM bar and happens to be the high of that bar. An hour later, you reload historical data from your historical data provider into NinjaTrader. This process will overwrite the existing data. The 10:32:00 AM bar now looks different since the high made by TICK "A" is now part of the prior bar, 10:31:00 AM. How is this possible?



        • Your PC clock could have been off so the time stamp is delayed
        • Your internet may have been lagging so the tick came in slightly delayed and therefore the time stamp is delayed
        • Due to standard latency, even 50ms delay (which is normal) could be the difference between a 10:30:59 and 10:31:00 time stamp
        • There is no way of knowing how the historical data provider packages their bars

        The only way to ensure that data always looks the same is if every connectivity provider sent ticks with time stamps AND that all vendors synchronized on time stamps. Unfortunately, this is just not a reality nor plausible.



        If you're looking for the most history available, look into our data-only providers such as eSignal, Kinetick, DTN/IQ, and BarChart. One year of tick data may be hard to find with these connections. You may get better results purchasing historical data and importing in.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks again Ryan. I was unaware that Range bars could not be built with 1-min data. That is good. Regarding your post, I am aware of the inherent quirks with different start points etc. I was mostly concerned with the possibility of cycling through the OHLC as charts were being constructed and then again (in different way) when testing.

          I have an account at eSignal. I will ask them about it. But according to your note, if the range based charts are built, they must be getting tick data that far back? I could have sworn that I built longer term charts using Kenetick that were more than the 30 days of tick that Kenetick offers, but maybe not.
          Thanks.

          Comment


            #6
            billr,

            Perhaps you had preexisting data already in your Historical Data Manager that allowed you to build a longer chart, but I can confirm that range charts are indeed built off of tick data so that would be required.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh.
              Could you also clarify what happens if I try to create a new range chart (renko or range bars) with a setting for 180 days and only have 160 days of tick data available (via download or memory)?
              Would it create a chart for the 160 days only?
              Thanks again.

              Comment


                #8
                Hi Bill,

                If there are only 160 days of available data, then that's what you will see when you chart. You could request 10 years but will only see what's available.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                602 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                347 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                103 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                559 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                559 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X