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/

    Backtrader to Simulate MakerDAO/Compound CDP

    General Discussion
    3
    3
    102
    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.
    • dmintercept
      dmintercept last edited by

      Hi Everyone,

      I have been playing around with backtrader for about the last 6 months and using it to build simple trading strategies. Last week, I was interested in looking at backtesting CDP performance if you set collateral ratios at which to maintain the CDP position. You can think of it as a leveraged position where the leverage is kept within a constant range. Here is the progress I have so far: https://dash-cdp-sim.herokuapp.com/

      I would be happy to receive feedback on my code if anyone has input on the backtrader implementation or with my Dash code. Repo: https://github.com/dmintercept/cdp_simulation

      Best Regards,
      Steven

      1 Reply Last reply Reply Quote 0
      • vladisld
        vladisld last edited by

        Kudos @dmintercept - very good project. Could be easily used as a sample of how to integrate and visualize strategy exploration with Dash framework.

        The code also looks pretty solid to me - probably except some raw constants used for order sizes and cash amounts ( which could be easily converted to UI specified values if needed ).

        Would also be great to be able to specify additional analyzers to be plotted - but this is a minor comment as well.

        Thanks for sharing your work.

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

          Nice dashboard. I like the way you organized your code.

          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