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/

    Why does portfolio value stay the same after running backtest ?

    General Code/Help
    2
    2
    707
    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.
    • David Hancock
      David Hancock last edited by

      Ran the default MA cross strat with custom CSv data. The chart shows many buys and sells but the porfolio value stays the same? any ideas?

      Code:
      http://pastebin.com/v7pr97eA

      Data
      http://www.filedropper.com/dash_2

      Bonus question: How do you an equity curve on a separate chart ?

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

        One of the main purposes of setting up the community was to have things kept here as a reference for other users to see, rather than (for example) having things scattered across closed tickets in GitHub or as comments in a separate platform for the blog.

        As such the best way to seek answers probably is:

        • Put the code here (use the COMPOSE button to see how to best paste, but the syntax is standard markdown)

        • Paste the chart which shows the many buys and sells, given it has been produced

          The default chart has a plot of the evolution of cash and the total portfolio value

        There is no need real need to paste the data unless it may be running for example backwards (like it happened to one user) or you want to show an specific amount of data describing a use case (for example breaking resampling)

        Bonus question: How do you an equity curve on a separate chart ?

        Blog - BTFD (Buy The F... Dip) shows how to do it by unplotting the data feeds and using only observers

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