Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Observers/Analyzers per asset in multi-asset strategy?

    Indicators/Strategies/Analyzers
    2
    2
    174
    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
      Dimasik007 last edited by

      Firstly, thanks a lot for an excellent framework!

      I am testing a multi-asset trading strategy - short one asset and long the other at the same time.

      I want to see the maximum DrawDown each position can have during the trade. How could I achieve this?

      I understand that I can't apply DrawDown observer separately for each asset because it is based on the Broker which tracks cash, correct?

      Is it possible to modify DataTrades Observer to implement something similar to what I've made on the picture below? So that I could see PnL of each position during the trade and find out/record the highest DrawDown position could have. If it is possible, any directions on how to do this?

      Screenshot 2019-11-19 at 15.44.57.png

      Thanks!

      B 1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators @Dimasik007 last edited by

        @Dimasik007 said in Observers/Analyzers per asset in multi-asset strategy?:

        Is it possible to modify DataTrades Observer to implement something similar to what I've made on the picture below?

        You can for sure write an Observer which looks at the current position value to determine the PnL.

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
        $(document).ready(function () { app.coldLoad(); }); }