Hello, I am currently using the following backtest to develop a strategy using neural network
import qnt.data as qndata import qnt.stats as qnstats retrain_interval = 19*365 + 1 data = qndata.stocks.load_ndx_data(min_date ="2005-01-01") models = train_model(data) weights = predict(models, data) is_liquid = data.sel(field="is_liquid") weights = weights * is_liquid def get_enough_bid_for(data_, weights_): time_traded = weights_.time[abs(weights_).fillna(0).sum('asset') > 0] is_strategy_traded = len(time_traded) if is_strategy_traded: return xr.where(weights_.time < time_traded.min(), data_.sel(field="is_liquid"), weights_) return weights_ weights = get_enough_bid_for(data, weights) weights = weights.fillna(0) # Calculate stats stats = qnstats.calc_stat(data, weights) display(stats.to_pandas().tail()) # Graph performance = stats.to_pandas()["equity"] import qnt.graph as qngraph #qngraph.make_plot_filled(performance.index, performance, name="PnL (Equity)", type="log")The results of checking the strategy file are normal, however when I run precheck the following error occurs
469fc971-7907-4a18-875b-71f8ba467669-image.png
bf6144b2-1cd1-4ae4-8786-ce0ae4f36a72-image.png
16bdea24-da19-4e24-a5ce-d2aae7480bbc-image.png
10d2812d-f309-4140-8b03-945e1816b404-image.png
And when I submit the strategy, it is put into the filter with the error that there is no weight. Please help me fix the error. Thank you.
My strategy ID is 16900804