Navigation

    Quantiacs Community

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

    Saving weights and using them for trading

    Strategy help
    2
    3
    296
    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.
    • R
      rezhak21 last edited by

      I want to use the allocation weights I define at point in time "t" at point in time "t+1". I tried using your multi-pass backtester, but without any success. How can I do that? Can I save the state of my simulation between iterations?

      support 1 Reply Last reply Reply Quote 1
      • support
        support @rezhak21 last edited by

        @rezhak21 Hi, good question, yes, you can!

        Please take a look at the documentation at:

        https://quantiacs.com/documentation/en/reference/evaluation.html#stateful-multi-pass-backtesting

        When you use multi-pass backtesting you have to define a strategy function which loads the data and returns allocation weights for a fixed point in time. The "default" behavior of the backester does not save the state of the simulation between iterations, normally this choice is safe and fast as it allows for parallel processing.

        If you want to preserve the state, you have to pass two arguments to the function: the data and the "state". "state" should be a dictionary containing the variables and the values which should be persistent across iterations. The function should then return allocation weights and the updated state.

        Please try the example at:

        https://quantiacs.com/documentation/en/reference/evaluation.html#stateful-multi-pass-backtesting

        and let us know.

        R 1 Reply Last reply Reply Quote 1
        • R
          rezhak21 @support last edited by

          @support great, thank you, yes, this is what I was looking for

          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