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

ENH Allow cum_returns to accept DataFrame #39

Closed gusgordon closed 7 years ago

gusgordon commented 7 years ago

Adds support for passing a DataFrame to stats.cum_returns. Adds related tests.

I messed up the commits, so I made a new PR; sorry about that.

cc @richafrank @twiecki

gusgordon commented 7 years ago

Thanks @richafrank! We were doing that before anyway, and I think if we want to just replace the NaNs in the first row we would have to break apart the logic for different types.

gusgordon commented 7 years ago

I opened this issue https://github.com/quantopian/empyrical/issues/40