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/

    Pyfolio Full Tear Sheet Save Results to Variables

    General Code/Help
    3
    3
    1039
    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.
    • E
      ElliotP last edited by

      Afternoon,

      This is an amazing package, thank you so much for it. I am trying to export the values calculated for the full tear sheet. I have tried to save the result to a variable but it doesn't seem to work. When I had a look at the code it seems to print calculated values, but I couldn't see the code which calculates things like "annual return", "cumulative return" and presents a figure.

      Would somebody be able to point me in the right direction to access those calculated values? Or would it be easier to calculate my own tear sheet from the positions, transactions, etc?

      Kind Regards

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

        If you are using PyFolio (and it is working for you, because it doesn't work in most cases) all the values are calculated by PyFolio itself and not by backtrader.

        The code is here: https://github.com/quantopian/pyfolio

        1 Reply Last reply Reply Quote 0
        • André
          André last edited by

          pystats_df = pyfolio.timeseries.perf_stats(returns, positions=positions, transactions=transactions)
          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(); }); }