Stock allocation app


https://shane-sarabdial-portfolio-optimizer-main-nu1baa.streamlitapp.com/

The app is best used on a laptop or desktop but you can use it on mobile if you want. It's hard to get a clear picture of what's going on on mobile because everything is so tightly packed.

I created an app that allocates assets based on 3 features. Max returns, minimum volatility, or max Sharpe ratio. As an investor, you need to decide what fits your needs. The app allows you to place restrictions on the allocation of assets. Without restrictions, the algorithm can allocate all your assets to one stock that you don't want. Eg. if you have Tesla in your portfolio and you want the portfolio that gives you the max returns then most likely the assets will all be allocated to Tesla.

If you don't know what the efficient frontier is google it. I also placed a video in the app for you to reference. This may seem a little blunt but I'm a master in finance student, not an educator. There are so many resources and better educators than I am, use them to your advantage.

How should you use this app?

The efficient frontier is just theory and in the real world, things don't exactly go as planned. I recommend using this app for an IRA or 401K account. Use the asset allocation as a reference point, it's not the be-all-end-all. The correlation matrix is very important, if you have highly correlated stocks then it is most likely your portfolio isn't well diversified. The app allows you to download the stock prices as a CVS if you just want to use it for that purpose. I believe you can pull up to 20 years of data.

I am aware of some bugs in the app. One of them is that sometimes the efficient frontier is graphed incorrectly. This is just a graphing issue the asset allocation is correct, so don't worry too much about it. Most tickers are available but if your looking for some niche stock it may not have info on it. Sometimes the solver will fail to find a solution to your portfolio and you may need to relax the restrictions. Sometimes you have a wide range in volatility and returns the graph may look a little empty. This is on purpose. The efficient frontier is plotting 8000 random portfolios, due to server limitations I can't graph more. Streamlit the service I used to create the app restricts me to 1GB of ram on their servers so plotting more would cause my app to not work.

I'm not a great programmer and my documentation suck but if you want to use it just credit me.

Any suggestion on how to improve the app is appreciated as well as any criticism.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *