yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

'Adj Close' dropped from .download in version 0.2.54

Open sanyearng opened this issue 10 months ago • 4 comments

Many thanks for the fast release on this version! I noticed this no longer includes 'Adj Close' data in the '.download' dataframe (both for single ticker calls and for multiple ticker calls). Is there a way to have this produced again alongside the OHLCV data? Thanks in advance for any insight or help.

sanyearng avatar Feb 19 '25 03:02 sanyearng

Following the code on this, and - as I'm sure you're aware - this is related to a change in default behaviour to auto_adjust=True setting in download(). I assume the prior default was auto_adjust=False (which produces the additional 'Adj Close' values).

Assuming that is the case, I'd like to request that the auto_adjust default be restored to False for download(), if that's possible. I use this and call this embedded in so many places and the consistency would be very much appreciated. Many thanks, if possible.

sanyearng avatar Feb 19 '25 03:02 sanyearng

The switch was to get consistency with Ticker.history, where default behaviour matches more use cases - return prices dividend-adjusted. Don't need to calculate yourself.

ValueRaider avatar Feb 19 '25 19:02 ValueRaider

I hardly ever use Ticker.history but I use download all the time. Your answer implies (and perhaps I should know) that there are cross-dependencies,between the functions. Is that the case? Does auto_adjust =True additionally modify OHL and not just C? From what I understand now, I would still recommend setting auto_adjust=False for download() as it seems to produce a superset of data for download() I.e. with the inclusion of ‘Adj Close’ and ‘Close’.

sanyearng avatar Feb 19 '25 23:02 sanyearng

No cross-dependency

OHLC is adjusted

ValueRaider avatar Feb 20 '25 09:02 ValueRaider

Using YF 0.2.60 as of May 1, 2025. Only when the historical close = adj close are all data downloads the same as yahoo historical data. However, when they are not the same, the data is incorrect and the downloaded close = the Historical adj close.

Anyone know why or how to correct this?

uad1098 avatar May 22 '25 03:05 uad1098

Read the docs

ValueRaider avatar May 22 '25 17:05 ValueRaider