Stock Price Modeling Based on Stock Prices Following Geometric Brownian Motion

Long-term returns of stock market should be greater than the yields of long-term bonds, because otherwise, no one would buy stocks, causing stock prices to fall, price-to-earning ratios of stocks to rise. In the meantime, Everyone would just buy long-term bonds, causing bonds' prices to rise and their yields drop.

Since stocks are thought to be riskier than bonds, there is a "risk premium" associating with the risk.

For example, we the 30-year bond yield is 2%, stock market return should be greater than 2%, let's say 7%, the 5% difference is the "risk premium".

This 7% can be viewed as the mean of stock market return.

Geometric Brownian Motion

Brownian motion means constant random movements. Stock price "return rates" follows Brownian motion which means stock prices follow a geometric Brownian motion.

Fluctuation

Stock prices fluctuate. No one knows the short-term movement of stock prices. One way to guess how they move is to use the normal distribution to model the "returns" of stock market.

If the return of a stock a normally distributed, its price is normally distributed.
Time Price ln(Price) Return
1 100 ln(100) 5%
2 100e5% = 105.13 ln(100) + 5% NA
The 5% shown in the above table can fluctuate and follows a normal distribution, and according to the definition of log-normal distribution: "the logarithm of random variables of a log-normal distribution are normally distributed", the stock prices follow a log-normal distribution.

Modelling

We model the stock price movement by using the javascript "Math.rendom()" method. 


Mean of monthly return:
 %
 Standard deviation of monthly return:
 % 
Time:
 month(s)

Comments

Popular posts from this blog

How to Make A Reusable Image Slideshow HTML Component With Vanilla JavaScript

HTML Tags and Inline CSS that Work In Plotly.js Title

How to Type Spaces In HTML Input And Display In the Browser