I was running strategies from Colab whitout any problem but now I am getting this error even in the example form
=================
import xarray as xr
import qnt.stats as qnstats
import qnt.data as qndata
import qnt.output as qnout
import qnt.ta as qnta
import qnt.backtester as qnbt
import qnt.graph as qngraph
def load_data(period):
return qndata.stocks.load_ndx_data(tail=period)
def strategy(data):
close = data.sel(field="close")
is_liquid = data.sel(field="is_liquid")
sma_slow = qnta.sma(close, 200).isel(time=-1)
sma_fast = qnta.sma(close, 20).isel(time=-1)
weights = xr.where(sma_slow < sma_fast, 1, -1)
weights = weights * is_liquid
return weights
weights = qnbt.backtest(
competition_type = "stocks_nasdaq100",
load_data = load_data,
lookback_period = 365*4,
start_date = "2006-01-01",
strategy = strategy,
analyze = True,
build_plots = True
)
===============
Run last pass...
Load data...
AttributeError Traceback (most recent call last)
<ipython-input-5-ef8fa45745b7> in <module>
32 strategy = strategy,
33 analyze = True,
---> 34 build_plots = True
35 )
9 frames
/usr/local/lib/python3.7/dist-packages/xarray/backends/plugins.py in list_engines()
103 @functools.lru_cache(maxsize=1)
104 def list_engines():
--> 105 entrypoints = entry_points().get("xarray.backends", ())
106 return build_engines(entrypoints)
107
AttributeError: 'EntryPoints' object has no attribute 'get'