Is there anyway to plot/visualize total paid commissions?
vladisld last edited by
@kitmir7 I'm not sure there is a built-in analyzer that provide this info ready out of the box, but it is pretty easy to create your own.
Basically you need to create a custom Analyzer ( inherited from bt.Analyzer) where it will retriev the commissions in its 'notify_order` method.
You then need to create a custom Observer that will gather the commissions from the above Analyzer. This observer may then be plotted.
Probably others may point an easier method.
More info about analyzers and observers:
For the example of Analyzer/Observer interaction take a look at the backtrader/observers/benchmark.py for Observers and backtrader/analyzers/timereturn.py for Analyzer
@vladisld Thanks a lot. I will look into this.
I somehow thought that could have been built in - Could have been useful though.