Show HN: CashGraphs – A securities portfolio optimizer (cashgraphs.com)
This is a portfolio optimizer I made to help select portfolios for my clients. I'm a personal financial adviser. I generally put my clients in a mix of low-fee index funds and ETFs and I use this to set an appropriate allocation based on the client's risk tolerance.
I have been working on this as a side project to 1) improve the theoretical underpinnings of my investment recommendations and 2) improve my coding skills with frameworks like Vue and Torch. Here's the repository for the frontend: https://github.com/justinluther502/cashgraphfront.
The frontend site is Vue 2 + Vuetify, and the backend is an AWS lambda function running the Torch optimizer. I am still working out kinks in the backend, particularly cold-start issues because the Lambda function has to load the entire Torch library (~2GB). This occasionally causes the AWS API Gateway to reach max timeout before the Lambda function finishes. Any tips on addressing this would be much appreciated. My first thought is maybe to pare down the Torch library used in the Lambda function because I am only using a small subset of the full library.
The optimizer function itself is designed to overcome several classic shortcomings in Modern Portfolio Theory (MPT) (https://en.wikipedia.org/wiki/Modern_portfolio_theory). Unlike textbook implementations of MPT, this optimizer can utilize non-normal returns distributions, risk metrics besides variance, and can allow the user to specify tail behavior, such as asset correlations behaving normally most of the time but converging to 1.0 in severe downturns. Most of these "fixes" happen during the generation of custom "flavors", or asset selection universes. I have 3 flavors pre-built and there is some information on how they are constructed in the flavor selection page.
Any feedback greatly appreciated!
Justin Luther justinluther@lutherwealth.com https://www.lutherwealth.com
21 comments
[ 5.4 ms ] story [ 17.9 ms ] threadI found the literature on vine copulas to be helpful, particularly the following presentation: https://www.birs.ca/workshops/2013/13w5146/files/Brechmann.p...
I used that as a helpful guide for ways to create some of the more interesting returns simulations.
CashGraphs is more oriented towards passive asset allocaters who want to pick a portfolio that has high expected returns for a given risk-tolerance level.
The Six Asset classic (the default) includes Japanese stocks, and Emerging Market Corporate bonds, but no other international assets?
The basic stock and bond includes only high yield bonds?
The 12 asset includes international stocks and international bonds but then specifically adds additional Canadian stocks and Canadian bonds on top of that?
The next flavor I make will probably use something from: http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_...
And for that one I'd like to use some non-normal distributions and other fancier characteristics.
Provide a UI layer which contains some instructions and points out features and their uses. Looking at the app, I don't quite know what I am supposed to do, or use it to figure out. Perhaps provide some example use cases or personas, alongside the UI layer of instructions.
Running the 6 asset classic, it is slightly amusing that the result is essentially just a classic 70-30 stock/bond mix (risk dependent obviously), and the other 4 assets are <5% of portfolio.
Would be nice if you could include also representative ETFs of a given asset class (I assume they exist) to make the results more actionable.
i suspect it's not going to be free for very long
if it remains open source there's something no other fintech app has
I could not find your backend code to confirm, but I suspect you could convert that Lambda function into a long-running app to avoid cold-start issues. This could be deployed with an app engine (e.g. Heroku, Google App Engine, AWS Elastic Beanstalk), as a Docker container (e.g. AWS EKS), or directly on a server (e.g. AWS EC2). Feel free to contact me via my profile, happy to point you in the right direction.
I noticed lack of below asset classes in the list:
1) US Small Cap Stocks (e.g. Russell 2000 Index) 2) International Large Cap Stocks (MSCI EAFE Index) 3) International Small Cap Stocks (MSCI EAFE Index) 4) Emerging Market Large Cap Stocks (MSCI Emerging Markets Index)
Adding these would greatly improve the optimizer.