Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion empyrical/perf_attrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@ def compute_exposures(positions, factor_loadings):
2017-01-02 0.821872 1.520515
"""
risk_exposures = factor_loadings.multiply(positions, axis='rows')
return risk_exposures.groupby(level='dt').sum()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test we can add/modify to go along with this change?

return risk_exposures.groupby(level=0).sum()