ccsv
ccsv

Reputation: 8669

Python pandas Recording dividend information from yahoo finance

Other than pull OHLC, volume and adjusted close from the Datareader, Is there a way to capture the previous ex dividend dates and the dividend price using methods in pandas.io.data?

If not is the best way to pull dividend data using the request library and codes from here?

Upvotes: 2

Views: 3907

Answers (2)

Sayjota
Sayjota

Reputation: 128

Pandas now supports pulling dividend information from yahoo finance.

from pandas_datareader import data

data.DataReader('PFF', 'yahoo-actions') # returns dividend history for ticker PFF 

Upvotes: 4

elyase
elyase

Reputation: 40993

Is there a way to capture the previous ex dividend dates and the dividend price using methods in pandas.io.data?

No, this is not supported at the moment.

If not is the best way to pull dividend data using the request library and codes from here?

The best way is undefined but that looks like a sensible approach to me (it is how I would go about it).

Upvotes: 0

Related Questions