All Projects → lukaszbanasiak → Yahoo Finance

lukaszbanasiak / Yahoo Finance

Python module to get stock data from Yahoo! Finance

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Yahoo Finance

Scrapy Finance
[OUTDATED] scrapy spiders to crawl the financial text data 📚 📜 pertinent to train word vectors 🚀
Stars: ✭ 17 (-98.29%)
Mutual labels:  finance
Mintable
🍃 Automate your personal finances – for free, with no ads, and no data collection.
Stars: ✭ 849 (-14.67%)
Mutual labels:  finance
Intrinio Realtime Node Sdk
Intrinio NodeJS SDK for Real-Time Stock & Crypto Prices
Stars: ✭ 30 (-96.98%)
Mutual labels:  finance
Gofast
Go implementation of the FAST Protocol (FIX Adapted for STreaming)
Stars: ✭ 24 (-97.59%)
Mutual labels:  finance
Moneymanagerex
Money Manager Ex is an easy to use, money management application built with wxWidgets
Stars: ✭ 836 (-15.98%)
Mutual labels:  finance
Cymbology
Identifies and validates financial security ids such as Sedol, Cusip, Isin numbers.
Stars: ✭ 13 (-98.69%)
Mutual labels:  finance
Twstock
台灣股市股票價格擷取 (含即時股票資訊) - Taiwan Stock Opendata with realtime
Stars: ✭ 763 (-23.32%)
Mutual labels:  finance
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (-3.32%)
Mutual labels:  finance
Finance4py
股市技術分析小工具
Stars: ✭ 8 (-99.2%)
Mutual labels:  finance
Stock2vec
Variational Reccurrent Autoencoder for Embedding stocks to vectors based on the price history
Stars: ✭ 30 (-96.98%)
Mutual labels:  finance
R actuarial
El objetivo de este repositorio es brindar un apoyo a la comunidad interesada en mejorar sus técnicas en el lenguaje de programación R o emprenderlo desde un punto de vista muy aplicado. Un repositorio con códigos de R para aplicaciones actuariales: probabilidad, estadística, riesgo y finanzas.
Stars: ✭ 25 (-97.49%)
Mutual labels:  finance
Awesome Investing
💸💸 Curated list of investment & finance related resources
Stars: ✭ 935 (-6.03%)
Mutual labels:  finance
Ixbrl Parse
A python library for getting useful data out of ixbrl files.
Stars: ✭ 28 (-97.19%)
Mutual labels:  finance
Tradier Options Plotter
Python CLI tool for plotting options price history. Powered by Tradier's Sandbox API.
Stars: ✭ 24 (-97.59%)
Mutual labels:  finance
Portbalance
Determine optimal rebalancing of a passive stock portfolio.
Stars: ✭ 31 (-96.88%)
Mutual labels:  finance
Awesome Streamlit
The purpose of this project is to share knowledge on how awesome Streamlit is and can be
Stars: ✭ 769 (-22.71%)
Mutual labels:  finance
Contractmanager
ContractManager is a contract management software for the Jameica platform.
Stars: ✭ 10 (-98.99%)
Mutual labels:  finance
Indexview
Widget to graph historical stock indexes and compute stats.
Stars: ✭ 35 (-96.48%)
Mutual labels:  finance
Python Training
Python training for business analysts and traders
Stars: ✭ 972 (-2.31%)
Mutual labels:  finance
Blockchain
Substrate-Based Blockchain for any type of Financial Instrument
Stars: ✭ 29 (-97.09%)
Mutual labels:  finance

============= yahoo-finance

Python module to get stock data from Yahoo! Finance

.. image:: https://travis-ci.org/lukaszbanasiak/yahoo-finance.svg?branch=master :target: https://travis-ci.org/lukaszbanasiak/yahoo-finance

Yahoo! Finance backend is http://datatables.org/. If this service is down or has network problems you will receive errors from group YQL*, eg. YQLQueryError.

You can monitor this service via https://www.datatables.org/healthchecker/

More details https://github.com/lukaszbanasiak/yahoo-finance/issues/44

Install

From PyPI with pip:

.. code:: bash

$ pip install yahoo-finance

From development repo (requires git)

.. code:: bash

$ git clone git://github.com/lukaszbanasiak/yahoo-finance.git
$ cd yahoo-finance
$ python setup.py install

Usage examples

Get shares data ^^^^^^^^^^^^^^^

Example: Yahoo! Inc. (YHOO)

.. code:: python

>>> from yahoo_finance import Share
>>> yahoo = Share('YHOO')
>>> print yahoo.get_open()
'36.60'
>>> print yahoo.get_price()
'36.84'
>>> print yahoo.get_trade_datetime()
'2014-02-05 20:50:00 UTC+0000'

