All Projects → alvarobartt → Investpy

alvarobartt / Investpy

Licence: mit
Financial Data Extraction from Investing.com with Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Investpy

binance-to-google-sheets
Google Spreadsheets add-on to get data directly from Binance API without any intermediaries! 🚀
Stars: ✭ 367 (-37.69%)
Mutual labels:  financial-data
eastmoney
python requests + Django+ nodejs koa+ mysql to crawl eastmoney fund and stock data,for data analysis and visualiaztion .
Stars: ✭ 56 (-90.49%)
Mutual labels:  financial-data
Jqdatasdk
简单易用的量化金融数据包(easy utility for getting financial market data of China)
Stars: ✭ 457 (-22.41%)
Mutual labels:  financial-data
yliveticker
Get market data from Yahoo Finance websocket in near-real time.
Stars: ✭ 90 (-84.72%)
Mutual labels:  financial-data
FinanceKit
FinanceKit is a Framework for iOS and Mac to build apps working with financial data, like money, currencies, stocks, portfolio, transactions and other concepts.
Stars: ✭ 15 (-97.45%)
Mutual labels:  financial-data
Alpha vantage
A python wrapper for Alpha Vantage API for financial data.
Stars: ✭ 3,553 (+503.23%)
Mutual labels:  financial-data
dados-financeiros
Repositório de Fontes de Dados Financeiros do Brasil
Stars: ✭ 119 (-79.8%)
Mutual labels:  financial-data
Stock analysis for quant
Different Types of Stock Analysis in Python, R, Matlab, Excel, Power BI
Stars: ✭ 525 (-10.87%)
Mutual labels:  financial-data
cityvizor
Cityvizor je aplikace pro všechny, které zajímá hospodaření obcí v ČR – pro občany, zastupitele, pracovníky obce i novináře. Přináší přehlednou vizualizaci rozpočtu obce s detailními daty, která jsou získávána přímo z jejích účetních systémů a následně zobrazována přehledně, srozumitelně a v souvislostech.
Stars: ✭ 51 (-91.34%)
Mutual labels:  financial-data
Finance Go
📊 Financial markets data library implemented in go.
Stars: ✭ 392 (-33.45%)
Mutual labels:  financial-data
IEX CPP API
Unofficial C++ Lib for the IEXtrading API
Stars: ✭ 34 (-94.23%)
Mutual labels:  financial-data
HistoricalVolatility
A framework for historical volatility estimation and analysis.
Stars: ✭ 22 (-96.26%)
Mutual labels:  financial-data
Flutter Candlesticks
Elegant OHLC Candlestick and Trade Volume charts for @Flutter
Stars: ✭ 318 (-46.01%)
Mutual labels:  financial-data
okama
Investment portfolio and stocks analyzing tools for Python with free historical data
Stars: ✭ 87 (-85.23%)
Mutual labels:  financial-data
Yfinance
Download market data from Yahoo! Finance's API
Stars: ✭ 6,148 (+943.8%)
Mutual labels:  financial-data
imputeFin
Imputation of Financial Time Series with Missing Values and/or Outliers
Stars: ✭ 17 (-97.11%)
Mutual labels:  financial-data
Fx 1 Minute Data
HISTDATA - Full Dataset composed of 68 FX trading pairs / Simple API to retrieve 1 Minute data Historical FX Prices (up to June 2019).
Stars: ✭ 278 (-52.8%)
Mutual labels:  financial-data
Go Finance
⚠️ Deprecrated in favor of https://github.com/piquette/finance-go
Stars: ✭ 536 (-9%)
Mutual labels:  financial-data
Yahoofinancials
A powerful financial data module used for pulling data from Yahoo Finance. This module can pull fundamental and technical data for stocks, indexes, currencies, cryptos, ETFs, Mutual Funds, U.S. Treasuries, and commodity futures.
Stars: ✭ 509 (-13.58%)
Mutual labels:  financial-data
Akshare
AKShare is an elegant and simple financial data interface library for Python, built for human beings! 开源财经数据接口库
Stars: ✭ 4,334 (+635.82%)
Mutual labels:  financial-data

Financial Data Extraction from Investing.com with Python

investpy is a Python package to retrieve data from Investing.com, which provides data retrieval from up to: 39952 stocks, 82221 funds, 11403 ETFs, 2029 currency crosses, 7797 indices, 688 bonds, 66 commodities, 250 certificates, and 2812 cryptocurrencies.

investpy allows the user to download both recent and historical data from all the financial products indexed at Investing.com. It includes data from all over the world, from countries such as United States, France, India, Spain, Russia, or Germany, amongst many others.

investpy seeks to be one of the most complete Python packages when it comes to financial data extraction to stop relying on public/private APIs since investpy is FREE and has NO LIMITATIONS. These are some of the features that currently lead investpy to be one of the most consistent packages when it comes to financial data retrieval.

Python Version PyPI Version Package Status Build Status Documentation Status Code Coverage

If you want to support the project, you can buy the developer a coffee. More information at: buy-me-a-coffee

Buy Me A Coffee


Installation

To get this package working you will need to install it via pip (with a Python 3.6 version or higher) on the terminal by typing:

$ pip install investpy

Additionally, if you want to use the latest investpy version instead of the stable one, you can install it from source with the following command:

$ pip install git+https://github.com/alvarobartt/[email protected]

The master branch ensures the user that the most updated version will always be working and fully operative so as not to wait until the the stable release comes out (which eventually may take some time depending on the number of issues to solve).


Usage

Even though some investpy usage examples are presented on the docs, some basic functionality will be sorted out with sample Python code blocks. Additionally, more usage examples can be found under examples/ directory, which contains a collection of Jupyter Notebooks on how to use investpy and handle its data.

Recent/Historical Data Retrieval

investpy allows the user to download both recent and historical data from any financial product indexed (stocks, funds, ETFs, currency crosses, certificates, bonds, commodities, indices, and cryptos). In the example presented below, the historical data from the past years of a stock is retrieved.

import investpy

df = investpy.get_stock_historical_data(stock='AAPL',
                                        country='United States',
                                        from_date='01/01/2010',
                                        to_date='01/01/2020')
print(df.head())
             Open   High    Low  Close     Volume Currency
Date                                                      
2010-01-04  30.49  30.64  30.34  30.57  123432176      USD
2010-01-05  30.66  30.80  30.46  30.63  150476160      USD
2010-01-06  30.63  30.75  30.11  30.14  138039728      USD
2010-01-07  30.25  30.29  29.86  30.08  119282440      USD
2010-01-08  30.04  30.29  29.87  30.28  111969192      USD

To get to know all the available recent and historical data extraction functions provided by investpy, and also, parameter tuning, please read the docs.

Search Data

Investing.com search engine is completely integrated with investpy, which means that any available financial product (quote) can be easily found. The search function allows the user to tune the parameters to adjust the search results to their needs, where both product types and countries from where the products are, can be specified. All the search functionality can be easily used, for example, as presented in the following piece of code:

import investpy

search_results = investpy.search_quotes(text='apple',
                                        products=['stocks'],
                                        countries=['united states'],
                                        n_results=10)

Retrieved search results will be a list of investpy.utils.search_obj.SearchObj class instances. To get to know which are the available functions and attributes of the returned search results, please read the related documentation at Search Engine Documentation. So on, those search results let the user retrieve both recent and historical data from that concrete product, its information, etc., as presented in the piece of code below:

 for search_result in search_results[:1]:
   print(search_result)
   search_result.retrieve_historical_data(from_date='01/01/2019', to_date='01/01/2020')
   print(search_result.data.head())
{"id_": 6408, "name": "Apple Inc", "symbol": "AAPL", "country": "united states", "tag": "apple-computer-inc", "pair_type": "stocks", "exchange": "NASDAQ"}

              Open    High     Low   Close    Volume
Date                                                
2019-01-02  154.89  158.85  154.23  157.92  37039736
2019-01-03  143.98  145.72  142.00  142.19  91312192
2019-01-04  144.53  148.55  143.80  148.26  58607072
2019-01-07  148.70  148.83  145.90  147.93  54777764
2019-01-08  149.56  151.82  148.52  150.75  41025312

Crypto Currencies Data Retrieval

Cryptocurrencies support has recently been included, to let the user retrieve data and information from any available crypto at Investing.com. Please note that some cryptocurrencies do not have available data indexed at Investing.com so that it can not be retrieved using investpy either, even though they are just a few, consider it.

As already presented previously, historical data retrieval using investpy is really easy. The piece of code presented below shows how to retrieve the past years of historical data from Bitcoin (BTC).

import investpy

data = investpy.get_crypto_historical_data(crypto='bitcoin',
                                           from_date='01/01/2014',
                                           to_date='01/01/2019')

print(data.head())
             Open    High    Low   Close  Volume Currency
Date                                                     
2014-01-01  805.9   829.9  771.0   815.9   10757      USD
2014-01-02  815.9   886.2  810.5   856.9   12812      USD
2014-01-03  856.9   888.2  839.4   884.3    9709      USD
2014-01-04  884.3   932.2  848.3   924.7   14239      USD
2014-01-05  924.7  1029.9  911.4  1014.7   21374      USD

Documentation

You can find the complete investpy documentation at Documentation.


Related projects

Since investpy is intended to retrieve data from different financial products as indexed in Investing.com, the development of some support modules which implement an additional functionality based on investpy data, is presented. Note that anyone can contribute to this section by creating any package, module, or utility that uses investpy. So on, the ones already created are going to be presented, since they are intended to be used combined with investpy:

  • pyrtfolio: is a Python package to generate stock portfolios.
  • trendet: is a Python package for trend detection on stock time-series data.

If you developed an interesting/useful project based on investpy data, please open an issue to let me know to include it in this section.


Contribute - Open Source Helpers

As this is an open-source project it is open to contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas. There is an open tab of issues where anyone can open new issues if needed or navigate through them to solve them or contribute to its solving. Remember that issues are not threads to describe multiple problems, this does not mean that issues can not be discussed, but so to keep structured project management, the same issue should not describe different problems, just the main one and some nested/related errors that may be found.


Citation

When citing this repository on your scientific publications please use the following BibTeX citation:

@misc{investpy,
    author = {Alvaro Bartolome del Canto},
    title = {investpy - Financial Data Extraction from Investing.com with Python},
    year = {2018-2021},
    publisher = {GitHub},
    journal = {GitHub Repository},
    howpublished = {\url{https://github.com/alvarobartt/investpy}},
}

When citing this repository on any other social media, please use the following citation:

investpy - Financial Data Extraction from Investing.com with Python developed by Alvaro Bartolome del Canto

And include a mention (so that I can see your work!) to me at any of my social network profiles:

If applicable also mention the source from where the data is retrieved, Investing.com.


Disclaimer

This Python package has been made for research purposes to fit the needs that Investing.com does not cover, so this package works like an Application Programming Interface (API) of Investing.com developed in an altruistic way.

Conclude that investpy is not affiliated in any way to Investing.com or any dependant company, the only requirement specified by Investing.com to develop this package was to "mention the source where data is retrieved from".

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].