From c67ef382a8ced21245017547aff9444ec95e20a5 Mon Sep 17 00:00:00 2001 From: didier Date: Fri, 2 Apr 2021 18:51:35 +0100 Subject: [PATCH 1/4] Add easter features to roadmap --- ROADMAP.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 2e5d09a67e3..392ed973eb7 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,6 +18,7 @@ * [Options](#Options) * [Credit Analysis](#Credit-Analysis) * [Cryptocurrencies](#Cryptocurrencies) +* [Screener](#Screener) ## Additional @@ -34,10 +35,11 @@ * [x] Top Losers (@didier) - [PR #171](https://github.com/DidierRLopes/GamestonkTerminal/pull/171) * [x] ARK orders (@aia) - [PR #140](https://github.com/DidierRLopes/GamestonkTerminal/pull/140) +* [ ] Add screener signals (e.g. top gainers, new highs, most volatile, oversold, major news, ...) from Finviz (@didier) ### Long term -* [ ] Add screeners (@didier) + --- @@ -133,6 +135,8 @@ * [x] Add multi-ticker historical data comparison (@didier) - [PR #141](https://github.com/DidierRLopes/GamestonkTerminal/pull/141) * [x] Add multi-ticker financials comparison (@didier) - [PR #237](https://github.com/DidierRLopes/GamestonkTerminal/pull/237) * [x] Add multi-ticker sentiment comparison (@didier) - [PR #250](https://github.com/DidierRLopes/GamestonkTerminal/pull/250) +* [ ] Get similar companies from Finviz based on Industry and Sector (and possibly country) from Finviz (@didier) +* [ ] Perform quick screening across similar companies based on key metrics (overview, performance, financial, valuation) from Finviz (@didier) ### Long term @@ -224,6 +228,19 @@ --- +## Screener + +### Short term + +* [ ] Add Screener menu with overview, valuation, financial, ownership, performance, technical commands based on filter presets from Finviz (@didier) +* [ ] Add README with explanation of how presets are stored and can be added by experienced users. (@didier) +* [ ] Analyse sectors performance, overview and valuation from Finviz (@didier) +* [ ] Analyse industry performance, overview and valuation from Finviz (@didier) + +### Long term + +--- + ## Backend ### Short term From cf029cfae2b1dc6807715919fc8b9e35e1d2c42a Mon Sep 17 00:00:00 2001 From: Artem Veremey Date: Fri, 2 Apr 2021 21:51:06 -0700 Subject: [PATCH 2/4] Adding Fred unit test --- tests/test_fred_fred_view.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/test_fred_fred_view.py diff --git a/tests/test_fred_fred_view.py b/tests/test_fred_fred_view.py new file mode 100644 index 00000000000..96b97919c1b --- /dev/null +++ b/tests/test_fred_fred_view.py @@ -0,0 +1,30 @@ +""" fred/fred_view.py tests """ +import unittest +from unittest import mock +from io import StringIO +import pandas as pd + +# pylint: disable=unused-import +from gamestonk_terminal.fred.fred_view import get_fred_data # noqa: F401 + +fred_data_mock = """ +,GDP +2019-01-01,21115.309 +2019-04-01,21329.877 +2019-07-01,21540.325 +2019-10-01,21747.394 +2020-01-01,21561.139 +2020-04-01,19520.114 +2020-07-01,21170.252 +2020-10-01,21494.731 +""" + + +class TestFredFredView(unittest.TestCase): + @mock.patch("gamestonk_terminal.fred.fred_view.Fred.get_series") + def test_get_fred_data(self, mock_get_series): + fred_data = pd.read_csv(StringIO(fred_data_mock), header=0, index_col=0) + + mock_get_series.return_value = fred_data + + get_fred_data(["--noplot"], "gdp") From 3ff885b46f7399bf414924ad63613a9196debee5 Mon Sep 17 00:00:00 2001 From: Ryan Massoth Date: Sat, 3 Apr 2021 18:27:02 -0400 Subject: [PATCH 3/4] Added catch-all exception for popular_tickers method of reddit view. Program crashes if your Reddit password is incorrect and you use popular function of behavioral analysis. --- gamestonk_terminal/behavioural_analysis/reddit_view.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gamestonk_terminal/behavioural_analysis/reddit_view.py b/gamestonk_terminal/behavioural_analysis/reddit_view.py index f77655181f8..d72e6df0391 100644 --- a/gamestonk_terminal/behavioural_analysis/reddit_view.py +++ b/gamestonk_terminal/behavioural_analysis/reddit_view.py @@ -1,7 +1,7 @@ import argparse import warnings import pandas as pd -from prawcore.exceptions import ResponseException +from prawcore.exceptions import ResponseException, OAuthException from requests import HTTPError from psaw import PushshiftAPI import praw @@ -359,6 +359,9 @@ def popular_tickers(l_args): ) return + except Exception as e: + print(e, "\n") + def spac_community(l_args): parser = argparse.ArgumentParser( From 0c1b6d0457b25a7e831437579f46e3d975753805 Mon Sep 17 00:00:00 2001 From: Ryan Massoth Date: Sat, 3 Apr 2021 18:34:16 -0400 Subject: [PATCH 4/4] Removed unused import for OAuthException. Used catch-all instead. --- gamestonk_terminal/behavioural_analysis/reddit_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamestonk_terminal/behavioural_analysis/reddit_view.py b/gamestonk_terminal/behavioural_analysis/reddit_view.py index d72e6df0391..fdf6b1396d1 100644 --- a/gamestonk_terminal/behavioural_analysis/reddit_view.py +++ b/gamestonk_terminal/behavioural_analysis/reddit_view.py @@ -1,7 +1,7 @@ import argparse import warnings import pandas as pd -from prawcore.exceptions import ResponseException, OAuthException +from prawcore.exceptions import ResponseException from requests import HTTPError from psaw import PushshiftAPI import praw