Skip to main content

API for accessing, synchronizing, managing locally and plotting Yahoo financial data

Project description

YahooFinanceDashboard

API for accessing, synchronizing, managing locally and plotting Yahoo financial data.

Description

This Dashboard uses Yahoo ticker symbols for identifying financial securities and fetches the available historical data from Yahoo servers. The downloaded data is returned in the form of a Pandas DataFrame (Open, Close, High, Low, Adj_Close, Volume). The downloaded data is stored locally in a series of SQL databases for allowing offline work with known data. When working online with new data flowing in, the Dashboard constantly compares the inbound data with the local copy and keeps updating the SQL databases appending the new points.

The Dashboard presents as well some simple tools/functionalities for requesting filtered data, as well as for rendering different types of financial plots (close, ohlc, candlestick) as well as a basic service for searching Yahoo ticker symbols.

The database of available Yahoo ticker symbol gets updated periodically with information of securities in all exchanges worldwide.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development purposes.

Prerequisites

This package works with Python 3 onwards as it uses f-strings

Installing

pip install YahooFinanceDashboard

Basic Usage

Requesting data:

>>> import datetime as dt
>>> from YahooFinanceDashboard import data_io as io
>>> yahoo_ticker = 'AAPL'
>>> data = io.input_data(yahoo_ticker, start=dt.datetime(2016, 2, 16), end=dt.datetime.today())
>>> print(data.head())
                 Open       High        Low      Close  Adj_Close      Volume
Date                                                                         
2016-02-16  95.019997  96.849998  94.610001  96.639999  91.070045  49057900.0
2016-02-17  96.669998  98.209999  96.150002  98.120003  92.464752  44863200.0
2016-02-18  98.839996  98.889999  96.089996  96.260002  90.711960  39021000.0
2016-02-19  96.000000  96.760002  95.800003  96.040001  90.504639  35374200.0
2016-02-22  96.309998  96.900002  95.919998  96.879997  91.296219  34280800.0

Plotting data:

plots.plot_prices(data, plot_type='candlestick')

Searching for tickers:

>>> similar = tickers_browser.search_tickers(name='Citi group')
>>> print(similar.head())
        index               Name Exchange exchangeDisplay Type TypeDisplay
Ticker                                                                    
C          10     Citigroup Inc.      NYQ            NYSE    S      Equity
QNTQF    4527  QinetiQ Group plc      PNK     OTC Markets    S      Equity
C.BA    13853     Citigroup Inc.      BUE    Buenos Aires    S      Equity
C.MX    13906     Citigroup Inc.      MEX          Mexico    S      Equity
MZ4.F   38981    Mitie Group plc      FRA       Frankfurt    S      Equity

>>> similar = tickers_browser.search_tickers(name='Citi group', exchange='mexico')
>>> print(similar.head())
        index            Name Exchange exchangeDisplay Type TypeDisplay
Ticker                                                                 
C.MX    13906  Citigroup Inc.      MEX          Mexico    S      Equity

Authors

  • Daniel Moseguí González - Initial work - mosegui

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

YahooFinanceDashboard-0.0.2.tar.gz (37.4 kB view hashes)

Uploaded Source

Built Distribution

YahooFinanceDashboard-0.0.2-py3-none-any.whl (42.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page