cristianleoo/montecarlo-portfolio-management — reverse-engineered prompt
Reverse engineered prompt
Build me a Python web app for portfolio management that lets someone pick stock tickers, choose a historical date range, and run a Monte Carlo simulation to see possible future portfolio outcomes.
I want the app to feel simple and interactive. The user should be able to either enter portfolio weights with a total starting investment, or enter actual dollar amounts for each stock and have the app calculate the weights. Let them edit the weights in a table, make sure the totals make sense, and optionally optimize the portfolio for the best Sharpe Ratio or a more balanced allocation.
After the user sets the number of simulations, time horizon, and risk free rate, they should click a button to run the simulation. Show clear results like expected return, volatility, Value at Risk, and final portfolio value ranges. Include interactive charts for cumulative returns and the distribution of final outcomes.
Use Streamlit for the interface and Plotly for charts. Look up current docs online if needed.
Want more depth? Deep Reverse