Navigation

    Quantiacs Community

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

    Different Sharpe Ratios for Multipass-Backtest and Quantiacs Mulipass Backtest

    Support
    4
    13
    984
    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.
    • M
      magenta.kabuto last edited by

      @support Hello, first of all. IBildschirmfoto 2023-03-31 um 13.30.01.png As you can see in the picture I have a good sharpe Ratio but when submitted ,the strategy got rejected because the sharpe ratio is too low. If I assume there is no bug in your multipass backtest, the issue should be the statelessness of your backtester. I tried to correct the code and to my understanding it should be fine but I dont know, and if I only rely on getting the news after submission, I will miss the deadline. Could you therefore pls have a look at the notebook too and if it does not take too much time correct anything if possible. Thank you. Regards

      K V 2 Replies Last reply Reply Quote 1
      • K
        kvanvanvant_test_python @magenta.kabuto last edited by

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

          @kvanvanvant_test_python hey, thx a lot, will precheck it now. Doesnt multi-pass Backtest avoid looking into the future? Anyways, should be clear after precheck.
          Regards

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

            @magenta-kabuto 😑 Bildschirmfoto 2023-03-31 um 15.50.56.png

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

              @magenta-kabuto Unfortunately, even the strategy that got rejected due to a negative sharpe ratio, has the same ones as in the screenshot for 3 passes 😕

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

                @magenta-kabuto Sry to post again. Now I changed to 20 passes and suddenly the sharpe ratio went up and this is the strategy that got rejected. I am totally confused!Bildschirmfoto 2023-03-31 um 17.50.37.png

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

                  @magenta-kabuto 50 passes..... Bildschirmfoto 2023-03-31 um 19.04.43.png

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

                    @magenta-kabuto

                    Hello

                    I see that you are using precheck, this is the fastest way to check the strategy
                    https://github.com/quantiacs/toolbox/blob/main/qnt/precheck.ipynb

                    if the strategy statistics are different, your algorithm looks into the future.

                    does your algorithm calculate the weights to trade every day?

                    or do you calculate all the weights using all the data in one pass and then use them for a specific date? like cache

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

                      @vyacheslav_b hey thx for your reply. Yes the strategy Sharpe ratio differs from the multipass backtest.
                      But Quantiacs says that multiple pass Backtesting avoids looking into the future, so I am confused.
                      The algorithm identifies certain patterns and only if those occur over a period of time, does it generate signals.
                      So it does not calculate weights to trade everyday

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

                        @magenta-kabuto something like this, if this puts a bit lightBildschirmfoto 2023-03-31 um 21.09.30.png

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

                          @magenta-kabuto

                          Compare the two versions of the code.

                          def regime_trade(series):
                              return ""
                          
                          
                          def strategy(data):
                              result = regime_trade(data)
                              return result
                          
                          
                          backtest(strategy=strategy)
                          

                          in the first case, the available data for a specific date are used.

                          def regime_trade(series):
                              return ""
                          
                          
                          result = regime_trade(data)
                          
                          def strategy(data):
                              return result
                          
                          
                          backtest(strategy=strategy)
                          

                          in the second case, all data is used.

                          I see that you have a very large Sharpe ratio, I think that you are using something similar to the second option.

                          M support 2 Replies Last reply Reply Quote 2
                          • M
                            magenta.kabuto @Vyacheslav_B last edited by

                            @vyacheslav_b Hello again, thank you very much. Yes you are right.
                            Regards
                            Furqan

                            1 Reply Last reply Reply Quote 0
                            • support
                              support @Vyacheslav_B last edited by

                              @vyacheslav_b thank you!

                              1 Reply Last reply Reply Quote 0
                              • 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