Skip to main content

Financial Data Extraction from Reuters.com with Python

Project description

reuterspy

Financial Data Extraction from Reuters.com with Python

reuterspy is a Python package to retrieve data from reuters.com, which provides Balance sheet, Cash Flow, Income Statement and Key Metrics.

reuterspy allows the user to download both recent and historical data from all the financial products indexed at reuters.com

reuterspy seeks simple Python packages when it comes to financial data extraction in order to stop relying on public/private APIs, since reuterspy is FREE and has NO LIMITATIONS.

Installation

In order to get this package working you will need to install it via pip (with a Python3.5 version or higher) on the terminal by typing:

$ pip install reuterspy

Usage

Income Statement

What is an Income Statement?

An income statement is one of the three important financial statements used for reporting a company's financial performance over a specific accounting period, with the other two key statements being the balance sheet and the statement of cash flows.

Also known as the profit and loss statement or the statement of revenue and expense, the income statement primarily focuses on the company’s revenues and expenses during a particular period.

In the example presented below, the yearly income statement of an stock is retrieved.

from reuterspy import Reuters

reuters = Reuters()

ticker_list = ['NFLX.O']
df = reuters.get_income_statement(ticker_list)

print(df.head())
ticker   financialReport  year   metric         value
NFLX.O  income_statement  2019  Revenue  20156.447000
NFLX.O  income_statement  2018  Revenue  15794.341000
NFLX.O  income_statement  2017  Revenue  11692.713000
NFLX.O  income_statement  2016  Revenue   8830.669000
NFLX.O  income_statement  2015  Revenue   6779.511000

Balance Sheet

What Is a Balance Sheet?

A balance sheet is a financial statement that reports a company's assets, liabilities and shareholders' equity at a specific point in time, and provides a basis for computing rates of return and evaluating its capital structure. It is a financial statement that provides a snapshot of what a company owns and owes, as well as the amount invested by shareholders.

The balance sheet is used alongside other important financial statements such as the income statement and statement of cash flows in conducting fundamental analysis or calculating financial ratios.

In the example presented below, the yearly Balance Sheet of an stock is retrieved.

from reuterspy import Reuters

reuters = Reuters()

ticker_list = ['NFLX.O']
df = reuters.get_balance_sheet(ticker_list)

print(df.head())
ticker financialReport  year              metric        value
NFLX.O   balance_sheet  2019                Cash  3103.525000
NFLX.O   balance_sheet  2018                Cash  2572.685000
NFLX.O   balance_sheet  2016                Cash  1264.126000
NFLX.O   balance_sheet  2015                Cash  1706.592000
NFLX.O   balance_sheet  2019  Cash & Equivalents  1914.912000

Cash Flow

What Is a Cash Flow?

Cash flow is the net amount of cash and cash-equivalents being transferred into and out of a business. At the most fundamental level, a company’s ability to create value for shareholders is determined by its ability to generate positive cash flows, or more specifically, maximize long-term free cash flow (FCF).

In the example presented below, the yearly Cash Flow of an stock is retrieved.

from reuterspy import Reuters

reuters = Reuters()

ticker_list = ['NFLX.O']
df = reuters.get_cash_flow(ticker_list)

print(df.head())
ticker financialReport  year                    metric        value
NFLX.O       cash_flow  2019  Net Income/Starting Line  1866.916000
NFLX.O       cash_flow  2018  Net Income/Starting Line  1211.242000
NFLX.O       cash_flow  2017  Net Income/Starting Line   558.929000
NFLX.O       cash_flow  2016  Net Income/Starting Line   186.678000
NFLX.O       cash_flow  2015  Net Income/Starting Line   122.641000

Key Metrics

In the example presented below, the key metrics of an stock is retrieved.

from reuterspy import Reuters

reuters = Reuters()

ticker_list = ['NFLX.O']
df = reuters.get_key_metrics(ticker_list)

print(df.head())
ticker                         metric       value   financialReport
NFLX.O      Price closing or last bid      510.40  Price and Volume
NFLX.O                   52 Week High      575.37  Price and Volume
NFLX.O                    52 Week Low      290.25  Price and Volume
NFLX.O                   Pricing date  2021-01-08  Price and Volume
NFLX.O  10 Day Average Trading Volume        3.49  Price and Volume

Disclaimer

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

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

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reuterspy-1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distributions

reuterspy-1.0-py3.6.egg (5.2 kB view details)

Uploaded Source

reuterspy-1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file reuterspy-1.0.tar.gz.

File metadata

  • Download URL: reuterspy-1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.9

File hashes

Hashes for reuterspy-1.0.tar.gz
Algorithm Hash digest
SHA256 18e3b66fc31077bb0921597d9140442990e2164665a76c38617a68dbe25fcea8
MD5 73cfa6527a25092ffbdb61608c87b464
BLAKE2b-256 2da422e11096536c714e77ed42d5d13c9058ed4bca463755cec43e60aaf83e41

See more details on using hashes here.

File details

Details for the file reuterspy-1.0-py3.6.egg.

File metadata

  • Download URL: reuterspy-1.0-py3.6.egg
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.9

File hashes

Hashes for reuterspy-1.0-py3.6.egg
Algorithm Hash digest
SHA256 b93fb9274a6ce16b77445322b3813213c5d04279cc7ab1a9df1c36fed0048b5e
MD5 8a20d60f39135c356e1daa79d5d3fb3d
BLAKE2b-256 7dc6ab277e539e1b9a0c6026a556592cd14a17fcf59700977568364cc4ef5516

See more details on using hashes here.

File details

Details for the file reuterspy-1.0-py3-none-any.whl.

File metadata

  • Download URL: reuterspy-1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.55.2 CPython/3.6.9

File hashes

Hashes for reuterspy-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8638a3e52c4dd7b4270806439a3a4cb1aac8a091c123f0e544d73a897107cb66
MD5 039ca1ca58ca97251f02ac4d58ccaca0
BLAKE2b-256 9420d4a9d5316d8c83dfd6b3733e92666e427dfce8f0fcafd285496c071061e5

See more details on using hashes here.

Supported by

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