quantopian / empyrical

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

Should returns be lognormal or normal #73

Closed rsheftel closed 6 years ago

rsheftel commented 6 years ago

In the comments for the stats.cum_returns() function it states:

Notes
-----
For increased numerical accuracy, convert input to log returns
where it is possible to sum instead of multiplying.

But the math of function itself does not sum the returns but rather multiplies each return. So the notes state that log returns should be provided, but the math assumes normal returns. This is confusing, which should it be?

rsheftel commented 6 years ago

I answered my own question, all returns are normal (simple). If there are no objections I will submit a PR that removes the confusing comments.

ssanderson commented 6 years ago

I think the intent of this docstring is to encourage users to not use this function if numerical precision is a concern, rather than trying to emply that the function expects log returns. Agreed that this is worded confusingly.

rsheftel commented 6 years ago

Now that #82 is merged, this can be closed.