Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

montestocks

Fetch Historical Data:

The function first retrieves the stock's historical data using yfinance. It extracts the closing prices.

Calculate Log Returns:

Log returns are calculated from the historical closing prices. These are used as the basis for the Monte Carlo simulation.

Monte Carlo Simulation:

The simulation generates random returns for the next days based on the historical log returns. It then calculates the potential prices for each day, assuming the stock price follows a geometric Brownian motion (a common thing in financial modeling).

Price Prediction:

The function returns the minimum, maximum, mean, and median potential prices for the future days. These values give a range of possible outcomes for the stock price.

About

Monte Carlo simulation for stocks

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages