Hi,
How do I get daily NSE advance decline ratio using Python. As I understand there is no free API for NSE. Please suggest
Thanks
Hey Vishal,
First, you can refer to this blog to get the daily stock market data using Python.
Then, to calculate the daily advance-decline ratio, you can follow these steps:
- Obtain the list of stocks that constitute the index you're interested in. This information can typically be found on sources like Wikipedia or the official exchange website, such as NSE India.
- Get the historical price data for these stocks for the last two trading days.
- Calculate the price difference or percentage change for each stock between the two days.
- Count the number of stocks with positive price changes as advances and the number of stocks with negative price changes as declines.
- Calculate the ratio of advances to declines to get the advance-decline ratio for the day.
Hope you find this helpful!
Thanks
Rushda
Thank you. This is helpful.