0
$\begingroup$

I am running an asset pricing study. The data is from 1990 to 2020. When the data is adjusted for dividends and splits, stock prices of several firms become negative.

How does one handle negative prices and returns and the results downstream?


Sample Example

If you run this query - you shall be able to download data for SHANTIGEAR listedn on BSE - The adjusted price is negative (Obviously Adjusted close is the closing price after adjustments for all applicable splits and dividend distributions. Data is adjusted using appropriate split and dividend multipliers, adhering to Center for Research in Security Prices (CRSP) standards.) - https://in.finance.yahoo.com/quote/SHANTIGEAR.BO/history?period1=1026000000&period2=1624665600&interval=1d&filter=history&frequency=1d&includeAdjustedClose=true

$\endgroup$
7
  • 1
    $\begingroup$ Is it possible your data was already adjusted for dividends and/or splits? $\endgroup$
    – user253751
    Jun 26, 2021 at 6:54
  • $\begingroup$ I adjusted it myself applying the splits and dividends - but over 30 years - spilts and dividends end up being high $\endgroup$
    – shoonya
    Jun 26, 2021 at 7:02
  • $\begingroup$ ... so is it possible your data was already adjusted for dividends and/or splits? Or you did the adjustment incorrectly? $\endgroup$
    – user253751
    Jun 26, 2021 at 7:04
  • $\begingroup$ No - i have verified the data - original data was nominal price - it had to be adjusted for dividends and splits $\endgroup$
    – shoonya
    Jun 26, 2021 at 7:11
  • 1
    $\begingroup$ Did you employ CRSP adjustments methodology? As I understand it, there can be no negative prices as you always multiply prices by adjustment factors. This operation cannot yield negative prices AFAIR $\endgroup$ Jun 26, 2021 at 7:42

3 Answers 3

3
+25
$\begingroup$

The methodology has to be wrong to generate negative prices. Dividends and splits both generate proportional shifts in nominal prices, that are positive. A proportional shift to any positive number generates a positive number.

The problem with the company given is that it seems to pay a >100% dividend to its previous close, which is why the previous adj close appears negative. Except this is Yahoo Finance's algo being lazy, being configured for US companies where this kind of thing does not happen.

What it should do with a company paying a dividend of 100% of price is not take the price to zero, but halve it! There in lies your problem.

$\endgroup$
3
  • $\begingroup$ i have used the raw prices and used the dividends and split history - and used github.com/cran/TTR/blob/master/src/adjRatios.c - still comes negative $\endgroup$
    – shoonya
    Jul 17, 2021 at 21:49
  • $\begingroup$ OK, odd, but sounds like you're on it ;-) What was the prior close, the div, split and subsequent close before and after the price switched signs? Was there a split and a dividend on the same day? $\endgroup$
    – demully
    Jul 17, 2021 at 21:51
  • $\begingroup$ on 21-Jul-2003 - the raw price was 5.50 and there was a dividend of 6. - as a result - the adjusted price on 18-Jul-2003 became negative $\endgroup$
    – shoonya
    Jul 18, 2021 at 6:22
1
$\begingroup$

This has already been answered but I will try to provide more insight.

The formula that you should use for forward adjusting: $$P_{adj, j}=P_{unadj, j}*\prod_{i=1}^{j} f_i$$ $$f_i=1+\frac{d_i}{P_{unadj, i}}$$ where $d_i$ is a dividend paid on day $j$ and $P_{unadj, j}$ is unadjusted price for that day.

for backward adjusting we have: $$P_{adj, j}=P_{unadj,j}*\prod_{j}^{1} f_j$$ $$f_j=\frac{1}{1 + \frac{d_{j+1}}{p_{unadj,j}}}$$

where we adjust the prices BEFORE the exDate.

The idea with this formula is that we reinvest the dividend back into the stock and hold more units of that stock. Those two methods give us exactly the same returns. As you can see with those two methods above, you can't get negative prices, no matter what is the value of dividend. For the dividend 6 and price of 5.5 that you wrote in your comment, you would get $f=0.45$. This is the correct formula imho.

The formula Yahoo uses is: $$f_j=1 - \frac{d_j}{p_{unadj, j-1}}$$ which is obviously wrong. This formula can yield negative values as you have noticed, but for small dividends (compared to stock price) this method and backward method above yield similar results.

References: https://quantdare.com/approach-to-dividend-adjustment-factors-calculation/

$\endgroup$
5
  • $\begingroup$ I agree to that - but i take raw data and use the TTR code to do adjustments - it still comes out wrong $\endgroup$
    – shoonya
    Jul 22, 2021 at 12:50
  • $\begingroup$ Doesn't TTR code use yahoo formula? rd_ratio[i-1] = rd_ratio[i] * (1.0 - real_div[i] / real_close[i-1]); }. You should change it for the formula above. $\endgroup$
    – emot
    Jul 22, 2021 at 13:55
  • $\begingroup$ I looked at the adjRatios - do you mean to say it cannot handle discrete dividends? @JoshuaUlrich $\endgroup$
    – shoonya
    Jul 23, 2021 at 14:07
  • $\begingroup$ I mean I am looking at the code adjRatios you linked, in line 60-61 of adjRatios.c you have yahoo formula i.e. $1 - \frac{d_j}{p_{unadj,j-1}}$ which can produce negative prices, if you correct it and change it to $1/(1+d_j/p_{unadj,j})$ then you should not have negative prices anymore. In C notiation it would be probably rd_ratio[i-1] = rd_ratio[i] * (1.0 / (real_div[i] / real_close[i-1])); $\endgroup$
    – emot
    Jul 23, 2021 at 14:38
  • $\begingroup$ If that doesn't help, can you provide the exact code you are running? I am not familiar with TTR. $\endgroup$
    – emot
    Jul 23, 2021 at 14:55
1
$\begingroup$

This seems to work for me:

library(quantmod)

# import data
sym <- "SHANTIGEAR.BO"
x <- getSymbols(sym, auto.assign = FALSE) 
div <- getDividends(sym)
spl <- getSplits(sym)

# calculate adjustment ratios
ratios <- adjRatios(close = Cl(x), dividends = div, splits = spl)

# apply adjustment ratios to original data 
adjusted <- adjustOHLC(x, ratio = ratios$Split * ratios$Div)

# chart original series and add calculated adjusted close
chart_Series(x)
add_Series(Cl(adjusted), on = 1)

enter image description here

Notice that the adjusted values are lower at the beginning of the series because the return from dividends have been added, increasing the return.

$\endgroup$
3
  • $\begingroup$ if you plot between 2002-2004 you shall see the issue - imgur.com/e4xKT1k $\endgroup$
    – shoonya
    Jul 24, 2021 at 18:50
  • $\begingroup$ Does not work Joshua $\endgroup$
    – shoonya
    Sep 3, 2021 at 14:25
  • 1
    $\begingroup$ @shoonya: I don't know what the problem is. Yahoo data has changed several times over the years, and I don't have time to investigate. $\endgroup$ Sep 4, 2021 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.