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/

    how to calculate stragegy gain until LAST sell?

    General Code/Help
    2
    3
    40
    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
      marketmaker last edited by

      hi guys,

      I'm using backtrader and just realized that it works nicely but sometimes, there is this situation:

      the strategy will execute last buy but then, there is no last sell -> so it is hard to tell how successful was strategy in PNL.

      is there any parameter or how to just compare starting cash with cash on end after last sell? so if after last sell, there is another one buy (but no other sell)-> to ignore that buy?

      something like cheat on end or?

      example:
      start cash was = 250 000
      last sell: 10 BTC for 50000 => 500 000 cash.
      gain is 100% (500 000 vs 250 000)
      but if there is another buy after last sell, like for 400 000, how to calculate PNL correctly?

      Y 1 Reply Last reply Reply Quote 0
      • Y
        yourdatatalking @marketmaker last edited by

        @marketmaker How active is the Backtrader community? It seems like there is two githubs and two issue lists on the site, plus this community.

        M 1 Reply Last reply Reply Quote 0
        • M
          marketmaker @yourdatatalking last edited by

          @yourdatatalking
          Hi man.. well, I'm asking very basic questions (I'm beginner) like how to program ema21 change of direction, but nobody is answering me.

          so there are 2 possibilities:

          1. algotrading is bullshit and everybody quit months ago
            or
          2. algotrading is earning billions of dollars and nobody will help you because it is you vs. them

          now the billion dollar question is - which answer is the right one :)

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors