Weights different in testing and submission
The strategy submitted to the Q17 is giving different weights after submission and in the testing phase. For instance, the q17_2 strategy is giving non-negative weights to all assets on 01/01/2014 when I cloned the strategy and run the code on the Quantiacs server whereas the weights I downloaded from the q17_2 submitted log give negative weight to some assets on 01/01/2014. Could you please help me with that?
@anshul96go Hello, are you using the backtester with retraining option? Can you try setting the retraining interval to 1 day?
@support Thanks for the help team! Ahh, that makes sense. I am trying to run it.
Also, there is one more issue coming up. On creating a local development environment today, the load data function is failing with the following error: "cannot represent labeled-based slice indexer for dimension 'time' with a slice over integer positions; the index is unsorted or non-unique". Could you please look into that too?
@anshul96go It looks some conflict is going on there, can you check which version of pandas are you using? It has to be 1.2.5.
Maybe try to create a new environment using:
conda create -n qntdev quantiacs-source::qnt conda-forge::ta-lib conda-forge::pandas==1.2.5 conda-forge::dash==1.18 python==3.7
About the slicing error, I had that too a while ago. It took me some time to figure out that it wasn't enough to have the right pandas version in the environment. Because I had another python install with the same version in my PATH, the qntdev-python also looked there and always used the newer pandas. So I placed the -s flag everywhere the qntdev python is supposed to run (PyCharm, Jupyter, terminal) like this
/path/to/quantiacs/python -s strategy.py
Of course one could simply remove the other python install from PATH but I needed it there.