Hi,
I was cross checking the corporate actions data from yfinance and NSE website. I noticed that there is some difference. ex:- The dividend announced on NSE website for Reliance is Rs.6.5/- on 2nd July 2020 but yfinance output is showing 3.25. There is no stock split too to assume if the dividend is adjusted to stock split. If you go back on 2nd August 2019 dividend is 3.21 where as it is Rs. 6.5/- as mentioned in NSE. Could you please let me know what could be the reason for the difference? There are many such cases. Please let me know what are the steps to be followed to use yfinance corporate actions list to adjust the unadjusted data for corporate actions. Is yfinance data reliable?
Hey Shreyas,
I tried running the following code:
import yfinance as yf
# Fetch Reliance stock data
ticker = "RELIANCE.NS"
stock = yf.Ticker(ticker)
# Get dividend history
dividends = stock.dividends
print("Dividend History:")
print(dividends)
# Get stock split history
splits = stock.splits
print("\nStock Split History:")
print(splits)
Dividend History:
Date
1996-05-24 00:00:00+05:30 0.371479
1997-05-16 00:00:00+05:30 0.402435
1998-05-06 00:00:00+05:30 0.866784
1999-05-07 00:00:00+05:30 0.464348
2000-04-06 00:00:00+05:30 0.495305
2001-04-26 00:00:00+05:30 0.526262
2002-10-23 00:00:00+05:30 1.176349
2003-05-23 00:00:00+05:30 0.619131
2004-05-20 00:00:00+05:30 1.300176
2005-05-12 00:00:00+05:30 1.857394
2006-06-01 00:00:00+05:30 1.238263
2007-03-21 00:00:00+05:30 1.362089
2008-05-08 00:00:00+05:30 1.609741
2009-10-16 00:00:00+05:30 3.219483
2010-05-10 00:00:00+05:30 1.733568
2011-05-05 00:00:00+05:30 3.962440
2012-05-31 00:00:00+05:30 2.105046
2013-05-10 00:00:00+05:30 2.228873
2014-05-16 00:00:00+05:30 4.705398
2015-05-08 00:00:00+05:30 4.953050
2016-03-17 00:00:00+05:30 2.600351
2017-07-13 00:00:00+05:30 2.724178
2018-06-27 00:00:00+05:30 5.943660
2019-08-02 00:00:00+05:30 6.438965
2020-07-02 00:00:00+05:30 6.500000
2021-06-11 00:00:00+05:30 3.500000
2022-08-18 00:00:00+05:30 4.000000
2023-08-21 00:00:00+05:30 9.000000
2024-08-19 00:00:00+05:30 10.000000
Name: Dividends, dtype: float64
Stock Split History:
Date
1997-10-27 00:00:00+05:30 2.0
2009-11-26 00:00:00+05:30 2.0
2017-09-07 00:00:00+05:30 2.0
2024-10-28 00:00:00+05:30 2.0
Name: Stock Splits, dtype: float64
The dividend for July 2, 2020, is 6.50, which matches the NSE website. Can you check again? Also, try updating yfinance.
That being said, I also noticed some irregularities in yfinance data for Indian stocks. It can sometimes be unreliable, with missing, outdated, or adjusted values that don’t always match NSE. It’s best to refer to NSE to verify stock splits and other corporate actions for full clarity. Since most of these libraries are essentially wrappers, they may not always function as expected. For more reliable historical data, it’s better to explore the paid data services offered by NSE.
Sure. I’ll try updating the yfinance library and check. I am using the same code.
Noted. I’ll verify with NSE website before using it.
What are the corporate actions we have to consider for calculating the adjusted data? Please let me know what is the impact of merger or demerger on market data and financial statement analysis?
Hi,
The main corporate actions to consider are stock splits, reverse stock splits, cash dividends, stock dividends, rights offerings, and mergers & acquisitions. In the case of mergers, review merger agreements, SEC filings, and other official documents to determine the exact exchange ratio agreed upon by the companies. Adjustments should then be made accordingly, reflecting whether the transaction involves cash, stock, or a combination of both. Financial statements are consolidated, including adjustments for goodwill, revaluation of assets, and changes in liabilities. Similarly, demergers require a thorough examination of official filings to understand how assets, liabilities, and stock structures are distributed among the newly formed entities. Financial statements are restructured, with assets, liabilities, and revenue distributed between the parent and the newly formed entity. So in both cases, you have to see the document to get a good picture.
@Rishikesh_Mahadevan : Are there any detailed resources guiding me in processing the market data and financial statements data due to corporate actions especially in case of merger, demerger, acquisition ? There is an article in NSE website which details about corporate actions in case of stock splits, reverse stock splits, right offerings, bonus, dividend but not for merger, demerger and acquisition here - https://www.nseindia.com/companies-listing/corporate-filings-actions.
Can you also let me know where can we get the financial statements for companies that have not been listed on NSE website if a few companies that have merged are not listed?
You can check out these three videos for a better understanding of corporate actions and price adjustments:
Video 1
Video 2
Video 3
For mergers price adjustments, as mentioned earlier, there isn’t a universal rule that applies to all cases. You’ll need to conduct due diligence, analyze the type of exchange taking place, and carefully read the fine print since many deals involve complex structures (it’s a tedious). The same applies to demergers.
To find information about mergers and demergers, check the company’s official website, as they may release such information in their press releases.
In the end, if you’re looking for reliable adjusted data, NSE Data Services would be your best bet.