Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

General question regarding split handling

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

    General question regarding split handling

    I am trying to understand split and dividends adjustment in NT and I think its clear to me now how historical data is split-adjusted on load. I still have several questions regarding split handling:

    1. Historical data gets split/dividend adjusted by NT. But how does real time data get treated? Does it get adjusted too? If yes, split and dividends information need to be available in real-time also but as far as I can see I can only update them manually from time to time.

    2. If real time data does not get adjusted: When running a strategy it will start to process several bars of historical (adjusted) data first. Lets assume I have entered a split date that was announced and will happen in 2 weeks. Then the historical data from, lets say, yesterday will be adjusted already. But the real time data I am getting today (and in the next two weeks) would not be adjusted and therefore would not match my current adjusted data from yesterday. How to handle this?

    #2
    Hello,
    The real time data would not be adjusted as it is reported directly from the exchange as it is traded. Only historical data is split adjusted for backtesting purposes.
    It sounds that you are experiencing that this is not the case on your charts. If this is not the case can you provide further clarification of what you are seeing and a screenshot of your chart?
    To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction
    Last edited by NinjaTrader_CodyB; 12-08-2015, 02:20 PM.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your answer, highly appreciated! I currently have no problem with it, I am just trying to wrap my head around it.

      I still have two questions please:

      1. As I understand it: Strategies running on real time data are supposed to use unadjusted data. So what is the usual method (as in best practice) to deal with splits?
      My only idea is to detect the split within the strategy (by detecting heavy price movements) and stop and restart the strategy to avoid processing the split data. But I could not find any NinjaScript command to restart the current strategy.

      EDIT:
      Just found the NinjaScript function "SetState". Can this be used to terminated and then restart current strategy to handle splits?
      END EDIT

      2. When backtesting then split adjusted data is used. But as far as I have learned so far it is desired to setup the backtesting conditions as close as possible to match the actual real time trading conditions. So wouldn't it be better to use unadjusted data also for backtesting since real time trading will also use unadjusted?
      This way the backtesting results would be as close as possible to real time trading results, no?
      Last edited by _vbs_; 12-09-2015, 01:30 AM.

      Comment


        #4
        Hello,
        The real time data can be confusing. It is unadjusted because it does not need to be adjusted. The real time data is after the split and is workign as it is sent from the exchange. Adjusting this data would cause errors. After the split there are the two instruments created and the data for one will only be for that one and not both. This is how the historical data is adjusted as well. You do not need to add in any logic to process this as there is no difference in the processing before and after a split. When a split occurs you would want to disable the strategy, then add your splits, and start the strategy again if you wish to do so.

        There is not a method to restart a strategy from code. You can disable a strategy and in NinjaTrader 8 you do this by using SetState(State.Terminated)
        Cody B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kevinenergy, 02-17-2023, 12:42 PM
        118 responses
        2,778 views
        1 like
        Last Post kevinenergy  
        Started by briansaul, Today, 05:31 AM
        0 responses
        9 views
        0 likes
        Last Post briansaul  
        Started by traderqz, Yesterday, 12:06 AM
        11 responses
        28 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        8 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Working...
        X