Refresh data from market

.. code:: python

>>> yahoo.refresh()
>>> print yahoo.get_price()
'36.87'
>>> print yahoo.get_trade_datetime()
'2014-02-05 21:00:00 UTC+0000'

Historical data

.. code:: python

>>> print yahoo.get_historical('2014-04-25', '2014-04-29')
[{u'Volume': u'28720000', u'Symbol': u'YHOO', u'Adj_Close': u'35.83', u'High': u'35.89', u'Low': u'34.12', u'Date': u'2014-04-29', u'Close': u'35.83', u'Open': u'34.37'}, {u'Volume': u'30422000', u'Symbol': u'YHOO', u'Adj_Close': u'33.99', u'High': u'35.00', u'Low': u'33.65', u'Date': u'2014-04-28', u'Close': u'33.99', u'Open': u'34.67'}, {u'Volume': u'19391100', u'Symbol': u'YHOO', u'Adj_Close': u'34.48', u'High': u'35.10', u'Low': u'34.29', u'Date': u'2014-04-25', u'Close': u'34.48', u'Open': u'35.03'}]

More readable output :)

.. code:: python

>>> from pprint import pprint
>>> pprint(yahoo.get_historical('2014-04-25', '2014-04-29'))
[{u'Adj_Close': u'35.83',
  u'Close': u'35.83',
  u'Date': u'2014-04-29',
  u'High': u'35.89',
  u'Low': u'34.12',
  u'Open': u'34.37',
  u'Symbol': u'YHOO',
  u'Volume': u'28720000'},
 {u'Adj_Close': u'33.99',
  u'Close': u'33.99',
  u'Date': u'2014-04-28',
  u'High': u'35.00',
  u'Low': u'33.65',
  u'Open': u'34.67',
  u'Symbol': u'YHOO',
  u'Volume': u'30422000'},
 {u'Adj_Close': u'34.48',
  u'Close': u'34.48',
  u'Date': u'2014-04-25',
  u'High': u'35.10',
  u'Low': u'34.29',
  u'Open': u'35.03',
  u'Symbol': u'YHOO',
  u'Volume': u'19391100'}]

Available methods

  • get_price()
  • get_change()
  • get_percent_change()
  • get_volume()
  • get_prev_close()
  • get_open()
  • get_avg_daily_volume()
  • get_stock_exchange()
  • get_market_cap()
  • get_book_value()
  • get_ebitda()
  • get_dividend_share()
  • get_dividend_yield()
  • get_earnings_share()
  • get_days_high()
  • get_days_low()
  • get_year_high()
  • get_year_low()
  • get_50day_moving_avg()
  • get_200day_moving_avg()
  • get_price_earnings_ratio()
  • get_price_earnings_growth_ratio()
  • get_price_sales()
  • get_price_book()
  • get_short_ratio()
  • get_trade_datetime()
  • get_historical(start_date, end_date)
  • get_name()
  • refresh()
  • get_percent_change_from_year_high()
  • get_percent_change_from_year_low()
  • get_change_from_year_low()
  • get_change_from_year_high()
  • get_percent_change_from_200_day_moving_average()
  • get_change_from_200_day_moving_average()
  • get_percent_change_from_50_day_moving_average()
  • get_change_from_50_day_moving_average()
  • get_EPS_estimate_next_quarter()
  • get_EPS_estimate_next_year()
  • get_ex_dividend_date()
  • get_EPS_estimate_current_year()
  • get_price_EPS_estimate_next_year()
  • get_price_EPS_estimate_current_year()
  • get_one_yr_target_price()
  • get_change_percent_change()
  • get_dividend_pay_date()
  • get_currency()
  • get_last_trade_with_time()
  • get_days_range()
  • get_year_range()

Get currency data ^^^^^^^^^^^^^^^^^

Example: EUR/PLN (EURPLN=X)

.. code:: python

>>> from yahoo_finance import Currency
>>> eur_pln = Currency('EURPLN')
>>> print eur_pln.get_bid()
'4.2007'
>>> print eur_pln.get_ask()
'4.2091'
>>> print eur_pln.get_rate()
'4.2049'
>>> print eur_pln.get_trade_datetime()
'2014-03-05 11:23:00 UTC+0000'

Refresh data from market

.. code:: python

>>> eur_pln.refresh()
>>> print eur_pln.get_rate()
'4.2052'
>>> print eur_pln.get_trade_datetime()
'2014-03-05 11:27:00 UTC+0000'

Avalible methods

  • get_bid()
  • get_ask()
  • get_rate()
  • get_trade_datetime()
  • refresh()

Requirements

See requirements.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].