address comments -- readme and change vix call

This commit is contained in:
Jamie
2021-04-26 16:56:28 -04:00
parent 729899f3ed
commit 6c9914436b
3 changed files with 22 additions and 17 deletions

View File

@@ -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)

View File

@@ -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.
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

View File

@@ -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