Skip to content

Commit

Permalink
int division bug in roundtrips
Browse files Browse the repository at this point in the history
  • Loading branch information
a-campbell committed Nov 21, 2015
1 parent 2970efe commit 57bcbcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyfolio/round_trips.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def extract_round_trips(transactions):
if invested == 0:
round_trips['returns'].append(0)
else:
round_trips['returns'].append(pnl / invested)
round_trips['returns'].append(1. * pnl / invested)

This comment has been minimized.

Copy link
@twiecki

twiecki Nov 23, 2015

Contributor

from __future__ import division


if len(round_trips) == 0:
return pd.DataFrame([])
Expand Down

0 comments on commit 57bcbcb

Please sign in to comment.