Basics
The Sharpe ratio is the difference between your portfolio's performance and the risk free rate, all divided by the standard deviation of the portfolio returns.
If that's too confusing, just know that a higher Sharpe ratio is better, because it means higher returns and lower volatility.
Given expected returns and correlations among a set of securities (a financial instrument that can be bought or sold), this value can be maximized using historical data.
Plenty of websites already do this today, such as portfoliovisualizer.com (although they provide a suite of useful tools and might be intimidating). To my knowledge, no tools actually consider the tax implications of selling positions to reallocate your portfolio. This website accomplishes this by decreasing the returns in the optimization function in accordance with the taxes you would owe based on your income and tax filing status.
Instructions
There is no optimal portfolio, but that does not justify keeping 90% of your net worth in a single company.
"But I don't want to pay taxes on my gains!"
I know. Nor should you. Taxes cause a real drag on your portfolio, and you should trade off the impact it has on your returns.
"But that's hard!"
Not really. But this website makes it trivial. Here's how it works:
How It Works
-
Upload your portfolio holdings (Vanguard for now)
- Go to vanguard.com and export your brokerage account holdings at the lot-level with cost basis information. You can change the information inside in any way, but the code that parses it expects two lines of headers followed by a table that includes columns
-
Fill in your income, filing status, and risk-free rate of return.
- Income is required to calculate your marginal tax rate
- Filing Status is required to calculate your marginal tax rate
- Risk-Free Rate is required to calculate the Sharpe ratio and can affect the optimization but probably will not for reasonable choices
-
Interpret the results!
- Original: Your current portfolio's performance metrics of return, standard deviation, and Sharpe ratio
- Optimized: The portfolio you should have if you didn't have to pay taxes, but shows how it would perform if you did
- Tax Optimized: The portfolio you should have, accounting for the impact of the taxes you would need to pay
Additional Information
- Historical data is provided by free Yahoo Finance API calls, which is limited to a single daily close price.
-
Portfolio holdings are uploaded at the lot-level, because selling different lots incurs different taxes.
This optimization assumes you use a MinTax cost basis, selling the lots that incur the least taxes proportional to the dollar amount sold.
This facilitates transferring money among asset classes while minimizing taxes.
If you decide to act on these results, you would need to follow the same strategy for selling lots in order for the results to be accurate.
Feature Requests
- Enable optimizing across more assets than solely what was uploaded
- Enable setting minimum and maximum bounds on each security
- Provide graphs demonstrating expected returns considering taxes owed, and the break-even time horizons (currently available through the github repository and not the website
- Provide another optimization which incurs no taxes but leverages any losses that could be realized in the process of optimizing the portfolio.
- Provide a sample CSV for users to confirm what the expected file input looks like.
Disclaimers
- Invest at your own risk.
- Past performance is not indicative of future results. It never has been and it never will be.
- The optimizations here are based on historical results, and even then the code could be incorrect.
- Past performance calculation is based on data from Yahoo Finance's free APIs