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 data object wrapping a Pandas DataFrame (Fields: 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 returned data object upon data request offers as well some simple tools/functionalities for requesting filtered data, as well as for rendering different types of financial plots (close, ohlc, candlestick).

The module offers as well a separate basic service for searching and filtering Yahoo ticker symbols by ticker symbol, security name, exchage, type of security, and more. The database of available Yahoo ticker symbols in which the search is carried out gets updated periodically with information of securities in most 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: Interaction with the data happens mainly over the YahooFinanceDashboard.Historical() object.

import datetime as dt import YahooFinanceDashboard as yfd

yahoo_ticker = 'AAPL'

data = yfd.Historical(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:

data.plot_prices() data.plot_prices(plot_type='ohlc') data.plot_prices(plot_type='close')

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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

YahooFinanceDashboard-1.1.86-py3-none-any.whl (10.6 MB view details)

Uploaded Python 3

File details

Details for the file YahooFinanceDashboard-1.1.86-py3-none-any.whl.

File metadata

  • Download URL: YahooFinanceDashboard-1.1.86-py3-none-any.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/2.7.15+

File hashes

Hashes for YahooFinanceDashboard-1.1.86-py3-none-any.whl
Algorithm Hash digest
SHA256 bd07820345961401c9f41ecc3f0261163b13adbad4f09f051dc1bf171e48f968
MD5 08b3699d226c14e1b26d903cf3481293
BLAKE2b-256 554413cd933d0f76dab3680eedc3cc454575f214d4c9c2a70bf3c52dec0e557f

See more details on using hashes here.

Supported by

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