Hi Carl,
Thanks for your questions. Responses inline below.
(i) Our research backtester uses monthly return data and generates monthly portfolio returns. When I tried to run Pyfolio on our output, most of the charts looked pretty wrong. Can Pyfolio work with a monthly return stream? or do we need to use daily returns?
We have made some attempts to allow specification of a duration parameter (for example, sharpe_ratio can take period='monthly'
and it should work correctly). At this point, though, it's untested and likely to not work correctly, specifically for the tear sheets. It would probably require to use the period
kwarg more consistently across the functions. We mostly use daily returns so it's unclear that we'll add that soon, but I'd definitely consider a pull request that adds it.
(ii) We are researching a global fund (primarily US + Europe), so the SPX is not a suitable index for us, and, indeed, we may use our own in-house fundamental indices as benchmarks. Is it possible to replace the S&P 500 as the benchmark index in Pyfolio?
Yes, you should be able to pass in any timeseries as benchmark_rets
, e.g. create_full_tear_sheet(my_returns, benchmark_rets=my_bmark)
.
(iii) We would like to run our systems offline. Is it possible to get Pyfolio to use local files/data frames of index returns, risk free rate, fama french factors etc. rather than downloading them every time?
Yes, absolutely. As long as you have your returns in a (time) series, your positions as well as your transactions in a DataFrame, pyfolio should be able to handle it. This NB should give you an overview of how the input data must look like: https://github.com/quantopian/pyfolio/blob/master/pyfolio/examples/overview_slides.ipynb
Hope that helps, let me know if you have further questions.
Thomas
Disclaimer
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.