Getting to portfolio performance data.
-
I'm in the process of porting a "tearsheet" writer from QSTrader. A very good friend wrote this code and I would like to have it available in BT. Check out the image below to see some of the output. Similar to Pyfolio, but focuses on the things that I believe are most important when developing systems.
I'm close to having this working but could use a little guidance as to how to get to the following data:
avg_bot avg_price avg_sld cost_basis init_commission init_price market_value net net_incl_comm net_total realised_pnl total_bot total_commission total_sld unrealised_pnl
I see much of what I need being derived or created in tradeanalyzer.py, but not clear to me how I access this from the analyzer I am creating. Help would be appreciated. I only see self._returns, self._positions, self._transactions and self._gross_lev from where I am working which may be enough to calculate these, but I feel like this is being done somewhere else for me.
Help much appreciated.
-
Agree that
pyfolio
has a lot of excessive information.
If you would consider to addcalmar ratio
to your stats, that would be really appreciated. -
maybe a trades chart with up and down arrows for when the trades were entered and exited, I use it to generally eyeball and do a sanity check on when the trades occurred and whether I as a human agree with it :)
-
QSTrader's tear sheet is great.
Would be nice to get a confusion matrix as well!
-
@jaikumarm The trade chart is possible today with the standard cerebro.plot() function if you have the appropriate analyzers configured.