@vyacheslav_b Thanks for ur help!
- I checked my code, and I found that I loaded the data by using load_spx_data() instead of load_ndx_data()
But I added the next trading date to the original data in order to write the latest weight. Does this operation cause the warning? - I checked the dataframe of the final weights, and I use the MAX() and the MIN() in excel to check the maximum and the minimum value of the weights, the maximum weight is 0.05, and the minimum weight is -0.05, which is different from the value 0.05882353 showing on the screen.