Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Not getting correct dividend adjusted stock prices in NT

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

    Not getting correct dividend adjusted stock prices in NT

    I am not getting the correct dividend adjusted prices for stocks in NT.

    Example symbol: SPY

    Here's the Yahoo data for June 18, 2015:


    The difference between actual and adjusted closes for 6/18/2015 is 3.37 (212.78 - 209.41).

    Unadjusted prices in NT (using Yahoo or Kinetick) match Yahoo Finance:


    I then go into the instrument manager (while connected to Yahoo) to update dividend and split data:



    continued in next post due to limit on # of pics per post.

    #2
    Then enable adjustments for splits and dividends in NT:


    Restart NT (have to restart for changes in the split/dividend adjustment options), and prices are adjusted:


    June 18, 2015 open/high/low/close prices are adjusted by 3.27 instead of 3.37. So instead of a close of 209.41 as per Yahoo, we see a close of 209.51.

    Hopefully I am simply doing something incorrectly.

    Comment


      #3
      Hello dolomite,
      Thanks for your post.
      NinjaTrader will display this information as it is received from Yahoo. Since the way it is being provided by Yahoo is not matching what you are seeing on their site, you would need to manually adjust the settings as you would want for it to match.
      BrandonNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Brandon View Post
        Hello dolomite,
        Thanks for your post.
        NinjaTrader will display this information as it is received from Yahoo. Since the way it is being provided by Yahoo is not matching what you are seeing on their site, you would need to manually adjust the settings as you would want for it to match.
        Looking into this some more, the difference is that Yahoo is using Center for Research in Security Prices (CRSP) standards for adjusting historical prices for dividends, while Ninjatrader appears to be simply subtracting the dividends. The problem with the subtraction method is you eventually end up with negative asset prices.

        For example, if I connect NT to Yahoo and download all historical data for SPY, the earliest available data is for 1/29/1993. Once it is adjusted for dividends, the close on 1/29/1993 shows as follows:
        Ninjatrader -$5.08
        Yahoo (on website): $28.60

        Ninja gets to that negative price by taking the 1/29/1993 actual close of $43.94 and subtracting all the dividends since then, which sum to $49.02.
        $43.94 - $49.02 = -$5.08.

        What Yahoo is doing (the CRSP standard) is using dividend multipliers to calculate the dividend adjusted closing price. The multiplier is based on dividend and closing price. Described in detail here: https://help.yahoo.com/kb/SLN2311.html

        I'm trying to figure out my options for backtesting purpose:
        1. Change the dividend adjustment logic in NT. I imagine that's not something the end-user has access to change?

        2. Change the dividend amounts in the instrument editor, such that when NT applies its subtraction adjustment for dividends, it yields the correct CRSP adjusted price. That is a lot of work to change a long dividend series, one data point at a time (e.g., the SPY series has 96 dividends). Is there a way to import a dividend series from a text file?

        3. Download the Yahoo adjusted closes into a spreadsheet and create a text file that is then imported into Ninja (with Tools > Options > Data > "Get Data from Server" turned off). I suppose this is the easiest initially, but bound to blow up whenever data is turned on for some other chart, and thus requiring reimporting the data multiple times.

        Any other ways around this?

        Any chance Ninjatrader can change the dividend adjustment logic? I think we can all agree that negative asset prices is a logical error!
        Last edited by dolomite; 03-15-2016, 04:02 PM.

        Comment


          #5
          Hello dolomite,
          Thanks for your reply.
          I will submit this to development.
          BrandonNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by judysamnt7, 03-13-2023, 09:11 AM
          4 responses
          59 views
          0 likes
          Last Post DynamicTest  
          Started by ScottWalsh, Today, 06:52 PM
          4 responses
          36 views
          0 likes
          Last Post ScottWalsh  
          Started by olisav57, Today, 07:39 PM
          0 responses
          7 views
          0 likes
          Last Post olisav57  
          Started by trilliantrader, Today, 03:01 PM
          2 responses
          22 views
          0 likes
          Last Post helpwanted  
          Started by cre8able, Today, 07:24 PM
          0 responses
          10 views
          0 likes
          Last Post cre8able  
          Working...
          X