quantopian / pyfolio

Portfolio and risk analytics in Python
https://quantopian.github.io/pyfolio
Apache License 2.0
5.64k stars 1.77k forks source link

Not able to view the tear sheet (summarized details of the backtested strategy) #679

Open stanj98 opened 3 years ago

stanj98 commented 3 years ago

Problem Description

Please provide a minimal, self-contained, and reproducible example:

    perf = run_algorithm(
        start=start,
        end=end,
        initialize=initialize,
        capital_base=10000,
        data_frequency='minute',
        handle_data=handle_data,
        bundle='csvdir'
    )

   sma_results = perf
   returns, positions, transactions = pf.utils.extract_rets_pos_txn_from_zipline(sma_results)
   pf.create_full_tear_sheet(returns, positions=positions, transactions=transactions)

Please provide the full traceback:

MatplotlibDeprecationWarning:
The is_last_row function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use ax.get_subplotspec().is_last_row() instead.

FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)

Please provide any additional information below: The strategy is backtested successfully and I've got the image file saved. The image file contains all the necessary graphs except the initial tear sheet that should show data such as the annual return, backtesting months, shape ratio, etc. I want to view this data: https://miro.medium.com/max/227/1*RJ8jYWyBohkQxArzzMZdNQ.png. Unfortunately, it's not showing up in the image file. Does anyone know how to retrieve this info?

This is the image that's generated: shorturl.at/mxAR6

Versions