From 2016e678195279f0596c6ff001bbe6b96aaed59c Mon Sep 17 00:00:00 2001 From: didier Date: Tue, 6 Apr 2021 00:22:29 +0100 Subject: [PATCH 1/9] Add sector/industry/country valuation/performance/sector --- .../discovery/disc_controller.py | 120 +++++++++++++++--- gamestonk_terminal/discovery/finviz_view.py | 84 ++++++++++++ poetry.lock | 70 +++++----- pyproject.toml | 1 + 4 files changed, 221 insertions(+), 54 deletions(-) diff --git a/gamestonk_terminal/discovery/disc_controller.py b/gamestonk_terminal/discovery/disc_controller.py index a8c44d739e0..f61c283f361 100644 --- a/gamestonk_terminal/discovery/disc_controller.py +++ b/gamestonk_terminal/discovery/disc_controller.py @@ -2,9 +2,9 @@ __docformat__ = "numpy" import argparse +import os from typing import List from prompt_toolkit.completion import NestedCompleter - from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.helper_funcs import get_flair from gamestonk_terminal.menu import session @@ -31,7 +31,7 @@ class DiscoveryController: "q", "quit", "map", - "sectors", + "rtp_sectors", "gainers", "losers", "orders", @@ -42,10 +42,22 @@ class DiscoveryController: "simply_wallst", "spachero", "uwhales", + "sector_valuation", + "sector_performance", + "sector_spectrum", + "industry_valuation", + "industry_performance", + "industry_spectrum", + "country_valuation", + "country_performance", + "country_spectrum", ] def __init__(self): """Constructor""" + self.delete_sector_spectrum = False + self.delete_industry_spectrum = False + self.delete_country_spectrum = False self.disc_parser = argparse.ArgumentParser(add_help=False, prog="disc") self.disc_parser.add_argument( "cmd", @@ -57,26 +69,39 @@ class DiscoveryController: """ Print help """ print("\nDiscovery Mode:") - print(" help show this discovery menu again") - print(" q quit this menu, and shows back to main menu") - print(" quit quit to abandon program") + print(" help show this discovery menu again") + print(" q quit this menu, and shows back to main menu") + print(" quit quit to abandon program") print("") - print(" map S&P500 index stocks map [Finviz]") - print(" sectors show sectors performance [Alpha Vantage]") - print(" gainers show latest top gainers [Yahoo Finance]") - print(" losers show latest top losers [Yahoo Finance]") - print(" orders orders by Fidelity Customers [Fidelity]") - print(" ark_orders orders by ARK Investment Management LLC") - print(" up_earnings upcoming earnings release dates [Seeking Alpha]") + print(" map S&P500 index stocks map [Finviz]") + print(" rtp_sectors real-time performance sectors [Alpha Vantage]") + print(" gainers show latest top gainers [Yahoo Finance]") + print(" losers show latest top losers [Yahoo Finance]") + print(" orders orders by Fidelity Customers [Fidelity]") print( - " high_short show top high short interest stocks of over 20% ratio [www.highshortinterest.com]" + " ark_orders orders by ARK Investment Management LLC [www.cathiesark.com]" + ) + print(" up_earnings upcoming earnings release dates [Seeking Alpha]") + print( + " high_short show top high short interest stocks of over 20% ratio [www.highshortinterest.com]" ) print( - " low_float show low float stocks under 10M shares float [www.lowfloat.com]" + " low_float show low float stocks under 10M shares float [www.lowfloat.com]" ) - print(" simply_wallst Simply Wall St. research data [Simply Wall St.]") - print(" spachero great website for SPACs research [SpacHero]") - print(" uwhales good website for SPACs research [UnusualWhales]") + print(" simply_wallst Simply Wall St. research data [Simply Wall St.]") + print(" spachero great website for SPACs research [SpacHero]") + print(" uwhales good website for SPACs research [UnusualWhales]") + print("") + print("Finviz:") + print(" sector_valuation sector valuation") + print(" sector_performance sector performance") + print(" sector_spectrum sector spectrum") + print(" industry_valuation industry valuation") + print(" industry_performance industry performance") + print(" industry_spectrum industry spectrum") + print(" country_valuation country valuation") + print(" country_performance country performance") + print(" country_spectrum country spectrum") print("") def switch(self, an_input: str): @@ -91,6 +116,18 @@ class DiscoveryController: """ (known_args, other_args) = self.disc_parser.parse_known_args(an_input.split()) + # Due to Finviz implementation of Spectrum, we delete the generated spectrum figure + # after saving it and displaying it to the user + if self.delete_sector_spectrum: + os.remove("Sector.jpg") + self.delete_sector_spectrum = False + elif self.delete_industry_spectrum: + os.remove("Industry.jpg") + self.delete_industry_spectrum = False + elif self.delete_country_spectrum: + os.remove("Country (U.S. listed stocks only).jpg") + self.delete_country_spectrum = False + return getattr( self, "call_" + known_args.cmd, lambda: "Command not recognized!" )(other_args) @@ -111,8 +148,8 @@ class DiscoveryController: """Process map command""" finviz_view.map_sp500_view(other_args) - def call_sectors(self, other_args: List[str]): - """Process sectors command""" + def call_rtp_sectors(self, other_args: List[str]): + """Process rtp_sectors command""" alpha_vantage_view.sectors_view(other_args) def call_gainers(self, other_args: List[str]): @@ -155,6 +192,51 @@ class DiscoveryController: """Process uwhales command""" unusual_whales_view.unusual_whales_view(other_args) + def call_sector_valuation(self, other_args: List[str]): + """Process sector_valuation command""" + finviz_view.view_group_data(other_args, "Sector", "valuation") + + def call_sector_performance(self, other_args: List[str]): + """Process sector_performance command""" + finviz_view.view_group_data(other_args, "Sector", "performance") + + def call_sector_spectrum(self, other_args: List[str]): + """Process sector_spectrum command""" + finviz_view.view_group_data(other_args, "Sector", "spectrum") + self.delete_sector_spectrum = True + + def call_industry_valuation(self, other_args: List[str]): + """Process industry_valuation command""" + finviz_view.view_group_data(other_args, "Industry", "valuation") + + def call_industry_performance(self, other_args: List[str]): + """Process industry_performance command""" + finviz_view.view_group_data(other_args, "Industry", "performance") + + def call_industry_spectrum(self, other_args: List[str]): + """Process industry_spectrum command""" + finviz_view.view_group_data(other_args, "Industry", "spectrum") + self.delete_industry_spectrum = True + + def call_country_valuation(self, other_args: List[str]): + """Process country_valuation command""" + finviz_view.view_group_data( + other_args, "Country (U.S. listed stocks only)", "valuation" + ) + + def call_country_performance(self, other_args: List[str]): + """Process country_performance command""" + finviz_view.view_group_data( + other_args, "Country (U.S. listed stocks only)", "performance" + ) + + def call_country_spectrum(self, other_args: List[str]): + """Process country_spectrum command""" + finviz_view.view_group_data( + other_args, "Country (U.S. listed stocks only)", "spectrum" + ) + self.delete_country_spectrum = True + def menu(): """Discovery Menu""" diff --git a/gamestonk_terminal/discovery/finviz_view.py b/gamestonk_terminal/discovery/finviz_view.py index 46715342ea2..736b0df939f 100644 --- a/gamestonk_terminal/discovery/finviz_view.py +++ b/gamestonk_terminal/discovery/finviz_view.py @@ -5,6 +5,8 @@ import argparse from typing import List import webbrowser from gamestonk_terminal.helper_funcs import parse_known_args_and_warn +from finvizfinance.group import valuation, performance, spectrum +from PIL import Image def map_sp500_view(other_args: List[str]): @@ -58,3 +60,85 @@ def map_sp500_view(other_args: List[str]): f"https://finviz.com/map.ashx?t={d_type[ns_parser.s_type]}&st={d_period[ns_parser.s_period]}" ) print("") + + +def get_valuation_performance_data(group: str, data_type: str): + """Get group (sectors, industry or country) valuation/performance data + + Parameters + ---------- + other_args : List[str] + argparse other args + group : str + select group to see data between sectors, industry or country + data_type : str + select data type to see data between valuation or performance + + Returns + ---------- + pd.DataFrame + dataframe with valuation/performance data + """ + if data_type == "valuation": + df_group = valuation.Valuation().ScreenerView(group=group) + elif data_type == "performance": + df_group = performance.Performance().ScreenerView(group=group) + + return df_group + + +def get_spectrum_data(group: str): + """Get group (sectors, industry or country) valuation/performance data + + Parameters + ---------- + other_args : List[str] + argparse other args + group : str + select group to see data between sectors, industry or country + data_type : str + select data type to see data between valuation or performance + """ + spectrum.Spectrum().ScreenerView(group=group) + + +def view_group_data(other_args: List[str], group: str, data_type: str): + """View group (sectors, industry or country) valuation/performance/spectrum data + + Parameters + ---------- + other_args : List[str] + argparse other args + group : str + select group to see data between sectors, industry and country + data_type : str + select data type to see data between valuation, performance and spectrum + """ + parser = argparse.ArgumentParser( + add_help=False, + prog="group_data", + description=""" + View group (sectors, industry or country) valuation/performance/spectrum data. [Source: Finviz] + """, + ) + ns_parser = parse_known_args_and_warn(parser, other_args) + if not ns_parser: + return + + if data_type == "valuation": + df_group = get_valuation_performance_data(group, "valuation") + print(df_group.to_string()) + + elif data_type == "performance": + df_group = get_valuation_performance_data(group, "performance") + print(df_group.to_string()) + + elif data_type == "spectrum": + get_spectrum_data(group) + + img = Image.open(group + ".jpg") + img.show() + else: + print("Invalid data type. Choose between valuation, performance and spectrum.") + + print("") diff --git a/poetry.lock b/poetry.lock index 14b1fc7fb7c..b20746d369b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1631,7 +1631,7 @@ python-versions = "*" [[package]] name = "pillow" -version = "8.1.2" +version = "8.2.0" description = "Python Imaging Library (Fork)" category = "main" optional = false @@ -2837,7 +2837,7 @@ prediction = ["fbprophet", "tensorflow", "pmdarima", "transformers", "flair", "t [metadata] lock-version = "1.1" python-versions = "^3.6.8" -content-hash = "d07d8303b9772ad67003224f0a4372bf91bf1685c7e0393eb4cc58757065324f" +content-hash = "144771641ef753b1e937c0db16496c409905f6f692ef81a03d9ba716d9207bb0" [metadata.files] absl-py = [ @@ -3874,39 +3874,39 @@ pickleshare = [ {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"}, ] pillow = [ - {file = "Pillow-8.1.2-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:5cf03b9534aca63b192856aa601c68d0764810857786ea5da652581f3a44c2b0"}, - {file = "Pillow-8.1.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:f91b50ad88048d795c0ad004abbe1390aa1882073b1dca10bfd55d0b8cf18ec5"}, - {file = "Pillow-8.1.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5762ebb4436f46b566fc6351d67a9b5386b5e5de4e58fdaa18a1c83e0e20f1a8"}, - {file = "Pillow-8.1.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:e2cd8ac157c1e5ae88b6dd790648ee5d2777e76f1e5c7d184eaddb2938594f34"}, - {file = "Pillow-8.1.2-cp36-cp36m-win32.whl", hash = "sha256:72027ebf682abc9bafd93b43edc44279f641e8996fb2945104471419113cfc71"}, - {file = "Pillow-8.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:d1d6bca39bb6dd94fba23cdb3eeaea5e30c7717c5343004d900e2a63b132c341"}, - {file = "Pillow-8.1.2-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:90882c6f084ef68b71bba190209a734bf90abb82ab5e8f64444c71d5974008c6"}, - {file = "Pillow-8.1.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:89e4c757a91b8c55d97c91fa09c69b3677c227b942fa749e9a66eef602f59c28"}, - {file = "Pillow-8.1.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:8c4e32218c764bc27fe49b7328195579581aa419920edcc321c4cb877c65258d"}, - {file = "Pillow-8.1.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:a01da2c266d9868c4f91a9c6faf47a251f23b9a862dce81d2ff583135206f5be"}, - {file = "Pillow-8.1.2-cp37-cp37m-win32.whl", hash = "sha256:30d33a1a6400132e6f521640dd3f64578ac9bfb79a619416d7e8802b4ce1dd55"}, - {file = "Pillow-8.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:71b01ee69e7df527439d7752a2ce8fb89e19a32df484a308eca3e81f673d3a03"}, - {file = "Pillow-8.1.2-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:5a2d957eb4aba9d48170b8fe6538ec1fbc2119ffe6373782c03d8acad3323f2e"}, - {file = "Pillow-8.1.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:87f42c976f91ca2fc21a3293e25bd3cd895918597db1b95b93cbd949f7d019ce"}, - {file = "Pillow-8.1.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:15306d71a1e96d7e271fd2a0737038b5a92ca2978d2e38b6ced7966583e3d5af"}, - {file = "Pillow-8.1.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:71f31ee4df3d5e0b366dd362007740106d3210fb6a56ec4b581a5324ba254f06"}, - {file = "Pillow-8.1.2-cp38-cp38-win32.whl", hash = "sha256:98afcac3205d31ab6a10c5006b0cf040d0026a68ec051edd3517b776c1d78b09"}, - {file = "Pillow-8.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:328240f7dddf77783e72d5ed79899a6b48bc6681f8d1f6001f55933cb4905060"}, - {file = "Pillow-8.1.2-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:bead24c0ae3f1f6afcb915a057943ccf65fc755d11a1410a909c1fefb6c06ad1"}, - {file = "Pillow-8.1.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:81b3716cc9744ffdf76b39afb6247eae754186838cedad0b0ac63b2571253fe6"}, - {file = "Pillow-8.1.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:63cd413ac52ee3f67057223d363f4f82ce966e64906aea046daf46695e3c8238"}, - {file = "Pillow-8.1.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:8565355a29655b28fdc2c666fd9a3890fe5edc6639d128814fafecfae2d70910"}, - {file = "Pillow-8.1.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:1940fc4d361f9cc7e558d6f56ff38d7351b53052fd7911f4b60cd7bc091ea3b1"}, - {file = "Pillow-8.1.2-cp39-cp39-win32.whl", hash = "sha256:46c2bcf8e1e75d154e78417b3e3c64e96def738c2a25435e74909e127a8cba5e"}, - {file = "Pillow-8.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:aeab4cd016e11e7aa5cfc49dcff8e51561fa64818a0be86efa82c7038e9369d0"}, - {file = "Pillow-8.1.2-pp36-pypy36_pp73-macosx_10_10_x86_64.whl", hash = "sha256:74cd9aa648ed6dd25e572453eb09b08817a1e3d9f8d1bd4d8403d99e42ea790b"}, - {file = "Pillow-8.1.2-pp36-pypy36_pp73-manylinux2010_i686.whl", hash = "sha256:e5739ae63636a52b706a0facec77b2b58e485637e1638202556156e424a02dc2"}, - {file = "Pillow-8.1.2-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:903293320efe2466c1ab3509a33d6b866dc850cfd0c5d9cc92632014cec185fb"}, - {file = "Pillow-8.1.2-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:5daba2b40782c1c5157a788ec4454067c6616f5a0c1b70e26ac326a880c2d328"}, - {file = "Pillow-8.1.2-pp37-pypy37_pp73-manylinux2010_i686.whl", hash = "sha256:1f93f2fe211f1ef75e6f589327f4d4f8545d5c8e826231b042b483d8383e8a7c"}, - {file = "Pillow-8.1.2-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:6efac40344d8f668b6c4533ae02a48d52fd852ef0654cc6f19f6ac146399c733"}, - {file = "Pillow-8.1.2-pp37-pypy37_pp73-win32.whl", hash = "sha256:f36c3ff63d6fc509ce599a2f5b0d0732189eed653420e7294c039d342c6e204a"}, - {file = "Pillow-8.1.2.tar.gz", hash = "sha256:b07c660e014852d98a00a91adfbe25033898a9d90a8f39beb2437d22a203fc44"}, + {file = "Pillow-8.2.0-cp36-cp36m-macosx_10_10_x86_64.whl", hash = "sha256:dc38f57d8f20f06dd7c3161c59ca2c86893632623f33a42d592f097b00f720a9"}, + {file = "Pillow-8.2.0-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:a013cbe25d20c2e0c4e85a9daf438f85121a4d0344ddc76e33fd7e3965d9af4b"}, + {file = "Pillow-8.2.0-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:8bb1e155a74e1bfbacd84555ea62fa21c58e0b4e7e6b20e4447b8d07990ac78b"}, + {file = "Pillow-8.2.0-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c5236606e8570542ed424849f7852a0ff0bce2c4c8d0ba05cc202a5a9c97dee9"}, + {file = "Pillow-8.2.0-cp36-cp36m-win32.whl", hash = "sha256:12e5e7471f9b637762453da74e390e56cc43e486a88289995c1f4c1dc0bfe727"}, + {file = "Pillow-8.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:5afe6b237a0b81bd54b53f835a153770802f164c5570bab5e005aad693dab87f"}, + {file = "Pillow-8.2.0-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:cb7a09e173903541fa888ba010c345893cd9fc1b5891aaf060f6ca77b6a3722d"}, + {file = "Pillow-8.2.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0d19d70ee7c2ba97631bae1e7d4725cdb2ecf238178096e8c82ee481e189168a"}, + {file = "Pillow-8.2.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:083781abd261bdabf090ad07bb69f8f5599943ddb539d64497ed021b2a67e5a9"}, + {file = "Pillow-8.2.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:c6b39294464b03457f9064e98c124e09008b35a62e3189d3513e5148611c9388"}, + {file = "Pillow-8.2.0-cp37-cp37m-win32.whl", hash = "sha256:01425106e4e8cee195a411f729cff2a7d61813b0b11737c12bd5991f5f14bcd5"}, + {file = "Pillow-8.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:3b570f84a6161cf8865c4e08adf629441f56e32f180f7aa4ccbd2e0a5a02cba2"}, + {file = "Pillow-8.2.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:031a6c88c77d08aab84fecc05c3cde8414cd6f8406f4d2b16fed1e97634cc8a4"}, + {file = "Pillow-8.2.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:66cc56579fd91f517290ab02c51e3a80f581aba45fd924fcdee01fa06e635812"}, + {file = "Pillow-8.2.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c32cc3145928c4305d142ebec682419a6c0a8ce9e33db900027ddca1ec39178"}, + {file = "Pillow-8.2.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:624b977355cde8b065f6d51b98497d6cd5fbdd4f36405f7a8790e3376125e2bb"}, + {file = "Pillow-8.2.0-cp38-cp38-win32.whl", hash = "sha256:5cbf3e3b1014dddc45496e8cf38b9f099c95a326275885199f427825c6522232"}, + {file = "Pillow-8.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:463822e2f0d81459e113372a168f2ff59723e78528f91f0bd25680ac185cf797"}, + {file = "Pillow-8.2.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:95d5ef984eff897850f3a83883363da64aae1000e79cb3c321915468e8c6add5"}, + {file = "Pillow-8.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b91c36492a4bbb1ee855b7d16fe51379e5f96b85692dc8210831fbb24c43e484"}, + {file = "Pillow-8.2.0-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d68cb92c408261f806b15923834203f024110a2e2872ecb0bd2a110f89d3c602"}, + {file = "Pillow-8.2.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f217c3954ce5fd88303fc0c317af55d5e0204106d86dea17eb8205700d47dec2"}, + {file = "Pillow-8.2.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:5b70110acb39f3aff6b74cf09bb4169b167e2660dabc304c1e25b6555fa781ef"}, + {file = "Pillow-8.2.0-cp39-cp39-win32.whl", hash = "sha256:a7d5e9fad90eff8f6f6106d3b98b553a88b6f976e51fce287192a5d2d5363713"}, + {file = "Pillow-8.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:238c197fc275b475e87c1453b05b467d2d02c2915fdfdd4af126145ff2e4610c"}, + {file = "Pillow-8.2.0-pp36-pypy36_pp73-macosx_10_10_x86_64.whl", hash = "sha256:0e04d61f0064b545b989126197930807c86bcbd4534d39168f4aa5fda39bb8f9"}, + {file = "Pillow-8.2.0-pp36-pypy36_pp73-manylinux2010_i686.whl", hash = "sha256:63728564c1410d99e6d1ae8e3b810fe012bc440952168af0a2877e8ff5ab96b9"}, + {file = "Pillow-8.2.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:c03c07ed32c5324939b19e36ae5f75c660c81461e312a41aea30acdd46f93a7c"}, + {file = "Pillow-8.2.0-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:4d98abdd6b1e3bf1a1cbb14c3895226816e666749ac040c4e2554231068c639b"}, + {file = "Pillow-8.2.0-pp37-pypy37_pp73-manylinux2010_i686.whl", hash = "sha256:aac00e4bc94d1b7813fe882c28990c1bc2f9d0e1aa765a5f2b516e8a6a16a9e4"}, + {file = "Pillow-8.2.0-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:22fd0f42ad15dfdde6c581347eaa4adb9a6fc4b865f90b23378aa7914895e120"}, + {file = "Pillow-8.2.0-pp37-pypy37_pp73-win32.whl", hash = "sha256:e98eca29a05913e82177b3ba3d198b1728e164869c613d76d0de4bde6768a50e"}, + {file = "Pillow-8.2.0.tar.gz", hash = "sha256:a787ab10d7bb5494e5f76536ac460741788f1fbce851068d73a87ca7c35fc3e1"}, ] plotly = [ {file = "plotly-4.14.3-py2.py3-none-any.whl", hash = "sha256:d68fc15fcb49f88db27ab3e0c87110943e65fee02a47f33a8590f541b3042461"}, diff --git a/pyproject.toml b/pyproject.toml index ba84a278c34..5895d2c9dd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ pycoingecko = "^1.4.0" detecta = "^0.0.5" tradingview-ta = "^3.2.3" finvizfinance = "^0.9.3" +Pillow = "^8.2.0" [tool.poetry.dev-dependencies] pytest = "^6.2.2" From 2d79ffb6ff57963292e40592aace4b3b0743a531 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 6 Apr 2021 00:28:24 +0100 Subject: [PATCH 2/9] Add new commands to discovery --- gamestonk_terminal/discovery/README.md | 68 ++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gamestonk_terminal/discovery/README.md b/gamestonk_terminal/discovery/README.md index 203a8a51e80..772f81d8996 100644 --- a/gamestonk_terminal/discovery/README.md +++ b/gamestonk_terminal/discovery/README.md @@ -27,6 +27,18 @@ This menu aims to discover new stocks, and the usage of the following commands a * [uwhales](#uwhales) * good website for SPACs research [UnusualWhales] +Finviz: +* [sector_valuation](#sector_valuation) +* [sector_performance](#sector_performance) +* [sector_spectrum](#sector_spectrum) +* [industry_valuation](#industry_valuation) +* [industry_performance](#industry_performance) +* [industry_spectrum](#industry_spectrum) +* [country_valuation](#country_valuation) +* [country_performance](#country_performance) +* [country_spectrum](#country_spectrum) + + ## map ```shell @@ -167,3 +179,59 @@ usage: uwhales Good website for SPACs research. [Source: www.unusualwhales.com] Captura de ecrã 2021-02-20, às 11 38 54 + + +## sector_valuation + +```shell +usage: sector_valuation +``` + +## sector_performance + +```shell +usage: sector_performance +``` + +## sector_spectrum + +```shell +usage: sector_spectrum +``` + +## industry_valuation + +```shell +usage: industry_valuation +``` + +## industry_performance + +```shell +usage: industry_performance +``` + +## industry_spectrum + +```shell +usage: industry_spectrum +``` + +## country_valuation + +```shell +usage: country_valuation +``` + +## country_performance + +```shell +usage: country_performance +``` + +## country_spectrum + +```shell +usage: country_spectrum +``` + From 690a3bba3284655e9a264711a9b75f2a3d3868cb Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 6 Apr 2021 00:40:44 +0100 Subject: [PATCH 3/9] Add new discovery readme commands --- gamestonk_terminal/discovery/README.md | 28 ++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/gamestonk_terminal/discovery/README.md b/gamestonk_terminal/discovery/README.md index 772f81d8996..924e372ec32 100644 --- a/gamestonk_terminal/discovery/README.md +++ b/gamestonk_terminal/discovery/README.md @@ -4,8 +4,8 @@ This menu aims to discover new stocks, and the usage of the following commands a * [map](#map) * S&P500 index stocks map [Finviz] -* [sectors](#sectors) - * show sectors performance [Alpha Vantage] +* [rtp_sectors](#rtp_sectors) + * real-time performance sectors [Alpha Vantage] * [gainers](#gainers) * show latest top gainers [Yahoo Finance] * [losers](#losers) @@ -52,10 +52,10 @@ Performance index stocks map categorized by sectors and industries. Size represe ![map_filter](https://user-images.githubusercontent.com/25267873/108570986-032a4800-7307-11eb-8c8d-f62409c11e06.png) -## sectors +## rtp_sectors ```shell -usage: sectors +usage: rtp_sectors ``` Real-time and historical sector performances calculated from S&P500 incumbents. Pops plot in terminal. [Source: Alpha Vantage] @@ -187,35 +187,47 @@ Good website for SPACs research. [Source: www.unusualwhales.com] usage: sector_valuation ``` +sec_val + ## sector_performance ```shell usage: sector_performance ``` +sec_per + ## sector_spectrum ```shell usage: sector_spectrum ``` +![sec_spec](https://user-images.githubusercontent.com/25267873/113639073-4ac72200-9670-11eb-871d-becfe0efb718.png) + ## industry_valuation ```shell usage: industry_valuation ``` +ind_val + ## industry_performance ```shell usage: industry_performance ``` +ind_per + ## industry_spectrum ```shell usage: industry_spectrum ``` + +ind_spec ## country_valuation @@ -223,15 +235,23 @@ usage: industry_spectrum usage: country_valuation ``` +coun_val + ## country_performance ```shell usage: country_performance ``` +cou_per + ## country_spectrum ```shell usage: country_spectrum ``` +![country_spectrum](https://user-images.githubusercontent.com/25267873/113639067-48fd5e80-9670-11eb-95cf-0931845ddd12.png) + + + From 02b61d4ca3fabef0369b60e388869a38137f0170 Mon Sep 17 00:00:00 2001 From: didier Date: Tue, 6 Apr 2021 00:53:03 +0100 Subject: [PATCH 4/9] Abbreviate finviz discovery cmds because lazy --- .../discovery/disc_controller.py | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/gamestonk_terminal/discovery/disc_controller.py b/gamestonk_terminal/discovery/disc_controller.py index f61c283f361..8632175bfea 100644 --- a/gamestonk_terminal/discovery/disc_controller.py +++ b/gamestonk_terminal/discovery/disc_controller.py @@ -42,15 +42,15 @@ class DiscoveryController: "simply_wallst", "spachero", "uwhales", - "sector_valuation", - "sector_performance", - "sector_spectrum", - "industry_valuation", - "industry_performance", - "industry_spectrum", - "country_valuation", - "country_performance", - "country_spectrum", + "sec_val", + "sec_perf", + "sec_spec", + "ind_val", + "ind_perf", + "ind_spec", + "cntry_val", + "cntry_perf", + "cntry_spec", ] def __init__(self): @@ -69,39 +69,39 @@ class DiscoveryController: """ Print help """ print("\nDiscovery Mode:") - print(" help show this discovery menu again") - print(" q quit this menu, and shows back to main menu") - print(" quit quit to abandon program") + print(" help show this discovery menu again") + print(" q quit this menu, and shows back to main menu") + print(" quit quit to abandon program") print("") - print(" map S&P500 index stocks map [Finviz]") - print(" rtp_sectors real-time performance sectors [Alpha Vantage]") - print(" gainers show latest top gainers [Yahoo Finance]") - print(" losers show latest top losers [Yahoo Finance]") - print(" orders orders by Fidelity Customers [Fidelity]") + print(" map S&P500 index stocks map [Finviz]") + print(" rtp_sectors real-time performance sectors [Alpha Vantage]") + print(" gainers show latest top gainers [Yahoo Finance]") + print(" losers show latest top losers [Yahoo Finance]") + print(" orders orders by Fidelity Customers [Fidelity]") print( - " ark_orders orders by ARK Investment Management LLC [www.cathiesark.com]" + " ark_orders orders by ARK Investment Management LLC [www.cathiesark.com]" ) - print(" up_earnings upcoming earnings release dates [Seeking Alpha]") + print(" up_earnings upcoming earnings release dates [Seeking Alpha]") print( - " high_short show top high short interest stocks of over 20% ratio [www.highshortinterest.com]" + " high_short show top high short interest stocks of over 20% ratio [www.highshortinterest.com]" ) print( - " low_float show low float stocks under 10M shares float [www.lowfloat.com]" + " low_float show low float stocks under 10M shares float [www.lowfloat.com]" ) - print(" simply_wallst Simply Wall St. research data [Simply Wall St.]") - print(" spachero great website for SPACs research [SpacHero]") - print(" uwhales good website for SPACs research [UnusualWhales]") + print(" simply_wallst Simply Wall St. research data [Simply Wall St.]") + print(" spachero great website for SPACs research [SpacHero]") + print(" uwhales good website for SPACs research [UnusualWhales]") print("") print("Finviz:") - print(" sector_valuation sector valuation") - print(" sector_performance sector performance") - print(" sector_spectrum sector spectrum") - print(" industry_valuation industry valuation") - print(" industry_performance industry performance") - print(" industry_spectrum industry spectrum") - print(" country_valuation country valuation") - print(" country_performance country performance") - print(" country_spectrum country spectrum") + print(" sec_val sector valuation") + print(" sec_perf sector performance") + print(" sec_spec sector spectrum") + print(" ind_val industry valuation") + print(" ind_perf industry performance") + print(" ind_spec industry spectrum") + print(" cntry_val country valuation") + print(" cntry_perf country performance") + print(" cntry_spec country spectrum") print("") def switch(self, an_input: str): @@ -192,46 +192,46 @@ class DiscoveryController: """Process uwhales command""" unusual_whales_view.unusual_whales_view(other_args) - def call_sector_valuation(self, other_args: List[str]): - """Process sector_valuation command""" + def call_sec_val(self, other_args: List[str]): + """Process sec_val command""" finviz_view.view_group_data(other_args, "Sector", "valuation") - def call_sector_performance(self, other_args: List[str]): - """Process sector_performance command""" + def call_sec_perf(self, other_args: List[str]): + """Process sec_perf command""" finviz_view.view_group_data(other_args, "Sector", "performance") - def call_sector_spectrum(self, other_args: List[str]): - """Process sector_spectrum command""" + def call_sec_spec(self, other_args: List[str]): + """Process sec_spec command""" finviz_view.view_group_data(other_args, "Sector", "spectrum") self.delete_sector_spectrum = True - def call_industry_valuation(self, other_args: List[str]): - """Process industry_valuation command""" + def call_ind_val(self, other_args: List[str]): + """Process ind_val command""" finviz_view.view_group_data(other_args, "Industry", "valuation") - def call_industry_performance(self, other_args: List[str]): - """Process industry_performance command""" + def call_ind_perf(self, other_args: List[str]): + """Process ind_perf command""" finviz_view.view_group_data(other_args, "Industry", "performance") - def call_industry_spectrum(self, other_args: List[str]): - """Process industry_spectrum command""" + def call_ind_spec(self, other_args: List[str]): + """Process ind_spec command""" finviz_view.view_group_data(other_args, "Industry", "spectrum") self.delete_industry_spectrum = True - def call_country_valuation(self, other_args: List[str]): - """Process country_valuation command""" + def call_cntry_val(self, other_args: List[str]): + """Process cntry_val command""" finviz_view.view_group_data( other_args, "Country (U.S. listed stocks only)", "valuation" ) - def call_country_performance(self, other_args: List[str]): - """Process country_performance command""" + def call_cntry_perf(self, other_args: List[str]): + """Process cntry_perf command""" finviz_view.view_group_data( other_args, "Country (U.S. listed stocks only)", "performance" ) - def call_country_spectrum(self, other_args: List[str]): - """Process country_spectrum command""" + def call_cntry_spec(self, other_args: List[str]): + """Process cntry_spec command""" finviz_view.view_group_data( other_args, "Country (U.S. listed stocks only)", "spectrum" ) From a5be9a1d582c1153edde4e3f7d5d2eaed27fb38b Mon Sep 17 00:00:00 2001 From: didier Date: Tue, 6 Apr 2021 00:59:05 +0100 Subject: [PATCH 5/9] Fix README with abbreviated commands --- gamestonk_terminal/discovery/README.md | 77 +++++++++++++++----------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/gamestonk_terminal/discovery/README.md b/gamestonk_terminal/discovery/README.md index 924e372ec32..d0976053138 100644 --- a/gamestonk_terminal/discovery/README.md +++ b/gamestonk_terminal/discovery/README.md @@ -28,15 +28,15 @@ This menu aims to discover new stocks, and the usage of the following commands a * good website for SPACs research [UnusualWhales] Finviz: -* [sector_valuation](#sector_valuation) -* [sector_performance](#sector_performance) -* [sector_spectrum](#sector_spectrum) -* [industry_valuation](#industry_valuation) -* [industry_performance](#industry_performance) -* [industry_spectrum](#industry_spectrum) -* [country_valuation](#country_valuation) -* [country_performance](#country_performance) -* [country_spectrum](#country_spectrum) +* [sec_val](#sec_val) +* [sec_perf](#sec_perf) +* [sec_spec](#sec_spec) +* [ind_val](#ind_val) +* [ind_perf](#ind_perf) +* [ind_spec](#ind_spec) +* [cntry_val](#cntry_val) +* [cntry_perf](#cntry_perf) +* [cntry_spec](#cntry_spec) ## map @@ -181,77 +181,92 @@ Good website for SPACs research. [Source: www.unusualwhales.com] Captura de ecrã 2021-02-20, às 11 38 54 -## sector_valuation +## sec_val ```shell -usage: sector_valuation +usage: sec_val ``` +Sector valuation. [Source: Finviz] + sec_val -## sector_performance +## sec_perf ```shell -usage: sector_performance +usage: sec_perf ``` +Sector performance. [Source: Finviz] + sec_per -## sector_spectrum +## sec_spec ```shell -usage: sector_spectrum +usage: sec_spec ``` +Sector spectrum. [Source: Finviz] + ![sec_spec](https://user-images.githubusercontent.com/25267873/113639073-4ac72200-9670-11eb-871d-becfe0efb718.png) -## industry_valuation +## ind_val ```shell -usage: industry_valuation +usage: ind_val ``` +Industry valuation. [Source: Finviz] + ind_val -## industry_performance +## ind_perf ```shell -usage: industry_performance +usage: ind_perf ``` +Industry performance. [Source: Finviz] + ind_per -## industry_spectrum +## ind_spec ```shell -usage: industry_spectrum +usage: ind_spec ``` +Industry spectrum. [Source: Finviz] + ind_spec - -## country_valuation + +## cntry_val ```shell -usage: country_valuation +usage: cntry_val ``` +Country valuation. [Source: Finviz] + coun_val -## country_performance +## cntry_perf ```shell -usage: country_performance +usage: cntry_perf ``` +Country performance. [Source: Finviz] + cou_per -## country_spectrum +## cntry_spec ```shell -usage: country_spectrum +usage: cntry_spec ``` -![country_spectrum](https://user-images.githubusercontent.com/25267873/113639067-48fd5e80-9670-11eb-95cf-0931845ddd12.png) - - +Country spectrum. [Source: Finviz] +![cntry_spec](https://user-images.githubusercontent.com/25267873/113639067-48fd5e80-9670-11eb-95cf-0931845ddd12.png) From dd06340ac6eacb50adf458edad344cd8dded2098 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 6 Apr 2021 01:01:32 +0100 Subject: [PATCH 6/9] Update ROADMAP.md --- ROADMAP.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index ac1999baf06..1e76964f59f 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -32,9 +32,10 @@ ## Discovery * [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) +* [x] Analyse sectors/industry performance, overview and valuation from Finviz (@didier) - [PR #315](https://github.com/DidierRLopes/GamestonkTerminal/pull/315) **NEXT** -* [ ] Analyse sectors/industry performance, overview and valuation from Finviz (@didier) + --- From a20f101eeefbe4d0d9b43c01c9f42ebc2b53835a Mon Sep 17 00:00:00 2001 From: didier Date: Tue, 6 Apr 2021 02:39:47 +0100 Subject: [PATCH 7/9] Refactor disc commands to be more efficient --- .../discovery/disc_controller.py | 93 ++++--------------- gamestonk_terminal/discovery/finviz_view.py | 80 ++++++++++++---- 2 files changed, 81 insertions(+), 92 deletions(-) diff --git a/gamestonk_terminal/discovery/disc_controller.py b/gamestonk_terminal/discovery/disc_controller.py index 8632175bfea..a39f67e9d1f 100644 --- a/gamestonk_terminal/discovery/disc_controller.py +++ b/gamestonk_terminal/discovery/disc_controller.py @@ -42,22 +42,14 @@ class DiscoveryController: "simply_wallst", "spachero", "uwhales", - "sec_val", - "sec_perf", - "sec_spec", - "ind_val", - "ind_perf", - "ind_spec", - "cntry_val", - "cntry_perf", - "cntry_spec", + "valuation", + "performance", + "spectrum", ] def __init__(self): """Constructor""" - self.delete_sector_spectrum = False - self.delete_industry_spectrum = False - self.delete_country_spectrum = False + self.spectrum_img_to_delete = "" self.disc_parser = argparse.ArgumentParser(add_help=False, prog="disc") self.disc_parser.add_argument( "cmd", @@ -91,17 +83,9 @@ class DiscoveryController: print(" simply_wallst Simply Wall St. research data [Simply Wall St.]") print(" spachero great website for SPACs research [SpacHero]") print(" uwhales good website for SPACs research [UnusualWhales]") - print("") - print("Finviz:") - print(" sec_val sector valuation") - print(" sec_perf sector performance") - print(" sec_spec sector spectrum") - print(" ind_val industry valuation") - print(" ind_perf industry performance") - print(" ind_spec industry spectrum") - print(" cntry_val country valuation") - print(" cntry_perf country performance") - print(" cntry_spec country spectrum") + print(" valuation valuation of sectors, industry, country [Finviz]") + print(" performance performance of sectors, industry, country [Finviz]") + print(" spectrum spectrum of sectors, industry, country [Finviz]") print("") def switch(self, an_input: str): @@ -118,15 +102,9 @@ class DiscoveryController: # Due to Finviz implementation of Spectrum, we delete the generated spectrum figure # after saving it and displaying it to the user - if self.delete_sector_spectrum: - os.remove("Sector.jpg") - self.delete_sector_spectrum = False - elif self.delete_industry_spectrum: - os.remove("Industry.jpg") - self.delete_industry_spectrum = False - elif self.delete_country_spectrum: - os.remove("Country (U.S. listed stocks only).jpg") - self.delete_country_spectrum = False + if self.spectrum_img_to_delete: + os.remove(self.spectrum_img_to_delete + ".jpg") + self.spectrum_img_to_delete = "" return getattr( self, "call_" + known_args.cmd, lambda: "Command not recognized!" @@ -192,51 +170,20 @@ class DiscoveryController: """Process uwhales command""" unusual_whales_view.unusual_whales_view(other_args) - def call_sec_val(self, other_args: List[str]): - """Process sec_val command""" - finviz_view.view_group_data(other_args, "Sector", "valuation") + def call_valuation(self, other_args: List[str]): + """Process valuation command""" + finviz_view.view_group_data(other_args, "valuation") - def call_sec_perf(self, other_args: List[str]): - """Process sec_perf command""" - finviz_view.view_group_data(other_args, "Sector", "performance") + def call_performance(self, other_args: List[str]): + """Process performance command""" + finviz_view.view_group_data(other_args, "performance") - def call_sec_spec(self, other_args: List[str]): - """Process sec_spec command""" - finviz_view.view_group_data(other_args, "Sector", "spectrum") - self.delete_sector_spectrum = True - - def call_ind_val(self, other_args: List[str]): - """Process ind_val command""" - finviz_view.view_group_data(other_args, "Industry", "valuation") - - def call_ind_perf(self, other_args: List[str]): - """Process ind_perf command""" - finviz_view.view_group_data(other_args, "Industry", "performance") - - def call_ind_spec(self, other_args: List[str]): - """Process ind_spec command""" - finviz_view.view_group_data(other_args, "Industry", "spectrum") - self.delete_industry_spectrum = True - - def call_cntry_val(self, other_args: List[str]): - """Process cntry_val command""" - finviz_view.view_group_data( - other_args, "Country (U.S. listed stocks only)", "valuation" + def call_spectrum(self, other_args: List[str]): + """Process spectrum command""" + self.spectrum_img_to_delete = finviz_view.view_group_data( + other_args, "spectrum" ) - def call_cntry_perf(self, other_args: List[str]): - """Process cntry_perf command""" - finviz_view.view_group_data( - other_args, "Country (U.S. listed stocks only)", "performance" - ) - - def call_cntry_spec(self, other_args: List[str]): - """Process cntry_spec command""" - finviz_view.view_group_data( - other_args, "Country (U.S. listed stocks only)", "spectrum" - ) - self.delete_country_spectrum = True - def menu(): """Discovery Menu""" diff --git a/gamestonk_terminal/discovery/finviz_view.py b/gamestonk_terminal/discovery/finviz_view.py index 736b0df939f..3bd3e06e8f6 100644 --- a/gamestonk_terminal/discovery/finviz_view.py +++ b/gamestonk_terminal/discovery/finviz_view.py @@ -8,6 +8,24 @@ from gamestonk_terminal.helper_funcs import parse_known_args_and_warn from finvizfinance.group import valuation, performance, spectrum from PIL import Image +l_GROUPS = [ + "Sector", + "Industry", + "Industry (Basic Materials)", + "Industry (Communication Services)", + "Industry (Consumer Cyclical)", + "Industry (Consumer Defensive)", + "Industry (Energy)", + "Industry (Financial)", + "Industry (Healthcare)", + "Industry (Industrials)", + "Industry (Real Estate)", + "Industry (Technology)", + "Industry (Utilities)", + "Country (U.S. listed stocks only)", + "Capitalization", +] + def map_sp500_view(other_args: List[str]): """Opens Finviz website in a browser @@ -102,15 +120,13 @@ def get_spectrum_data(group: str): spectrum.Spectrum().ScreenerView(group=group) -def view_group_data(other_args: List[str], group: str, data_type: str): +def view_group_data(other_args: List[str], data_type: str): """View group (sectors, industry or country) valuation/performance/spectrum data Parameters ---------- other_args : List[str] argparse other args - group : str - select group to see data between sectors, industry and country data_type : str select data type to see data between valuation, performance and spectrum """ @@ -121,24 +137,50 @@ def view_group_data(other_args: List[str], group: str, data_type: str): View group (sectors, industry or country) valuation/performance/spectrum data. [Source: Finviz] """, ) - ns_parser = parse_known_args_and_warn(parser, other_args) - if not ns_parser: - return + parser.add_argument( + "-g", + "--group", + nargs="+", + type=str, + default="Sector", + dest="group", + help="Data group (sector, industry or country)", + choices=l_GROUPS, + ) - if data_type == "valuation": - df_group = get_valuation_performance_data(group, "valuation") - print(df_group.to_string()) + try: + if other_args: + if "-" not in other_args[0]: + other_args.insert(0, "-g") + other_args = [other_args[0], " ".join(other_args[1:])] - elif data_type == "performance": - df_group = get_valuation_performance_data(group, "performance") - print(df_group.to_string()) + ns_parser = parse_known_args_and_warn(parser, other_args) + if not ns_parser: + return - elif data_type == "spectrum": - get_spectrum_data(group) + if isinstance(ns_parser.group, List): + ns_parser.group = ns_parser.group[0] - img = Image.open(group + ".jpg") - img.show() - else: - print("Invalid data type. Choose between valuation, performance and spectrum.") + if data_type == "valuation" or data_type == "performance": + df_group = get_valuation_performance_data(ns_parser.group, data_type) + print(df_group.to_string()) - print("") + elif data_type == "spectrum": + get_spectrum_data(ns_parser.group) + + img = Image.open(ns_parser.group + ".jpg") + img.show() + + print("") + return ns_parser.group + + else: + print( + "Invalid data type. Choose between valuation, performance and spectrum." + ) + + print("") + return "" + + except SystemExit: + print("") From 93ae459067f4d476eb10efada47e946d7aaea67c Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 6 Apr 2021 02:49:24 +0100 Subject: [PATCH 8/9] Update README.md --- gamestonk_terminal/discovery/README.md | 111 +++++++------------------ 1 file changed, 29 insertions(+), 82 deletions(-) diff --git a/gamestonk_terminal/discovery/README.md b/gamestonk_terminal/discovery/README.md index d0976053138..fcba215b5c4 100644 --- a/gamestonk_terminal/discovery/README.md +++ b/gamestonk_terminal/discovery/README.md @@ -26,17 +26,12 @@ This menu aims to discover new stocks, and the usage of the following commands a * great website for SPACs research [SpacHero] * [uwhales](#uwhales) * good website for SPACs research [UnusualWhales] - -Finviz: -* [sec_val](#sec_val) -* [sec_perf](#sec_perf) -* [sec_spec](#sec_spec) -* [ind_val](#ind_val) -* [ind_perf](#ind_perf) -* [ind_spec](#ind_spec) -* [cntry_val](#cntry_val) -* [cntry_perf](#cntry_perf) -* [cntry_spec](#cntry_spec) +* [valuation](#valuation) + * valuation of sectors, industry, country [Finviz] +* [performance](#performance) + * performance of sectors, industry, country [Finviz] +* [spectrum](#spectrum) + * spectrum of sectors, industry, country [Finviz] ## map @@ -180,93 +175,45 @@ Good website for SPACs research. [Source: www.unusualwhales.com] Captura de ecrã 2021-02-20, às 11 38 54 - -## sec_val +## valuation ```shell -usage: sec_val +usage: valuation [-g Sector,Industry,Industry (Basic Materials),Industry (Communication Services), +Industry (Consumer Cyclical),Industry (Consumer Defensive),Industry (Energy),Industry (Financial), +Industry (Healthcare),Industry (Industrials),Industry (Real Estate),Industry (Technology), +Industry (Utilities),Country (U.S. listed stocks only),Capitalization] ``` -Sector valuation. [Source: Finviz] +valuation of sectors, industry, country. [Source: Finviz] +* -g : Data group (sector, industry or country). Default: Sector. sec_val -## sec_perf + +## performance ```shell -usage: sec_perf +usage: performance [-g Sector,Industry,Industry (Basic Materials),Industry (Communication Services), +Industry (Consumer Cyclical),Industry (Consumer Defensive),Industry (Energy),Industry (Financial), +Industry (Healthcare),Industry (Industrials),Industry (Real Estate),Industry (Technology), +Industry (Utilities),Country (U.S. listed stocks only),Capitalization] ``` -Sector performance. [Source: Finviz] - -sec_per - -## sec_spec - -```shell -usage: sec_spec -``` - -Sector spectrum. [Source: Finviz] - -![sec_spec](https://user-images.githubusercontent.com/25267873/113639073-4ac72200-9670-11eb-871d-becfe0efb718.png) - -## ind_val - -```shell -usage: ind_val -``` - -Industry valuation. [Source: Finviz] - -ind_val - -## ind_perf - -```shell -usage: ind_perf -``` - -Industry performance. [Source: Finviz] +performance of sectors, industry, country. [Source: Finviz] +* -g : Data group (sector, industry or country). Default: Sector. ind_per -## ind_spec +## spectrum -```shell -usage: ind_spec +``` +usage: spectrum [-g Sector,Industry,Industry (Basic Materials),Industry (Communication Services), +Industry (Consumer Cyclical),Industry (Consumer Defensive),Industry (Energy),Industry (Financial), +Industry (Healthcare),Industry (Industrials),Industry (Real Estate),Industry (Technology), +Industry (Utilities),Country (U.S. listed stocks only),Capitalization] ``` -Industry spectrum. [Source: Finviz] - -ind_spec - -## cntry_val - -```shell -usage: cntry_val -``` - -Country valuation. [Source: Finviz] - -coun_val - -## cntry_perf - -```shell -usage: cntry_perf -``` - -Country performance. [Source: Finviz] - -cou_per - -## cntry_spec - -```shell -usage: cntry_spec -``` - -Country spectrum. [Source: Finviz] +Spectrum of sectors, industry, country. [Source: Finviz] +* -g : Data group (sector, industry or country). Default: Sector. ![cntry_spec](https://user-images.githubusercontent.com/25267873/113639067-48fd5e80-9670-11eb-95cf-0931845ddd12.png) From fe64ec04039743b4c1fa22eff0bf2b1ca727e062 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 6 Apr 2021 02:50:44 +0100 Subject: [PATCH 9/9] Update README.md --- gamestonk_terminal/discovery/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gamestonk_terminal/discovery/README.md b/gamestonk_terminal/discovery/README.md index fcba215b5c4..517d142d334 100644 --- a/gamestonk_terminal/discovery/README.md +++ b/gamestonk_terminal/discovery/README.md @@ -187,7 +187,7 @@ Industry (Utilities),Country (U.S. listed stocks only),Capitalization] valuation of sectors, industry, country. [Source: Finviz] * -g : Data group (sector, industry or country). Default: Sector. -sec_val +sec_val ## performance @@ -202,7 +202,8 @@ Industry (Utilities),Country (U.S. listed stocks only),Capitalization] performance of sectors, industry, country. [Source: Finviz] * -g : Data group (sector, industry or country). Default: Sector. -ind_per +ind_per + ## spectrum