Skip to content

Adding yahoo finance documentation #823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/readers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Data Readers
tiingo
tsp
world-bank
yahoo
46 changes: 46 additions & 0 deletions docs/source/readers/yahoo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Yahoo Finance
----------------------------

.. py:module:: pandas_datareader.yahoo.daily

.. autoclass:: YahooDailyReader
:members:
:inherited-members:

.. py:module:: pandas_datareader.yahoo.fx

.. autoclass:: YahooFXReader
:members:
:inherited-members:

.. py:module:: pandas_datareader.yahoo.options

.. autoclass:: Options
:members:
:inherited-members:

.. py:module:: pandas_datareader.yahoo.quotes

.. autoclass:: YahooQuotesReader
:members:
:inherited-members:

.. py:module:: pandas_datareader.yahoo.components

.. autoclass:: _get_data
:members:
:inherited-members:

.. py:module:: pandas_datareader.yahoo.actions

.. autoclass:: YahooActionReader
:members:
:inherited-members:

.. autoclass:: YahooDivReader
:members:
:inherited-members:

.. autoclass:: YahooSplitReader
:members:
:inherited-members:
29 changes: 29 additions & 0 deletions docs/source/remote_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Currently the following sources are supported:
- :ref:`Stooq<remote_data.stooq>`
- :ref:`MOEX<remote_data.moex>`
- :ref:`Naver Finance<remote_data.naver>`
- :ref:`Yahoo Finance<remote_data.yahoo>`

It should be noted, that various sources support different kinds of data, so not all sources implement the same methods and the data elements returned might also differ.

Expand Down Expand Up @@ -710,3 +711,31 @@ Naver Finance Data

.. _KOSPI: https://en.wikipedia.org/wiki/KOSPI
.. _KOSDAQ: https://en.wikipedia.org/wiki/KOSDAQ

.. _remote_data.yahoo:

Yahoo Finance Data
==================
`Yahoo Finance provides stock market data

The following endpoints are available:

* ``yahoo`` - retrieve daily stock prices (high, open, close, volu,e and adjusted close)
* ``yahoo-actions`` - retrieve historical corporate actions (dividends and stock splits)
* ``yahoo-dividends`` - retrieve historical dividends

.. ipython:: python

import pandas_datareader.data as web
import pandas as pd
import datetime as dt
df = web.DataReader('GE', 'yahoo', start='2019-09-10', end='2019-10-09')
df.head()

start = dt.datetime(2010, 1, 29)
end = dt.datetime.today()
actions = web.DataReader('GOOG', 'yahoo-actions', start, end)
actions.head()

dividends = web.DataReader('IBM', 'yahoo-dividends', start, end)
dividends.head()
File renamed without changes.