quantopian / pyfolio

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

Misleading "Daily Trading Volume" Plot #516

Open cyniphile opened 6 years ago

cyniphile commented 6 years ago

Right now the DTV plot created by plot_daily_volume only plots days where there was indeed trading volume, and connects those plotted days with line making it seem like trading volume linearly changed between days. Leads to a non-sense tear like this: image

As a fix, I added the below code here:

https://github.com/quantopian/pyfolio/compare/master...cyniphile:patch-1

Could make a PR if that helps.

twiecki commented 6 years ago

@cyniphile Good catch. Yes, a PR would be appreciated.