diff options
author | montezdesousa <79287829+montezdesousa@users.noreply.github.com> | 2023-01-05 16:24:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 11:24:22 -0500 |
commit | 4b9119adbfb3b867a35be32d837e253e6c8ee034 (patch) | |
tree | c91408a9360e7c66623fd31cd57d92532d63ac76 | |
parent | 988f0aeed8978261035b2e47bee1068e4c37cc00 (diff) |
Fix emacross with Polygon as source (#3874)
* fix emacross with Polygon as source
* remove import
-rw-r--r-- | openbb_terminal/miscellaneous/scripts/stocks/test_stocks_bt.openbb | 85 | ||||
-rw-r--r-- | openbb_terminal/stocks/stocks_model.py | 1 |
2 files changed, 86 insertions, 0 deletions
diff --git a/openbb_terminal/miscellaneous/scripts/stocks/test_stocks_bt.openbb b/openbb_terminal/miscellaneous/scripts/stocks/test_stocks_bt.openbb index 6ce73b95e0e..f028d19552a 100644 --- a/openbb_terminal/miscellaneous/scripts/stocks/test_stocks_bt.openbb +++ b/openbb_terminal/miscellaneous/scripts/stocks/test_stocks_bt.openbb @@ -15,4 +15,89 @@ rsi rsi -l 20 -u 80 -p 12 rsi --spy rsi --no_bench --no_short +.. +load ${ticker=tsla} --source YahooFinance +bt +whatif +whatif -n 2.34 +whatif 2021-01-01 +ema +ema --spy +ema --spy --no_bench +ema -l 2 +emacross +emacross -l 10 -s 3 +emacross --spy --no_bench --no_short +rsi +rsi -l 20 -u 80 -p 12 +rsi --spy +rsi --no_bench --no_short +.. +load ${ticker=tsla} --source IEXCloud +bt +whatif +whatif -n 2.34 +whatif 2021-01-01 +ema +ema --spy +ema --spy --no_bench +ema -l 2 +emacross +emacross -l 10 -s 3 +emacross --spy --no_bench --no_short +rsi +rsi -l 20 -u 80 -p 12 +rsi --spy +rsi --no_bench --no_short +.. +load ${ticker=tsla} --source AlphaVantage +bt +whatif +whatif -n 2.34 +whatif 2021-01-01 +ema +ema --spy +ema --spy --no_bench +ema -l 2 +emacross +emacross -l 10 -s 3 +emacross --spy --no_bench --no_short +rsi +rsi -l 20 -u 80 -p 12 +rsi --spy +rsi --no_bench --no_short +.. +load ${ticker=tsla} --source Polygon +bt +whatif +whatif -n 2.34 +whatif 2021-01-01 +ema +ema --spy +ema --spy --no_bench +ema -l 2 +emacross +emacross -l 10 -s 3 +emacross --spy --no_bench --no_short +rsi +rsi -l 20 -u 80 -p 12 +rsi --spy +rsi --no_bench --no_short +.. +load ${ticker=tsla} --source EODHD +bt +whatif +whatif -n 2.34 +whatif 2021-01-01 +ema +ema --spy +ema --spy --no_bench +ema -l 2 +emacross +emacross -l 10 -s 3 +emacross --spy --no_bench --no_short +rsi +rsi -l 20 -u 80 -p 12 +rsi --spy +rsi --no_bench --no_short exit diff --git a/openbb_terminal/stocks/stocks_model.py b/openbb_terminal/stocks/stocks_model.py index 3155eeaf8c9..320fc027636 100644 --- a/openbb_terminal/stocks/stocks_model.py +++ b/openbb_terminal/stocks/stocks_model.py @@ -227,6 +227,7 @@ def load_stock_polygon( df_stock_candidate["Close"] = df_stock_candidate["Adj Close"] df_stock_candidate = df_stock_candidate.sort_values(by="date") df_stock_candidate = df_stock_candidate.set_index("date") + df_stock_candidate.index = df_stock_candidate.index.normalize() return df_stock_candidate |