quantopian / pyfolio

Portfolio and risk analytics in Python
https://quantopian.github.io/pyfolio
Apache License 2.0
5.62k stars 1.76k forks source link

Add net exposure line to the Long/Short Exposure plot #296

Open justinlent opened 8 years ago

justinlent commented 8 years ago

Just subtract Short from Long and plot the difference as a timeseries.
Also a couple of minor formatting changes.

Long exposure = Green Short exposure = Red Difference line = Black dashed

Make Long exposure line positive number, and Short exposure line all negative numbers: (input from @Jstauth) rather than showing both as positive (abs) we should show the long as positive and short as negative, then we could overlay the net exposure as a line)

image

justinlent commented 8 years ago

See conversation thread here for description of the bug and possible fixes: https://github.com/quantopian/pyfolio/pull/301

justinlent commented 8 years ago

@adeychman just FYI for you