Small fixes (#2810)

* Economy/futures source and econometrics load -h

* economy script

* error message

* tests

* remove `trend` from stocks/ba

* integration test scripts
This commit is contained in:
James Maslek
2022-10-12 19:52:53 -04:00
committed by GitHub
parent 74a79b8572
commit ad71fe777a
12 changed files with 42 additions and 37 deletions

1
i18n/en.yml vendored
View File

@@ -337,7 +337,6 @@ en:
stocks/ba/interest: interest over time of sentences versus stock price
stocks/ba/queries: top related queries with this stock
stocks/ba/rise: top rising related queries with stock
stocks/ba/trend: most talked about tickers within the last hour
stocks/ba/hist: plot historical RHI and AHI data by hour
stocks/ba/jcdr: Jim Cramer's daily recommendations
stocks/ba/jctr: Jim Cramer's recommendations by ticker

View File

@@ -342,7 +342,12 @@ class EconometricsController(BaseController):
dest="examples",
)
if other_args and "-e" not in other_args and "-f" not in other_args:
if (
other_args
and "-e" not in other_args
and "-f" not in other_args
and "-h" not in other_args
):
other_args.insert(0, "-f")
ns_parser = self.parse_known_args_and_warn(parser, other_args)

View File

@@ -490,17 +490,25 @@ class EconomyController(BaseController):
parser, other_args, export_allowed=EXPORT_ONLY_RAW_DATA_ALLOWED
)
if ns_parser and ns_parser.commodity:
finviz_view.display_future(
future_type=ns_parser.commodity.capitalize(),
sortby=ns_parser.sortby,
ascend=ns_parser.ascend,
export=ns_parser.export,
)
elif ns_parser:
wsj_view.display_futures(
export=ns_parser.export,
)
if ns_parser:
if ns_parser.source == "Finviz":
if ns_parser.commodity:
finviz_view.display_future(
future_type=ns_parser.commodity.capitalize(),
sortby=ns_parser.sortby,
ascend=ns_parser.ascend,
export=ns_parser.export,
)
else:
console.print(
"[red]Commodity group must be specified on Finviz.[/red]"
)
elif ns_parser.source == "WallStreetJournal":
if ns_parser.commodity:
console.print("[red]Commodity flag valid with Finviz only.[/red]")
wsj_view.display_futures(
export=ns_parser.export,
)
@log_start_end(log=logger)
def call_map(self, other_args: List[str]):

View File

@@ -222,7 +222,6 @@ class BehaviouralAnalysisController(StockBaseController):
mt.add_cmd("interest", self.ticker)
mt.add_cmd("queries", self.ticker)
mt.add_cmd("rise", self.ticker)
mt.add_cmd("trend")
mt.add_cmd("jcdr")
mt.add_cmd("jctr", self.ticker)
console.print(text=mt.menu_text, menu="Stocks - Behavioural Analysis")

View File

@@ -5,11 +5,11 @@ overview -t usbonds
overview -t glbonds
overview -t currencies
futures
futures -c energy
futures -c metals
futures -c meats
futures -c grains
futures -c softs
futures -c energy --source Finviz
futures -c metals --source Finviz
futures -c meats --source Finviz
futures -c grains --source Finviz
futures -c softs --source Finviz
map
bigmac -c USA,ESP,LVA,DEU,FRA,FIN
macro

View File

@@ -21,7 +21,6 @@ interest -w yolo
queries
rise
hist
trend
jcdr
load tsla
jctr

View File

@@ -9,7 +9,6 @@ disc
help
h
?
rtearn
pipo
fipo
gainers
@@ -19,7 +18,6 @@ gtech
active
ulc
asc
ford
arkord
upcoming
divcal

View File

@@ -1,10 +1,14 @@
stocks
dps
shorted
ctb
hsi
pos
sidtc
prom
load -t gme
spos
psi
ftd
dpotc
exit

View File

@@ -1,14 +0,0 @@
stocks
load aapl
pred
pick Close
ets
knn
regression
arima
mlp
rnn
lstm
conv1d
mc
exit

View File

@@ -3,6 +3,7 @@ load aapl
ta
view
recom
summary
ema
sma
wma
@@ -16,6 +17,8 @@ rsp
stoch
fisher
cg
clenow
demark
adx
aroon
bbands

View File

@@ -290,6 +290,7 @@ def test_call_func_expect_queue(expected_queue, func, queue):
"call_futures",
[
"--commodity=energy",
"--source=Finviz",
"--sortby=ticker",
"-a",
"--export=csv",
@@ -307,6 +308,7 @@ def test_call_func_expect_queue(expected_queue, func, queue):
"call_futures",
[
"--commodity=metals",
"--source=Finviz",
"--sortby=ticker",
"-a",
"--export=csv",
@@ -324,6 +326,7 @@ def test_call_func_expect_queue(expected_queue, func, queue):
"call_futures",
[
"--commodity=meats",
"--source=Finviz",
"--sortby=ticker",
"-a",
"--export=csv",
@@ -342,6 +345,7 @@ def test_call_func_expect_queue(expected_queue, func, queue):
[
"--commodity=grains",
"--sortby=ticker",
"--source=Finviz",
"-a",
"--export=csv",
],
@@ -359,6 +363,7 @@ def test_call_func_expect_queue(expected_queue, func, queue):
[
"--commodity=softs",
"--sortby=ticker",
"--source=Finviz",
"-a",
"--export=csv",
],

View File

@@ -22,7 +22,6 @@ Ticker: TSLA
interest interest over time of sentences versus stock price [Google]
queries top related queries with this stock [Google]
rise top rising related queries with stock [FinBrain]
trend most talked about tickers within the last hour [SentimentInvestor]
jcdr Jim Cramer's daily recommendations [JimCramer]
jctr Jim Cramer's recommendations by ticker [JimCramer]