Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Difference in Price intraday vs daily in backtesting

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

    Difference in Price intraday vs daily in backtesting

    Good morning,

    When running a backtest part of my strategy looks for a new 25 day high. On the example below, CBSH on March 9, 2022 the 2min charts says the open is 70.83 and the daily chart says the open is 67.46. This creates a false trigger for my strategy because the open is not really above the prior 25 days on the daily chart. I am thinking this is because of a previous stock split or something like that. Is there any sort of work around for this issue of the discrepancy of price? I need to use the intraday 2min and also the daily data series.

    Thank you very much,
    Ryan
    Click image for larger version

Name:	price difference.jpg
Views:	209
Size:	243.2 KB
ID:	1237219

    #2
    Hello Tonkingrf1551,

    I am showing there are two splits (available from a real-time Kinetick connection), in December of 2022, and December of 2021.

    Click image for larger version

Name:	2023-02-28_8-08-56.png
Views:	164
Size:	33.1 KB
ID:	1237232

    But a google search shows this symbol has had a split basically every year.


    If you do not have a real-time Kinetick connection, or want to go back further than December 2021, you will need to put these in manually.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      Thanks for the response. So is there a way to account for this when running a back test so the intraday data matches the daily data?

      Thank you,
      Ryan

      Comment


        #4
        Hello Ryan,

        The Strategy Analyzer loads historical data exactly the same way as a chart.

        However you load a chart and see data, thats the data the Strategy Analyzer is using for backtests.

        As long as you have manually added the split information, the Strategy Analyzer will use this when running the next test.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea,

          Is there a way to update stock splits for multiple instruments at once? Thank you Ryan

          Comment


            #6
            Hello Tonkingrf1551,

            Unfortunately, I am not aware of a way to change the settings of multiple instruments at the same time (including updating splits).
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Chelsea,

              Thanks for the response. I am testing on 3000 US stocks so I would have to go manually through all 3000 instruments and select the update button on them? Also if that is the case before I do that it seems as if I still have a discrepancy. TSLA for example, I have updated and 2 splits were found. After reloading the charts if I go to 07/21/2022 on the 2min chart the first bar of the session opening is 252.56 and on the daily chart the opening is 255.11. This is the same with the close.

              Thank you Ryan

              Comment


                #8
                Hello Ryan,

                Unfortunately, yes, each instrument would have to be updated for splits individually.

                The split information may also not be available with Kinetick and may need to be obtained from a website and entered manually.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Chelsea,

                  After looking at multiple sources its seems TSLA has had 2 stock splits and both of which Kinetick does have. Even after the update there is still a price difference. Example would be TSLA 07/21/2022 on the 2min chart the first bar of the session opening is 252.56 and on the daily chart the opening is 255.11. This is the same with the close price.

                  Thank you Ryan​

                  Comment


                    #10
                    Hello Ryan,

                    That appears to be the actual price and does not appear to be related to splits.

                    TradingView is also showing this same small gap.
                    Interactive financial charts for analysis and generating trading ideas on TradingView!
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Chelsea, How could the "actually price" be different at the same time? the intraday data on trading view does reflex the daily data. With kinetick, the intraday data is not the same as the daily data.

                      Thank you,
                      Ryan

                      Comment


                        #12
                        Hello Ryan,

                        Kinetick Daily data is already split adjusted. This means if you are trying to adjust intra-day data for splits, you will want to have Tools -> Options -> Market data -> 'Adjust for splits - daily data' unchecked and disabled.
                        https://ninjatrader.com/support/help...marketdata.htm

                        Further, I am seeing that the split factor from Kinetick for TSLA on 2022.08.25 (August 25th, 2022) is 3.030303..., and from testing I think this should just be 3.

                        That said, while I am not fully certain how Kinetick or TradingView records data from a live market, I do know the Open, High, Low, Close, and Volume of the session of the Daily bar is subject to settlement prices after the session has closed. Because of this the open of the session and the close of the session can be a few ticks different.

                        I am showing with TradingView the close on July 20th, 2022 as 247.5 and the open on July 21st as 255.11.

                        Kinetick is showing the same information on the daily bar. On the minute bar I am showing (when using a split of 3 on 8/25) the close on 7/20 as 247.3, which is two ticks lower than the daily and the open on 7/21 as 255.11 which is the same the same as the daily.

                        As the opening price on 7/21 is only two ticks different from minute to daily, this would suggest that was the accurate opening minute price on that date and the daily bar is showing the settlement adjusted opening price.

                        Click image for larger version  Name:	2023-03-16_14-22-24.png Views:	0 Size:	200.5 KB ID:	1240897Click image for larger version  Name:	2023-03-16_14-25-30.png Views:	0 Size:	207.6 KB ID:	1240898

                        The Kinetick historical and real-time data, as well as the split information is sourced from IQFeed.

                        You may be able to find more information inquiring about the daily open vs minute open discrepancy of two ticks as well as the possibly incorrect split information with the IQFeed support support [at] iqfeed.net.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by SnailHorn, Yesterday, 10:49 PM
                        1 response
                        10 views
                        0 likes
                        Last Post SnailHorn  
                        Started by manueldecastro, Yesterday, 10:26 AM
                        4 responses
                        21 views
                        0 likes
                        Last Post manueldecastro  
                        Started by TraderIqbal, 10-20-2023, 10:12 AM
                        2 responses
                        119 views
                        0 likes
                        Last Post Funnywo
                        by Funnywo
                         
                        Started by Creamers, 04-27-2024, 05:32 AM
                        12 responses
                        72 views
                        0 likes
                        Last Post Creamers  
                        Started by fredericlebre, Today, 01:19 AM
                        0 responses
                        11 views
                        0 likes
                        Last Post fredericlebre  
                        Working...
                        X