iprak / yahoofinance

Home Assistant component which allows you to get stock updates from Yahoo finance.
MIT License
81 stars 11 forks source link

Dividend - ex date, payment day, amount per share #64

Closed danielldomanski closed 2 years ago

danielldomanski commented 2 years ago

Is it possible to have data for dividends? payment day at least?

it would be nice to hear on my daily welcome routine information that some company is paying me today:) Avanza has those data, but there is only a limited stock market (the US and only some European countries ) - Yahoo has more stocks

iprak commented 2 years ago

I analyzed the data for the symbols which displayed Ex-Dividend Date , Earnings Date on Yahoo Finance page.

The data returned by yahoo end point clearly contains Earnings Date. It also contained a data element named dividendDate but the value did not match Ex-Dividend Date. I will look more into it but at this point I don't have data to display in the sensor.

danielldomanski commented 2 years ago

Pity - on main page of stock - there are earnings date and forward dividend - I thought u can use it image

danielldomanski commented 2 years ago

anyway - u did greate job:)

iprak commented 2 years ago

I looked at the received data again and the data element to dividend date was "dividendDate":1636588800 which translated to 11/10/2021, 6:00:00 PM. Repeating the same exercise for MSFT gave dividendDate of 1646870400 => 3/9/2022, 6:00:00 PM but Ex-Dividend Date is Feb 16, 2022. Definitely the Ex-DividendDate is comiing from somewhere else.

By comparing against NASDAQ data, it seems that dividendDate is Dividend Pay Date which was 11/11/21 for AAPL (probably the next day). For MSFT, it was 3/10/2022 (again the day after 1646870400). I verified the same for a couple other symbols. So at the least I can add that.

danielldomanski commented 2 years ago

Thanks very much:)