Integration tests for etf/ta (#4450)

* some adjustments and added int tests for etf/ta

* ruff
This commit is contained in:
Henrique Joaquim
2023-03-10 19:23:46 +00:00
committed by GitHub
parent fea616ee90
commit 740152b862
3 changed files with 49 additions and 2 deletions

View File

@@ -259,7 +259,6 @@ class ETFController(BaseController):
console.print(
f"Loading Daily data for {self.etf_name} with starting period {ns_parser.start.strftime('%Y-%m-%d')}.",
"\n",
)
@log_start_end(log=logger)

View File

@@ -29,6 +29,7 @@ from openbb_terminal.helper_funcs import (
EXPORT_ONLY_FIGURES_ALLOWED,
check_non_negative,
check_positive,
check_positive_float,
check_positive_list,
valid_date,
)
@@ -980,7 +981,7 @@ class TechnicalAnalysisController(BaseController):
"--std",
action="store",
dest="n_std",
type=check_positive,
type=check_positive_float,
default=2,
help="std",
choices=np.arange(0.0, 10, 0.25).tolist(),

View File

@@ -2,4 +2,51 @@ etf
load spy
ta
ema
ema --length 10 --offset 3
sma
sma --length 2 --offset 1
wma
wma --length 99 --offset 4
hma
hma --length 1 --offset 95
zlma
zlma --length 1 --offset 1
vwap
# vwap --offset 2 --start 2022-01-01 --end 2023-01-01
cci
cci --length 2 --scalar 10
macd
macd --fast 13 --slow 99 --signal 15
rsi
rsi --length 2 --scalar 10 --drift 7
stoch
stoch --fastkperiod 2 --slowdperiod 1
fisher
fisher --length 2
cg
cg --length 95
clenow
clenow --period 120
demark
demark --min 5
adx
adx --length 4 --scalar 10 --drift 2
aroon
aroon --length 2 --scalar 11
bbands
bbands --length 2 --std 0.25 --mamode zlma
donchian
donchian
donchian --length_upper 2 --length_lower 1
kc
kc --length 2 --scalar 1 --mamode ema --offset 4
atr
atr --length 10 --mamode sma --offset 33
ad
ad --open
adosc
adosc --open --fast 2 --slow 1
obv
fib
fib --period 30 --start 2021-01-01 --end 2023-01-01
exit