Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting the correct offsets

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

    Getting the correct offsets

    If I look into the NinjaTrader manual there are 3 different ways that NT creates offsets for rolling over contracts in MergeBackAdjusted mode.

    (a) If available on server, offset is directly downloaded (which server?)
    (b) If not available on server and no offset entered manually, offset will be calculated as the difference between the close of the new contract and the close of the old contract at the close prior to rollover day. The close will be taken from daily data, in case there is no daily data available close will be taken from intraday data.
    (c) It is possible to replace the offset by entering a value manually.

    Question (1): If the offset is calculated from intraday minute data (because no daily data is available), and you have several session breaks on the day prior to rollover data, which is the close used for determining the offset?

    I checked the offset for ZB today. as far as I understand, the offset is calculated from the difference of the close price for ZB prior to rollover date, that is the close price on May 27. Checking for data I found

    Close prices for RTH close (2:00 PM CT) 123'2, 122'14 -> offset -18/32
    Settlement prices for RTH close 122'30, 122'14 -> offset - 16/32
    Close prices for ETH close (4:00 PM CT) 122'23, 122'7 -> offset -16/32

    Question (2): Where does the offset of -15/32 in the instrument manager come from?

    I added UB (ultra bonds) as a new instrument and entered the contract months 06-10 and 09-10, and then the rollover dates (same as for ZB). I then expected that NT would calculate the offsets from my daily data for UB, but nothing happened.

    Question (3): Why didn't NT calculate any offsets for UB?

    #2
    Hello Harry,

    These offsets are loaded from the NinjaTrader historical data server.

    1. I believe it will use the close price closest to the rollover day that is available.

    2. It is loaded from the NinjaTrader historical data server.

    3. Did you load historical data for the UB 06-10 in NinjaTrader - do you receive a close price before 5/28/2010 as per the UB 06-10?

    Comment


      #3
      1. This is what I believe as well, but do you actually know it ?

      2. Why does n't it calculate the correct offset?

      3. Yes, I have loaded all historical data for UB 6-10 and UB 9-10.

      Comment


        #4
        I will need to verify with a colleague that is not in the office today. Please expect a response with the answers to your inquiries tomorrow.

        In addition, can you please tell me what connectivity provider you use.

        Comment


          #5
          Could you please provide me screenshots of the Definition and Misc tabs of the UB instrument you setup as well.

          Comment


            #6
            Have two connectivity providers, I assume you want to know the data provider -> Interactive Brokers.

            Originally posted by NinjaTrader_Jason View Post
            I will need to verify with a colleague that is not in the office today. Please expect a response with the answers to your inquiries tomorrow.

            In addition, can you please tell me what connectivity provider you use.

            Comment


              #7
              Please find below screenshot for UB Definition, Misc and Contract Months


              Originally posted by NinjaTrader_Jason View Post
              Could you please provide me screenshots of the Definition and Misc tabs of the UB instrument you setup as well.
              Attached Files

              Comment


                #8
                Hello Harry,

                It will use the close price of daily data for 5/27. If no daily data is available it will use the last close price of minute data for 5/27. If not, minute data is available, it will use tick data.

                When I load historical daily data for the ZB 06-10 and 09-10 while connected to IB, I display the following close prices: 122'23 (06-10) and 122'08 (09-10). This would result in an offset of -15/32.

                I setup the UB instrument and I experience the same issue - no offset is calculated eventhough I met the conditions below.

                • The Offset field in the Contract Months window is blank
                • Historical data exists in the database for both the new and old contract near the rollover date
                • The MergeBackAdjusted policy must be selected in the Data tab of the Options menu
                • You must be connected to your data provider and requesting data for the instrument

                I display the following close price for the UB in the HDM.

                09-10: 128.0625 or 128'02
                06-10: 129.4687 0r 129'15

                However when I create an new UB 09-10 chart and I checked the offset, it remains blank.

                I will forward your findings to Development. Thank you for reporting.
                Last edited by NinjaTrader_Jason; 06-01-2010, 06:33 AM.

                Comment


                  #9
                  Hello Jason,

                  thank you for your help and for confirming that the offset for UB is not automatically calculated.

                  One more question. The last close price of minute data would be the close of the last session closing bar as per instrument settings or the close of the last bar available in the data base?

                  To explain the difference. I have CET, and the Globex session for ES closes at 3:15 PM Central Time (10:15 PM CET), while the data base still includes data until 11:30 PM CET (start of technical break). So will MergeBackAdjusted use

                  (a) the close at 10:15 PM (session close) or
                  (b) the close at 11:30 PM (close of last bar of the day contained in the data base)

                  ???

                  Originally posted by NinjaTrader_Jason View Post
                  If no daily data is available it will use the last close price of minute data for 5/27.

                  Comment


                    #10
                    Hello Harry,

                    I tested it on my end using the ES 06-10 and 09-10. I modified the expiration date of 09-10 to 5/27/2010. I loaded historical minute data for both expiries for 5/26/2010. The offset that is calculated is displayed as 4.

                    Subsequently I checked the last close price in the database and the close price of the 3:15 minute bar for both expiries. However both display a difference of -4.

                    Last close price in database: 1075.25 (06-10) - 1071.25 (09-10)
                    Close price of 3:15 bar: 1061.00 - 1057.00

                    Unfortunately this test was not helpful. I will setup another test and let you know.

                    Comment


                      #11
                      I tested using the YM using the same scenario. Offset is displayed as -61 when setting the expiration date to 5/27/2010.

                      It is calculated as per the close of the 3:15 bar. The YM 06-10 displays 9922 and the YM 09-10 displays 9861. The last close price in the database does not match; 10025 (06-10) - 9955 (09-10).

                      Comment


                        #12
                        Please disregard my previous 2 posts. During these tests I loaded the close values with 'Merge policy' set to MergeBackAdjusted. When I load the close values with 'Merge policy' set to DoNotMerge and subsequently set it to MergeBackAdjusted, the offset is displayed as zero. It seems calculating the offset from intraday data does not work as expected. I have forwarded my findings accordingly.

                        Comment


                          #13
                          Hello Jason,

                          thank you for the information.

                          Comment


                            #14
                            Hi Harry !

                            We could reproduce and fix your problem. The fix will be available with the next update of NinjaTrader.

                            Thanks for reporting,
                            Christian
                            ChristianSenior Software Developer

                            Comment


                              #15
                              Hi Christian,

                              thanks for your help.

                              Comment

                              Latest Posts

                              Collapse

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