Algo Trading
Fetch Corporate Actions (Bonus, Splits, Dividends) from NSE

FabTrader
Corporate actions like Bonus Issues, Stock Splits, Dividends, and Buybacks play a crucial role in stock market movements. For traders, especially algo traders, having access to this data in a structured format can provide a strategic advantage.
In this article, I introduce a simple yet powerful Python utility that automates the extraction of corporate action data directly from the NSE (National Stock Exchange of India) website. If you’re an algorithmic trader looking to integrate this data into your trading models, this guide will help you get started.
Why Corporate Actions Matter for Traders?
Corporate actions significantly impact stock prices and market sentiment. Here’s why tracking them is essential:
- Bonus Issues: Increase the number of shares in circulation, impacting supply-demand dynamics.
- Stock Splits: Affect stock liquidity and investor perception.
- Dividends: Provide insights into a company's financial health and stability.
- Buybacks: Indicate confidence from the company in its own stock value.
For algo traders, integrating corporate action data into their models ensures backtesting accuracy, event-driven trading strategies, and better risk management.
Fetching NSE Corporate Actions with Python
We have developed a Python utility that downloads corporate action data from the NSE and presents it in a structured pandas DataFrame. This allows for easy analysis and integration into trading algorithms.
How the Utility Works?
- The output is returned as a pandas DataFrame, making it easy to analyze and store.
- The utility fetches data from the NSE corporate actions webpage.
- Users can specify a date range to extract historical corporate actions.
- The data is categorized into different types: Bonus, Dividend, Split, Buyback.
Python Utility and Code Usage
The Python code of the full Utility (NseUtility) can be downloaded from the article >> HERE
Here’s how you can use the utility to fetch different types of corporate actions:
import NseUtility
# Create an instance of NSEUtility
nse = NseUtility.NseUtils()
# Fetch corporate actions for the last one month
print(nse.get_corporate_action().head())
# Fetch corporate actions for a specific date range
print(nse.get_corporate_action('01-01-2025', '31-01-2025').head())
# Fetch only Bonus data
print(nse.get_corporate_action('01-01-2025', '31-01-2025', "Bonus"))
# Fetch only Dividend data
print(nse.get_corporate_action('01-01-2025', '31-01-2025', "Dividend"))
# Fetch only Split data
print(nse.get_corporate_action('01-01-2025', '31-01-2025', "Split"))
# Fetch only Buyback data
print(nse.get_corporate_action('01-01-2025', '31-03-2025', "Buy Back"))
Final Thoughts
With algorithmic trading gaining traction, the need for high-quality, real-time corporate action data is more important than ever. This Python utility simplifies the process, enabling traders to fetch, analyze, and act on key stock market events effortlessly.
If you're an algo trader, consider integrating this data into your trading models to stay ahead of the curve.
📌 Try it out and let me know how it enhances your trading strategies! 🚀
More from Algo Trading
Algo Trading Cost in India: How I Built a Reliable Setup for ₹150/Month
Wondering how much algo trading costs in India? In this article, I break down the real expenses involved in running an algorithmic...
When Your Job Feels Shaky: Can Trading Become an Alternate Income Stream?
Can trading become a stable source of income in India? While many consider it during times of job uncertainty, the reality is...
How Much Capital Do You Really Need for Sustainable Trading Income in India?
How much capital is needed for sustainable trading income in India? This in-depth guide explores the realistic returns traders can expect, the...
