You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we only officially support daily returns and positions streams. Some tear sheets and plots work okay with other frequencies of data (e.g. monthly). Other plots and performance functions, namely the beta and Fama-French factors, will fail to compute accurate measures because they compare their daily reference data to whatever is thrown at them.
It would definitely be useful to support different frequencies if we can do it in a way that's elegant. I'm not sure what the best way to do this is, open for input and help.
The text was updated successfully, but these errors were encountered:
gusgordon
changed the title
Add support for different frequencies of data
Investiage adding support for different frequencies of data
Dec 8, 2016
gusgordon
changed the title
Investiage adding support for different frequencies of data
Investigate adding support for different frequencies of data
Dec 8, 2016
@kitovh has expressed interest in looking into this! Duplicate of #456.
I took a cursory glance at the code, and this issue looks like it'll take more reading than writing code. Unfortunately I'm not free right now to whip up a PR, but I'd be happy to help anyone who wants to take this up.
Most of pyfolio's output is a matplotlib graph. The easiest thing to do would be to use pandas' built-in plotting capabilities, and do something like returns.plot(), and then adding legends, colors, etc. afterwards if necessary. This way, all graphs will have x tick labels with the correct time period. It looks like most pyfolio functions are already doing this, but it would be good to make sure they all did.
Most of the summary stats are simply call-throughs to empyrical. Luckily for us, empyrical already supports different time periods, and it's only a matter of making sure pyfolio sets the right flags. The nicest thing to do would be to make pyfolio smart enough to read the freq argument of the DatetimeIndex in the input dataframes.
There might be some other problems that I'm not anticipating... Particularly the perfomance attribution and Bayesian tear sheets, since they perform statistical analyses that assume daily frequency.
Currently, we only officially support daily returns and positions streams. Some tear sheets and plots work okay with other frequencies of data (e.g. monthly). Other plots and performance functions, namely the beta and Fama-French factors, will fail to compute accurate measures because they compare their daily reference data to whatever is thrown at them.
It would definitely be useful to support different frequencies if we can do it in a way that's elegant. I'm not sure what the best way to do this is, open for input and help.
The text was updated successfully, but these errors were encountered: