Giter VIP home page Giter VIP logo

reuters-scraping's Introduction

Reuters Scraping Tools

These are the scripts used for the getting the dataset shown here: https://www.kaggle.com/miguelaenlle/reuters-articles-for-3500-stocks-since-2017

Getting Started

Prerequisites

All the prerequisite files are in requirements.txt

Installing

  1. Download this repository
  2. Install the requirements via $ pip install -r requirements.txt

Usage

reuters_scraper.py is for getting scrape data for individual stocks. reuters_full_database_scraper.py is for scraping the entire Reuters database.

To use reuters_scraper.py,

  • Put your script in this directory
  • import reuters_scraper

reuters_scraper has two functions:

  • get_data_for_stock
  • get_data_for_stock_with_lookback

get_data_for_stock takes 2 arguments: stock and verbose If verbose is False, get_data_for_stock will not print anything. get_data_for_stock gets the entire reuters article history for the stock. Use this for backtesting.

get_data_for_stock_with_lookback also takes 2 arguments: stock and lookback It behaves similarly to get_data_for_stock, but lookback controls the amount of articles you want. Lookback is the amount of days backward the earliest publish date for an article should be, e.g. 7 day lookback = Get articles for the past 7 days

To use reuters_full_database_scraper.py, simply call the script via python reuters_full_database_scraper.py and follow the prompts shown on the command line.

reuters-scraping's People

Contributors

miguelaenlle avatar nexus1010 avatar

Forkers

dt021

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.