Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Struggle creating local dev environment

    Support
    5
    13
    759
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dark.shark last edited by

      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?

      V 1 Reply Last reply Reply Quote 0
      • V
        Vyacheslav_B @dark.shark last edited by

        @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.py

        by adding a forced sorting

            data = data.sortby('time', ascending=True)
            #data = data.sortby('time', ascending=False)
        

        adjust_by_splits function

        44735e75-ce00-45a6-8aaf-3cff63b5ce89-image.png

        load_data function

        495900c4-23e5-4216-9d6e-b3df54dc3753-image.png

        and now the data load works correctly.

        M 1 Reply Last reply Reply Quote 0
        • M
          magenta.kabuto @Vyacheslav_B last edited by

          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
          Bildschirmfoto 2024-03-24 um 04.35.14.png

          M 1 Reply Last reply Reply Quote 0
          • M
            magenta.kabuto @magenta.kabuto last edited by

            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

            support 1 Reply Last reply Reply Quote 0
            • support
              support @magenta.kabuto last edited by

              @magenta-kabuto Dear magenta-kabuto, you can try again, it should have been fixed.

              M D 3 Replies Last reply Reply Quote 1
              • M
                magenta.kabuto @support last edited by

                @support thx a lot. WIll try it now 🙂

                M 1 Reply Last reply Reply Quote 0
                • M
                  magenta.kabuto @magenta.kabuto last edited by

                  This post is deleted!
                  M 1 Reply Last reply Reply Quote 0
                  • M
                    magenta.kabuto @magenta.kabuto last edited by

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • D
                      dark.pidgeot @support last edited by

                      @support Hi,
                      is it necessary to manually modify the qnt module before using it in colab?

                      D 1 Reply Last reply Reply Quote 0
                      • D
                        dark.pidgeot @support last edited by

                        @support b5b5f80e-7ff2-4bc1-963c-dcaf59af9816-image.png

                        1 Reply Last reply Reply Quote 0
                        • D
                          dark.pidgeot @dark.pidgeot last edited by

                          @dark-pidgeot Hi, i have the same probleme with the version of pandas

                          M V 2 Replies Last reply Reply Quote 0
                          • M
                            magenta.kabuto @dark.pidgeot last edited by

                            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

                            1 Reply Last reply Reply Quote 0
                            • V
                              Vyacheslav_B @dark.pidgeot last edited by

                              @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.

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post
                              Powered by NodeBB | Contributors
                              • Documentation
                              • About
                              • Career
                              • My account
                              • Privacy policy
                              • Terms and Conditions
                              • Cookies policy
                              Home
                              Copyright © 2014 - 2021 Quantiacs LLC.
                              Powered by NodeBB | Contributors