Simplified stock price simulation in Python [14 lines of code] using Monte Carlo methods

preview_player
Показать описание
Hi everyone,
this video is showing how you can simulate stock prices using Python. The assumptions are simplified and there are a lot of potential possible improvements.

#Python #Finance #Stockpricesimulation
Рекомендации по теме
Комментарии
Автор

Thanks, great video. Is there a way to evaluate these plots for edge?

neuvocastezero
Автор

Loved your videos, subscribed and now addicted to them. It would have been great to also have considered GBM in your video. May be in future videos.

mmorpe
Автор

Wonderful video. Lots of statistical concepts involved in the setup although the actual code looks very simple. Question about the output however...with 100 simulations and different prices shown in the plot, how do we interpret it? I mean the lines are all over the place with huge variance. How should we read the plot...can you please explain briefly in the reply? Thank you!

flyingsalmon
Автор

Could you please explain why you set the 'returns' as 'np.log' which is different from the setting of 'cumprod()' on the previous video? If they are different, could you explain their cons & pros?

hyungjoohnkim
Автор

hi, why cumprod() when simulating stock prices? thank you so much

rrtt
Автор

Hi, great Video :)

Could you make an extension, how to do this with a multi asset portfolio (e.g. multiple stocks or even bonds included)?

Cheers

a.ammann
Автор

How to get average each point in simulation?

risalandipr
Автор

it says:

ModuleNotFoundError Traceback (most recent call last)
Cell In [7], line 1
----> 1 import yfinance as yf
2 import numpy as np
3 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'yfinance'

what do I do?

djrkm
Автор

the returns you took were log returns, shouldn't we be doing cumSum instead of cum prod?
so price = initial price * exp( cum_sum(1+log(r)) at each time from time ranging from 1 to 252

VaishnaviBhardwaj-dc
Автор

Hello again mate, i have this issue in my terminal: " ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
yahoo 0.1 requires requests==1.1.0, but you have requests 2.25.1 which is incompatible."

TheGermanenrique
Автор

line 9 & 15 is causing issues, any idea why i am getting (Length of passed values is 250, index implies 1)

fauziatahir
Автор

You called this video "simplified" stock price simulation. How would you make it more realistic?

benjamintreitz