This is a streamlit app, StockApp, for finding the
allocations
In general, a path dependent GBM can be written in the form,
for a single stock, as the SDE
Here, we model the stock prices as a multivariate GBM where the drift vector and volatility matrix coefficients are estimated using exponentially weighted moving averages (EWMAs). The optimizaiton problem to solve is then the quadratic problem
where
The app prints the allocations for stocks with non-zero weight, the
optimal growth value under such allocations, the drift
and volatility of the portfolio, and the daily 99.9% Value-at-Risk,
i.e. worst-case loss on a given day, which has 0.1% chance of occurring,
per the fitted normal distribution with mean
The data-provider is AlphaVantage. This app uses my premium API key to download data. The limit is 30 stocks per minute.