Skip to content

Vedant-0102/Monte-Carlo-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monte Carlo Stock Simulator

Simulates future stock prices using Monte Carlo simulation. It fetches historical prices from yfianance , calculates daily returns. Runs multiple simulations. Visualizes possible future price.

What is Monte Carlo Simulation?

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.

Simulation:

Simulation

How to Run

  1. Run main_animated.py: # For single stock animation

    python main_animated.py

    OR

    Run main_multi_stock.py: # For multiple stock animation

    python main_multi_stock.py
  2. Enter the stock ticker [Stock Code] (comma-separated or space separated for multiple stocks).

  3. Enter time horizon (days).

  4. Enter number of simulations.

API

  • yfinance for stock data.

About

Monte Carlo Simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages