quantopian / empyrical

Common financial risk and performance metrics. Used by zipline and pyfolio.
https://quantopian.github.io/empyrical
Apache License 2.0
1.27k stars 397 forks source link

Stripping of name will have no effect if cached Fama-French exists #64

Open twiecki opened 6 years ago

twiecki commented 6 years ago

Pyfolio calls https://github.com/quantopian/empyrical/blob/master/empyrical/utils.py#L309 which reads the Fama-French factors from a cached file if it exists. Thus, users upgrading pyfolio and empyrical will get the error that column 'Mom' does not exist, as the old name with the white-space is still in the cache.

The problem is in this PR: https://github.com/quantopian/empyrical/pull/63

CC @vikram-narayan

vikram-narayan commented 6 years ago

if you clear your local cache, this problem will be fixed; do you think it's worth adding a check for this particular case? happy to add one if you think so, just not sure how common the issue is

twiecki commented 6 years ago

Yes, but a user will not know what to do and just receive a very odd error.