Skip to main content

This is a scraping tool that retrieves continuous Spanish stock market information from Investing.com, into a Pandas DataFrame.

Project description

Investing Scraper of continuous Spanish stock market

Python Version PyPi Version Build Status

Introduction

Since Investing does not have an API to retrieve historical data of the Continuous Spanish Stock Market, I decided to develop a scrapper to retrieve that information.

I developed this scrapper in order to get the data from Investing for my Final Degree Project at the University of Salamanca titled "Machine Learning for stock investment recommendation systems".

To sum up this is not the final version of this scrapper since this is just the pre-alpha version of it. So I will continue scrapping information indexed in investing so you can be able to retrieve more data, as soon as I can.

Installation

In order to get this package working you will need to install investing-scrapper from PyPi via Terminal:

pip install investing-scrapper

All the dependencies are already listed on the setup file of the package, but to sum it up, you will need this requirements:

Use

Currently you just have two possible options to retrieve data with this scrapper:

  • Retrieve the recent data of a stock: it retrieves the historical data from a stock from the last month. The function also checks if the introduced equity name is correct and then retrieves the data.
import investpy as ivs

df = ivs.get_recent_data('bbva')
  • Retrieve the historical data of a stock from a specific range of time: it retrieves the historical data from a stock from a range of time between the start date and the end date, specified in dd/mm/YY format. This function also checks is the introduced equity name is correct and then retrieves the data.
import investpy as ivs

df = ivs.get_historical_data('bbva', '10/10/2018', '10/12/2018')

You can check all the available equities for the Spanish Stock Market in this list from investing: https://es.investing.com/equities/spain

(NOTE: you will need an active HTTP connection in order to get the scrapper working. As a temporary solution, you can just store the retrieved pandas.DataFrame in a CSV so you can work with that data offline.)

Future Work Ideas

Information

For further information or any question feel free to contact me via email at alvarob96@usal.es

Disclaimer: this is just for personal use, I am not related at all with Investing or any similar company. This is just a tool for the research project I am working on. I get no profit or economic benefit from this scrapper.

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

investpy-0.3.6.tar.gz (15.6 kB view details)

Uploaded Source

File details

Details for the file investpy-0.3.6.tar.gz.

File metadata

  • Download URL: investpy-0.3.6.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for investpy-0.3.6.tar.gz
Algorithm Hash digest
SHA256 d61c7ced74e78bc117e21fc124b74e4a86fe7d4485265a8b9720a4cd4b208252
MD5 02e06012b70dad9cbcc6462053b398e1
BLAKE2b-256 a4fb7efc27c37e1816a145045cfb4c4b46e749ad42b9926f9e691ff6c90e17a5

See more details on using hashes here.

Supported by

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