Struggle creating local dev environment
-
Hi,
The instructions for creating a local development environment don't seem to work for both desktop (macOS on M1) and Colab.
Seems the version of pandas == 1.2.5 is not suitable for python>=3.10,<3.11 according to the message I received from conda. Newer versions of pandas create an error when trying to get the data by
qndata.stocks.load_ndx_data(min_date='2023-06-01')
"cannot represent labeled-based slice indexer for coordinate 'time' with a slice over integer positions; the index is unsorted or non-unique"
Can you please confirm the correct configuration of python and packages?
-
@dark-shark Hello. I have a macOS on M1.
I cloned a library from GitHub.
https://github.com/quantiacs/toolbox
The project page has instructions on how to launch the project using different environments.I modified the file
qnt/data/stocks.pyby adding a forced sorting
data = data.sortby('time', ascending=True) #data = data.sortby('time', ascending=False)
adjust_by_splits function
load_data function
and now the data load works correctly.
-
HI @vyacheslav_b ,
thx for your solution.
I today tried Google Colab to train my NN and encountered the same problem as I couldnt get pandas to version 1.2.5. After implementing your suggested solution however, the occurs in the ml_backtester, all else equal.
And wont this solution cause an error during submission anyways?
Thank you
Regards
-
Hello @support ,
could you pls fix the notebook you provide in local development of trading strategies for Google Colab.
As this notebook has a pandas version mismatch and as long as I am not missing anything this should be the case for everyone.
Pls inform me if it works fine for you, as I get data slicing error.
Regards -
@magenta-kabuto Dear magenta-kabuto, you can try again, it should have been fixed.
-
@support thx a lot. WIll try it now
-
This post is deleted! -
This post is deleted! -
@support Hi,
is it necessary to manually modify the qnt module before using it in colab? -
-
@dark-pidgeot Hi, i have the same probleme with the version of pandas
-
HI @dark-pidgeot,
you need to install pandas=1.2.5 . In colab (cloud) it takes quite a bit of time, if you are working locally, it should be very quick.
Regards -
@dark-pidgeot Hi! After the release of version qnt “0.0.402” the issue with data loading in the local environment has been resolved. The library now uses newer dependencies, including pandas version 2.2.2.