Skip to main content

Allows for retrieving and analysing financial data of multiple companies at once.

Project description

This package can scrape financial data from Yahoo Finance for multiple companies at once. This includes the ratios, balance sheets, income statements, cashflows and stock data. Furthermore, the analysis functions are able identify the state of the companies over the last years and how they are performing against each other.

Functions

A short description of the available functions within the package. Please see the docstrings for further explanation.

  • summary()
    • Scapes data from the 'homepage' of a ticker (example), alters text (%, k, M, B) to ensure everything is seen as a float or integer and puts everything in a DataFrame for comparison.
  • balance_sheet()
    • Scrapes data from the Financials > Balance Sheet page and orders it in a DataFrame.
  • income_statement()
    • Scrapes data from the Financials > Income Statement page and orders it in a DataFrame.
  • cashflows()
    • Scrapes data from the Financials > Cash Flows page and orders it in a DataFrame.
  • ratios()
    • Scrapes data from the Statistics page, alters text (%, k, M, B) to ensure everything is seen as a float or integer and puts everything in a DataFrame for comparison.
  • balance_sheet_analysis()
    • Uses data from balance_sheet() to create several graphs that show the trend over time.
  • income_statement_analysis()
    • Uses data from income_statement() to create several graphs that show the trend over time.
  • cashflow_analysis()
    • Uses data from cashflows() to create several graphs that show the trend over time.
  • ratio_analysis()
    • Uses data from ratios() to create several graphs that show the ratios right now.
  • stock_data()
    • Retrieves stock data based on the pandas_datareader library. Extras include the recognition of private companies to prevent a sudden stop as well as the calculation of returns.
  • correlation_matrix()
    • A matrix that uses input from stock_data() to calculate correlations between the symbols as well as visually show this in a graph when graph=True.
  • rss_feed()
    • News obtained from Yahoo Finance RSS for each chosen ticker. Can potentially be useful to read more about a company without leaving Python.

Addition: leaving the ticker field blank will cause the functions to download the most trending tickers according to Yahoo Finance.

Installation

  1. pip install FundamentalAnalysis
  2. (within Python) import FundamentalAnalysis as fa

Example usage

Collect data from Yahoo Finance including balance sheets, income statements, cashflows, ratios and stock data of all selected tickers.

import FundamentalAnalysis as fa

symbol = ['TSLA','AAPL','MSFT']

balance_sheet = fa.balance_sheet(symbol)
income_statement = fa.income_statement(symbol)
cashflows = fa.cashflows(symbol)
ratios = fa.ratios(symbol)
stock_data = fa.stock_data(2015, 2019, symbol, include_returns=True)

Afterwards you can compare the numbers between companies or plot them to see posible growth/decline. Next to that, by using one of the analysis functions, you can quickly see most of the important metrics. (i.e. ratio_analysis(ratios, symbol))

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

FundamentalAnalysis-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

FundamentalAnalysis-0.1.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file FundamentalAnalysis-0.1.0.tar.gz.

File metadata

  • Download URL: FundamentalAnalysis-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for FundamentalAnalysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9a8b6427fbf7c75c17f7a2079f435597c4a82f76718a2433eb95499413d9aa04
MD5 b52d4deed44aaa627328624897bcd0e0
BLAKE2b-256 133b3fe9a2cf302d9115f5e65198307fbfae95a092d322f0543debd409d6a849

See more details on using hashes here.

File details

Details for the file FundamentalAnalysis-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: FundamentalAnalysis-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for FundamentalAnalysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee288068816f02752606ac75eeeefb7431289b984379bb79008f39026c4d85c6
MD5 1c7f493d413132c7cbd56a650113b10b
BLAKE2b-256 a7c9f43ff317e66c6230eb7815a240c5f733f76d4ace9467cdc089d71c47ac8b

See more details on using hashes here.

Supported by

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