Simulates future stock prices using Monte Carlo simulation. It fetches historical prices from yfianance , calculates daily returns. Runs multiple simulations. Visualizes possible future price.
A Monte Carlo simulation is a computerized mathematical technique that models risks and uncertainty in complex systems by running thousands of scenarios with random inputs
It is a statistical technique that uses random sampling to estimate mathematical functions and predict outcomes. In finance, it helps model the uncertainty and variability of stock prices by generating many possible future scenarios based on historical data.
Using multiple simulations we can visualize future stock prices and assess risk, helping with decision-making and risk management.
-
Run
main_animated.py: # For single stock animationpython main_animated.py
OR
Run
main_multi_stock.py: # For multiple stock animationpython main_multi_stock.py
-
Enter the stock ticker [Stock Code] (comma-separated or space separated for multiple stocks).
-
Enter time horizon (days).
-
Enter number of simulations.
yfinancefor stock data.
