Skip to content

Commit

Permalink
Hotfix/stock screener - Stock Screener Fixes (#4674)
Browse files Browse the repository at this point in the history
* stock screener fixes

* improves error message, this is a FinViz preset

* removes non-screener functions from screener menu

* ruff

* removes tests for removed non-screener functions

* updates tests

* black

* ruff

* adds s&p 500 sector presets

* updates Terminal intro guide for stock screener

* Update screener.md

Updates guide with screenshots.

* Update screener.md

spelling

* updates SDK Intro Guide for Stock Screener

* pylint disable=too-many-lines --> disable=C0302

---------

Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
  • Loading branch information
deeleeramone and hjoaquim authored Apr 8, 2023
1 parent b4a7ed0 commit 8b30f1a
Show file tree
Hide file tree
Showing 51 changed files with 1,528 additions and 8,225 deletions.
3 changes: 0 additions & 3 deletions openbb_terminal/core/sdk/controllers/stocks_sdk_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,6 @@ def screener(self):
"""Stocks Screener Submodule
Attributes:
`arktrades`: Gets a dataframe of ARK trades for ticker\n
`historical`: View historical price of stocks that meet preset\n
`historical_chart`: View historical price of stocks that meet preset\n
`screener_data`: Screener Overview\n
`screener_data_chart`: Screener one of the following: overview, valuation, financial, ownership, performance, technical.\n
"""
Expand Down
6 changes: 0 additions & 6 deletions openbb_terminal/core/sdk/models/stocks_sdk_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,6 @@ class StocksScreener(Category):
"""Screener Module.
Attributes:
`arktrades`: Gets a dataframe of ARK trades for ticker\n
`historical`: View historical price of stocks that meet preset\n
`historical_chart`: View historical price of stocks that meet preset\n
`screener_data`: Screener Overview\n
`screener_data_chart`: Screener one of the following: overview, valuation, financial, ownership, performance, technical.\n
"""
Expand All @@ -549,9 +546,6 @@ class StocksScreener(Category):

def __init__(self):
super().__init__()
self.arktrades = lib.stocks_screener_ark_model.get_ark_trades_by_ticker
self.historical = lib.stocks_screener_yahoofinance_model.historical
self.historical_chart = lib.stocks_screener_yahoofinance_view.historical
self.screener_data = lib.stocks_screener_finviz_model.get_screener_data
self.screener_data_chart = lib.stocks_screener_finviz_view.screener

Expand Down
4 changes: 0 additions & 4 deletions openbb_terminal/core/sdk/sdk_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@
from openbb_terminal.stocks.screener import (
finviz_model as stocks_screener_finviz_model,
finviz_view as stocks_screener_finviz_view,
yahoofinance_model as stocks_screener_yahoofinance_model,
yahoofinance_view as stocks_screener_yahoofinance_view,
ark_model as stocks_screener_ark_model,
ark_view as stocks_screener_ark_view,
)

# Stocks - Technical Analysis
Expand Down
2 changes: 0 additions & 2 deletions openbb_terminal/core/sdk/trail_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,6 @@ stocks.qa.capm,stocks_qa_factors_model.capm_information,
stocks.qa.fama_raw,stocks_qa_factors_model.get_fama_raw,
stocks.qa.historical_5,stocks_qa_factors_model.get_historical_5,
stocks.quote,stocks_model.get_quote,
stocks.screener.arktrades,stocks_screener_ark_model.get_ark_trades_by_ticker,
stocks.screener.historical,stocks_screener_yahoofinance_model.historical,stocks_screener_yahoofinance_view.historical
stocks.screener.screener_data,stocks_screener_finviz_model.get_screener_data,stocks_screener_finviz_view.screener
stocks.search,stocks_helper.search,
stocks.ta.recom,stocks_ta_tradingview_model.get_tradingview_recommendation,stocks_ta_tradingview_view.print_recommendation
Expand Down
2 changes: 0 additions & 2 deletions openbb_terminal/miscellaneous/i18n/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,12 @@ en:
stocks/scr/view: view available presets (defaults and customs)
stocks/scr/set: set one of the available presets
stocks/scr/_preset: Preset
stocks/scr/historical: view historical price
stocks/scr/overview: overview (e.g. Sector, Industry, Market Cap, Volume)
stocks/scr/valuation: valuation (e.g. P/E, PEG, P/S, P/B, EPS this Y)
stocks/scr/financial: financial (e.g. Dividend, ROA, ROE, ROI, Earnings)
stocks/scr/ownership: ownership (e.g. Float, Insider Own, Short Ratio)
stocks/scr/performance: performance (e.g. Perf Week, Perf YTD, Volatility M)
stocks/scr/technical: technical (e.g. Beta, SMA50, 52W Low, RSI, Change)
stocks/scr/arktrades: get ARK trades for a chosen ticker
stocks/scr/_screened_tickers: Last screened tickers
stocks/scr/ca: take these to comparison analysis menu
stocks/ins/view: view available presets
Expand Down
212 changes: 212 additions & 0 deletions openbb_terminal/miscellaneous/stocks/screener/all_parameters.txt

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions openbb_terminal/miscellaneous/stocks/screener/djia_components.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Author of preset: OpenBB
# Description: Filter for the Dow Jones Industrial Average components.

[General]

[Descriptive]

Index = DJIA

[Fundamental]

[Technical]

16 changes: 16 additions & 0 deletions openbb_terminal/miscellaneous/stocks/screener/sdk_guide_preset.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Author of preset: OpenBB
# Description: SDK Demo Screener

[General]
Order = Market Cap.
Signal = Major News

[Descriptive]
Average Volume = Over 500K
Price = Over $5

[Fundamental]
Price/Free Cash Flow = Low (<15)

[Technical]
Beta = Under 0.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Basic Materials Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Basic Materials

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Communication Services Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Communication Services

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Consumer Cyclical Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Consumer Cyclical

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Consumer Defensive Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Consumer Defensive

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Energy Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Energy

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Financial Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Financial

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Healthcare Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Healthcare

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Industrials Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Industrials

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Real Estate Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Real Estate

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Technology Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Technology

[Fundamental]

[Technical]

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Author of preset: OpenBB
# Description: Filter for the S&P 500 Utilities Sector components.

[General]

[Descriptive]

Index = S&P 500
Sector = Utilities

[Fundamental]

[Technical]

70 changes: 0 additions & 70 deletions openbb_terminal/stocks/screener/ark_model.py

This file was deleted.

Loading

0 comments on commit 8b30f1a

Please sign in to comment.