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/

    TimeDrawDown Time Frames

    Indicators/Strategies/Analyzers
    2
    2
    121
    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.
    • J
      JustSomeGuy last edited by

      I'm working with hourly data for BTC, which trades 24/7. If I use the TimeDrawDown analyzer but want to look at this by day or by month, will backtrader automatically include 24 hours in a day and ~726 (30.25*24) in a month? My initial assumption was yes, but then I noticed in the returns analyzer there is a tann parameter and the 252 days for a year example wouldn't be the right way to approach a 24/7 crypto market. Thanks!

      1 Reply Last reply Reply Quote 0
      • run-out
        run-out last edited by

        The TimeDrawDown analyzer is built off TimeFrameAnalyzerBase starting at line 289. Have a look at that code, perhaps you can get some clues there about how time is being handled and create your own custom analyzer overwriting or modifying I would imagine def _get_dt_cmpkey(self, dt): line 361.

        RunBacktest.com

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