Welcome to Finviz Finance in Python’s documentation!¶
It is a Finviz Finance information downloader.
Installation (python >= v3.5)¶
> virtualenv -p python3 virtualenvironment
> source virtualenvironment/bin/activate
> pip install finvizfinance
Quote Examples¶
import pandas as pd
from finvizfinance.quote import finvizfinance
stock = finvizfinance('tsla')
Example downloading chart:
stock.TickerCharts(out_dir='asset')
Example getting individual ticker information
stock_fundament = stock.TickerFundament()
stock_description = stock.TickerDescription()
outer_ratings_df = stock.TickerOuterRatings()
news_df = stock.TickerNews()
inside_trader_df = stock.TickerInsideTrader()
Screener Example¶
from finvizfinance.screener.overview import Overview
foverview = Overview()
filters_dict = {'Exchange':'AMEX','Sector':'Basic Materials'}
foverview.set_filter(filters_dict=filters_dict)
df = foverview.ScreenerView()
df.head()
News Example¶
from finvizfinance.news import News
fnews = News()
all_news = fnews.getNews()
# all_news['news'].head()
# all_news['blogs'].head()
Insider Example¶
from finvizfinance.insider import Insider
finsider = Insider(option='top owner trade')
finsider.getInsider().head()
Contents¶
Quote¶
Getting individual ticker information.
-
class
finvizfinance.quote.
finvizfinance
(ticker)¶ Getting information from the individual ticker.
- Args:
- ticker(str): ticker string
-
TickerCharts
(timeframe='daily', charttype='advanced', out_dir='')¶ Download ticker charts.
- Args:
- timeframe(str): choice of timeframe (daily, weekly, monthly). charttype(str): choice of type of chart (candle, line, advanced). out_dir(str): output image directory. default none.
-
TickerDescription
()¶ Get ticker description.
- Returns:
- description(str): ticker description.
-
TickerFullInfo
()¶ Get all the ticker information.
- Returns:
- df(pandas.DataFrame): insider information table
-
TickerFundament
()¶ Get ticker fundament.
- Returns:
- fundament(dict): ticker fundament.
-
TickerInsideTrader
()¶ Get insider information table.
- Returns:
- df(pandas.DataFrame): insider information table
-
TickerNews
()¶ Get news information table.
- Returns:
- df(pandas.DataFrame): news information table
-
TickerOuterRatings
()¶ Get outer ratings table.
- Returns:
- df(pandas.DataFrame): outer ratings table
Screener¶
Getting screener information.
Overview¶
-
class
finvizfinance.screener.overview.
Overview
¶ Getting information from the finviz screener overview page.
-
ScreenerView
(order='ticker', verbose=1)¶ Get screener table.
- Args:
- order(str): sort the table by the choice of order verbose(int): choice of visual the progress. 1 for visualize progress
- Returns:
- df(pandas.DataFrame): screener information table
-
getFilterOptions
(screen_filter)¶ Get filters options.
- Args:
- screen_filter(str): screen filter for checking options
- Returns:
- filter_options(list): all the available filters
-
getFilters
()¶ Get filters.
- Returns:
- filters(list): all the available filters
-
getOrders
()¶ Get orders.
- Returns:
- orders(list): all the available orders
-
getSignal
()¶ Get signals.
- Returns:
- signals(list): all the available trading signals
-
set_filter
(signal='', filters_dict={}, ticker='')¶ Update the settings.
- Args:
- signal(str): ticker signal filters_dict(dict): dictionary of filters ticker(str): ticker string
-
Valuation¶
-
class
finvizfinance.screener.valuation.
Valuation
¶ Valuation inherit from overview module. Getting information from the finviz screener valuation page.
Financial¶
-
class
finvizfinance.screener.financial.
Financial
¶ Financial inherit from overview module. Getting information from the finviz screener financial page.
Ownership¶
-
class
finvizfinance.screener.ownership.
Ownership
¶ Ownership inherit from overview module. Getting information from the finviz screener ownership page.
Technical¶
-
class
finvizfinance.screener.technical.
Technical
¶ Technical inherit from overview module. Getting information from the finviz screener technical page.
Tickers¶
-
class
finvizfinance.screener.ticker.
Ticker
¶ Financial inherit from overview module. Getting information from the finviz screener ticker page.
-
ScreenerView
(verbose=1)¶ Get screener table.
- Args:
- verbose(int): choice of visual the progress. 1 for visualize progress.
- Returns:
- tickers(list): get all the tickers as list.
-
Group¶
Getting group information.
Overview¶
-
class
finvizfinance.group.overview.
Overview
¶ Getting information from the finviz group overview page.
-
ScreenerView
(group='Sector', order='Name')¶ Get screener table.
- Args:
- group(str): choice of group option order(str): sort the table by the choice of order
- Returns:
- df(pandas.DataFrame): group information table
-
getGroup
()¶ Get groups.
- Returns:
- groups(list): all the available groups
-
getOrders
()¶ Get orders.
- Returns:
- orders(list): all the available orders
-
News¶
Getting trading news.
Insider¶
Getting trading insider.
Forex¶
Getting foreign exchange information.
-
class
finvizfinance.forex.
Forex
¶ Getting information from the finviz forex page.
-
chart
(forex, timeframe='D')¶ Get forex chart. Args:
forex (str): foreign exchange name timeframe (str): choice of timeframe(5M, H, D, W, M)
-
performance
(change='percent')¶ Get forex performance table. Args:
change (str): choose a option of change(percent, PIPS)- Returns:
- df(pandas.DataFrame): forex performance table
-
Crypto¶
Getting crypto currency information.
-
class
finvizfinance.crypto.
Crypto
¶ Getting information from the finviz crypto page.
-
chart
(crypto, timeframe='D')¶ Get crypto chart.
- Args:
- crypto (str): crypto currency timeframe (str): choice of timeframe(5M, H, D, W, M)
-
performance
()¶ Get crypto performance table.
- Returns:
- df(pandas.DataFrame): crypto performance table
-