quantopian / pyfolio

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

Fama-French plot should not throw exception if backtest returns start earlier than Fama-French factors #303

Closed justinlent closed 7 years ago

justinlent commented 8 years ago

the proper behavior should be something like, only start the rolling Fama-French factors from the time which the backtest returns indexes AND the Fama-French indexes intersect

image

eigenfoo commented 7 years ago

It appears that the Fama French factors go back to at least the beginning of 1950. Backtests that long would surely encounter numerous problems all over pyfolio: data source issues, extremely long compute times, difficult-to-read graphs, etc.

The main use case of pyfolio is not to give basic analysis for long periods of time, but to provide detailed analysis of a relatively short period of time (say, 2-5 years): as such, there isn't much support for long backtests. I'll close this issue now, as the fix to this problem is slightly out of scope.