See more at this blog
This portfolio tearsheet is mainly generated using 2 libraries, openbb
and quantstats
- Used
openbb.portfolio.load
to load my transactions data from excel file: portfolio_data.xlsx and then calculate my portfolio return - Used
quantstats.reports.html
to generate a tearsheet for my portfolio. See the output here: Portfolio tearsheet
So, if you want to reuse this template, just merely change this two input:
- data inside excel file here:
- benchmark symbol you want to compare with
But, take note that the data source is from Yahoo Finance, so when you want to change the stock ticker in excel file, please refer that ticker symbol in Yahoo Finance.
Limitations:
- didn't include dividends when calculating dividends
List of some other interesting finance github repo to look on: