Skip to main content

PyPI - Python Version PyPI PyPI - Wheel PyPI - License Coverage Status Read the Docs Downloads CodeFactor Donate PayPal Ruff

finvizfinance

finvizfinance is a package which collects financial information from FinViz website. The package provides the information of the following:

  • Stock charts, fundamental & technical information, insider information and stock news
  • Forex charts and performance
  • Crypto charts and performance

Screener and Group provide dataframes for comparing stocks according to different filters and trading signals.

Docs: https://finvizfinance.readthedocs.io/en/latest/

Downloads

To download the latest version from GitHub:

$ git clone https://github.com/lit26/finvizfinance.git

Or install from PyPi:

$ pip install finvizfinance

Quote

Getting information (fundament, description, outer rating, stock news, inside trader) of an individual stock.

from finvizfinance.quote import finvizfinance

stock = finvizfinance('tsla')

Chart

stock.ticker_charts()

Fundament

stock_fundament = stock.ticker_fundament()

# result
# stock_fundament = {'Company': 'Tesla, Inc.', 'Sector': 'Consumer Cyclical',
# 'Industry': 'Auto Manufacturers', 'Country': 'USA', 'Index': '-', 'P/E': '849.57',
# 'EPS (ttm)': '1.94', 'Insider Own': '0.10%', 'Shs Outstand': '186.00M',
# 'Perf Week': '13.63%', 'Market Cap': '302.10B', 'Forward P/E': '106.17',
# ...}

Description

stock_description = stock.ticker_description()

# stock_description
# stock_description = 'Tesla, Inc. designs, develops, manufactures, ...'

Peer

stock_peer = stock.ticker_peer()

# stock_peer
# stock_peer = ['LI', 'XPEV', 'NIO', 'RIVN', 'LCID', 'TM', 'HMC', 'GM', 'STLA', 'F']

ETF Holders

stock_etf_holders = stock.ticker_etf_holders()

# stock_etf_holders
# stock_etf_holders = ['VTI', 'VOO', 'IVV', 'SPY', 'VUG', 'QQQ', 'VGT', 'IWF', 'XLK', 'SPLG']

Outer Ratings

outer_ratings_df = stock.ticker_outer_ratings()

Outer Ratings example

Stock News

news_df = stock.ticker_news()

stock news example

Inside Trader

inside_trader_df = stock.ticker_inside_trader()

insider trader example

News

Getting recent financial news from finviz.

from finvizfinance.news import News

fnews = News()
all_news = fnews.get_news()

Finviz News include 'news' and 'blogs'.

all_news['news'].head()

news example

all_news['blogs'].head()

news example

Insider

Getting insider trading information.

from finvizfinance.insider import Insider

finsider = Insider(option='top owner trade')
# option: latest, top week, top owner trade
# default: latest

insider_trader = finsider.get_insider()

insider example

Screener (Overview, Valuation, Financial, Ownership, Performance, Technical)

Getting multiple tickers' information according to the filters.

Example: Overview

from finvizfinance.screener.overview import Overview

foverview = Overview()
filters_dict = {'Index':'S&P 500','Sector':'Basic Materials'}
foverview.set_filter(filters_dict=filters_dict)
df = foverview.screener_view()
df.head()

insider example

Screener (Ticker)

Getting list of tickers according to the filters.

Calendar

Getting the economic calendar (release datetime, impact, actual/expected/prior).

from finvizfinance.calendar import Calendar

fcalendar = Calendar()
df = fcalendar.calendar()
df.head()

Earnings

Partitioning tickers by their earnings dates for a period.

from finvizfinance.earnings import Earnings

# period: This Week (default), Next Week, Previous Week, This Month
fearnings = Earnings(period='This Week')

# mode: financial (default), overview, valuation, ownership, performance, technical
days = fearnings.partition_days(mode='financial')

# optionally export the partitioned tables
fearnings.output_excel('earning_days.xlsx')
fearnings.output_csv('earning_days')

Future

Getting futures performance.

from finvizfinance.future import Future

ffuture = Future()
# timeframe: D (default), W, M, Q, HY, Y
df = ffuture.performance(timeframe='D')
df.head()

Misc (Proxy)

Optional proxy can be used for getting information from FinViz website. Accessible from finvizfinance it's an extension of requests library proxies

from finvizfinance.util import set_proxy

proxies={'http': 'http://127.0.0.1:8080'}
set_proxy(proxies)

Credit

Developed by Tianning Li. Feel free to give comments or suggestions.

Download files

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

Source Distribution

finvizfinance-1.5.0.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

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

finvizfinance-1.5.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file finvizfinance-1.5.0.tar.gz.

File metadata

  • Download URL: finvizfinance-1.5.0.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for finvizfinance-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d2ef8000cc281d36e9eccf524cac89f5bf0f41a9d1f38c51ae43defbda3c8858
MD5 45dbdc85fb719c458b08d7321afe72a7
BLAKE2b-256 eb3bb6e086eca1a616bf7b7b060845ff15fa9f1be049532d5808b1ce29e38f82

See more details on using hashes here.

File details

Details for the file finvizfinance-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: finvizfinance-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for finvizfinance-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d30f4fabdc27f660b6f4865321e4e261822e983bee0f75e4722e45d4e239f1f
MD5 3ddd5410f9083d31a71a2f95a69027a2
BLAKE2b-256 76f0de6ebf7bc863c4b83119195e4368cf822939430d6f8d3efdc7d359ed6031

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

1 file

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.14.7

2 files

0.14.6

2 files

0.14.5

2 files

0.14.4

2 files

0.14.3

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.0

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11

2 files

0.10.1

2 files

0.10

2 files

0.9.10

2 files

0.9.9

2 files

0.9.8

2 files

0.9.7

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9

2 files

0.8.2

2 files

0.8.1

2 files

0.8

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7

2 files

0.6.2

2 files

0.6.1

2 files

0.6

2 files

0.5.1

2 files

0.5

2 files

0.4.1

2 files

0.4

2 files

0.3

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page