quantopian / pyfolio

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

Create full tear sheet from transactions only #359

Open yonil7 opened 7 years ago

yonil7 commented 7 years ago

I would like to be able to export all the trades from my broker and create a full tear sheet using this data only. (without passing also returns series)

Example to this can be seen in R Blotters package:

Blotter's scope is focused on the heirarchy of how transactions accumulate into positions, then into portfolios and an account. 'Transactions' are typically trades in an instrument - an amount bought or sold at a price and time. But other transaction types include splits, dividends, expirations, assignments, etc. ... Those transactions are aggregated into 'positions'. Positions are held in a 'portfolio' that contains positions in several instruments ... Portfolios are associated with an 'account'. An account is modeled as a cash account where investments, withdrawals, management fees, and other capital account changes are made. http://artax.karlin.mff.cuni.cz/r-help/library/blotter/html/blotter-package.html

twiecki commented 7 years ago

That would be a good feature. We started with this somewhat (although it's not quite what you need), here: https://github.com/quantopian/pyfolio/blob/master/pyfolio/utils.py#L635

zach11155 commented 12 months ago

I would also be very interested in this