Open Allen-JThomas opened 1 month ago
Good question and also wait for an answer
Hard to answer without Yahoo's source code. Can you get a third opinion from other source e.g. Morning Star?
I find it confusing that hist['Close']
actually refers to the adjusted close price and not to the real close price. IMHO yfinance should supply both.
EDIT: I am now seeing that this behavior is configurable through the auto_adjust
parameter to history
. Sorry for noise!
Incidentally: I tried to compute the adjusted close prices for https://finance.yahoo.com/quote/HYLD.L/history/?period1=1352793600&period2=1728108169 following the explanation here https://help.yahoo.com/kb/SLN28256.html but the numbers I got were also slightly off.
The adjustment from a dividend is 1.0 - [ dividend / close day before ] . Accumulate them by multiplying. Any differences are rounding errors.
Total returns typically assumes reinvestment on the payment date, which would create a slightly different value because of the compounding effect.
Instead of discounting the price, the base unit (1 share) increases by the multiplier, base unit * (1 + (div/close)).
The next dividend received, all else equal, would be a slightly larger amount.
The adjusted price level would reflect the increase in the base unit (1 share), not because of any cash flow, but because of compounding from reinvestment.
At the end of the holding period, the exit price would be the closing price multiplied by 1 + however many fractional shares accumulated from reinvestment.
Instead of discounting the price, the base unit (1 share) increases by the multiplier, base unit * (1 + (div/close)).
Valid way to adjust but Yahoo does reverse.
I am trying to calculate the monthly and annual percent return for a fund like VSMPX. My understanding is that the Adjusted Close from yfinance takes into account splits and dividends.
To get the percent return I am doing:
My annual return is the following:
However, when I check the total return percentage on the Yahoo Finance website, my adjusted return percentages are off by a little.
For example, you can see that my 2019 annual return is 30.79%, but on Yahoo Finance, it is 30.82%. I realize this is a small descripency but I want 1) Understand why there is a difference 2) I noticed every other total return is the same as Yahoo Finance, so concerned I am doing something wrong.