diff --git a/gamestonk_terminal/README.md b/gamestonk_terminal/README.md index 7de1610a217..a3aab2939c8 100644 --- a/gamestonk_terminal/README.md +++ b/gamestonk_terminal/README.md @@ -14,7 +14,7 @@ * [Comparison Analysis](#Comparison-Analysis-) * [Exploratory Data Analysis](#Exploratory-Data-Analysis-) * [Residual Analysis](#Residual-Analysis-) -* [FRED](#FRED-) +* [Economic Data](#Econ-) * [Options](#Options-) * [Screener](#Screener-) * [Forex](#Forex-) @@ -323,9 +323,10 @@ Command|Description|Source `independence` |tests independent and identically distributed (BDS) | [Wikipedia](https://en.wikipedia.org/wiki/Pearson%27s_chi-squared_test#Testing_for_statistical_independence)   -## FRED [»](econ/README.md) +## ECON [»](econ/README.md) Command|Description ------ | -------- +FRED Data | `gdp` | GDP `unemp` | Unemployment Rate `t1` | 1-Year Treasury Constant Maturity Rate @@ -337,7 +338,8 @@ Command|Description `moodAAA` | Moody's Seasoned AAA Corporate Bond Yield `usdcad` | Canada / U.S. Foreign Exchange Rate (CAD per 1 USD) `cust` | User Specified FRED Data - Please Specify --id - +VIX Data | +`view` | Plots VIX Historical Data   ## Options [»](options/README.md) diff --git a/gamestonk_terminal/econ/README.md b/gamestonk_terminal/econ/README.md index b95cc397df5..b2b8149b044 100644 --- a/gamestonk_terminal/econ/README.md +++ b/gamestonk_terminal/econ/README.md @@ -1,5 +1,7 @@ # ECON +## FRED + https://fred.stlouisfed.org The purpose of fred is to have the ability to look at economic data. This page offers 2 options: @@ -121,4 +123,12 @@ Date 2021-03-11 1.1978 ```` -Note the NaN on 2-15, which corresponds to President's Day. \ No newline at end of file +Note the NaN on 2-15, which corresponds to President's Day. + +## VIX + +This command pulls historical VIX data from yfinance module. +```` +usage: view [-s START_DATE] +```` +* -s Start date to plot historical VIX data \ No newline at end of file diff --git a/gamestonk_terminal/econ/econ_controller.py b/gamestonk_terminal/econ/econ_controller.py index 18d22d44eec..d971713c247 100644 --- a/gamestonk_terminal/econ/econ_controller.py +++ b/gamestonk_terminal/econ/econ_controller.py @@ -50,9 +50,10 @@ class EconController: print(" q quit this menu, and shows back to main menu") print(" quit quit to abandon program") print(" ") - print("VIX:\n") + print("VIX:") print(" view plot VIX") - print("FRED:\n") + print(" ") + print("FRED:") print(" gdp GDP") print(" unemp Unemployment Rate") print(" t1 1-Year Treasury Constant Maturity Rate") @@ -95,9 +96,6 @@ class EconController: if known_args.cmd in fred_data_list: return getattr(self, "call_fred_api")(other_args, known_args.cmd) - if known_args.cmd in vix_command_list: - return getattr(self, "call_VIX")(other_args, known_args.cmd) - return getattr( self, "call_" + known_args.cmd, lambda: "Command not recognized!" )(other_args) @@ -118,12 +116,9 @@ class EconController: """Process Fred Data call""" fred_view.get_fred_data(other_args, cmd) - def call_VIX(self, other_args: List[str], cmd: str): - """Process a VIX Call.""" - if cmd == "view": - vix_view.view_vix(other_args) - else: - print("The command selected doesn't exist\n") + def call_view(self, other_args: List[str]): + """Process view for VIX Data.""" + vix_view.view_vix(other_args) def call_cust(self, other_args: List[str]): """Process cust call""" @@ -134,9 +129,7 @@ def menu(): """Econ Menu""" econ_controller = EconController() - plt.close("all") - econ_controller.print_help() # Loop forever and ever