I am trying to download historical prices using yahoo finance for a few mutual funds and ETFs. I think there is a bug in Yahoo finance that confuses the scales of the prices (I don't think is a split issue. See pics below).
In any case here is a MWE to reproduce the problem
import yfinance as yf
import pandas as pd
from pandas_datareader import data as pdr
yf.pdr_override()
tickers = ["0P0001FE43.L", "0P00014IJX.L", "SGLN.L"]
start_date = "2019-01-01"
today = "2021-04-27"
def getData(ticker):
#print (ticker)
data = pdr.get_data_yahoo(ticker, start=start_date, end=today)
data["yahoo_ticker"] = ticker
files.append(data)
files=[]
for tik in tickers:
getData(tik)
df = pd.concat(files)
df = df[ [ "Adj Close", "yahoo_ticker"]]
A closer look at the adjusted prices would show that:
I couldn't think of any systematic way to correct for this problem, so would appreciate any help.




