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/

    I think we came across a bug in backtrader/analyzer.py

    General Discussion
    2
    3
    280
    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.
    • Søren Houen
      Søren Houen last edited by

      I think we came across a bug with the analyzers when running on lower-than-daily timeframes. It seems that the extradays added in backtrader/analyzer.py on commit c31545d currently have no effect.

      The symptom of this is that when using the TimeReturn analyzer with hourly candles, any self.dtkey at time 23:59 will be missing from self.rets[self.dtkey].

      However, I started using backtrader only a month ago and would very much like to get feedback on this from someone more experienced with the framework.

      Here is the PR in question: https://github.com/backtrader/backtrader/pull/388/files

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

        Will look into it.

        1 Reply Last reply Reply Quote 1
        • Søren Houen
          Søren Houen last edited by

          Thanks! :)

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