@illustrious-felice Hi,
sorry for late answer, please check the correctness of dataset used for defining weights in strategy. Be sure that 'stocks_s&p500' dataset is used and not 'stocks_nasdaq100' for current competition. To ensure strategy trades only liquid assets in certain time period, multiply the output from your strategy function with 'is_liquid' field from correct dataset, or simply use clean() function from qnt.output:
import qnt.data as qndata
import qnt.output as qnout
def strategy(data):
.....
# liquid = data.sel(field='is_liquid')
# weights = weights * liquid
return weights
data = qndata.stocks_load_spx_data(min_date='2005-01-01')
weights = strategy(data)
weights = qnout.clean(weights, data, kind='stocks_s&p500')
qnout.write(weights)
Also, keep in mind that submission will not be eligible for contest if stocks universe (in this case "top 7 magnificent") is hand picked (manually defined).
Best regards,