Geometric Brownian Motion is a stochastic, non-linear process to model asset price. As a rule of thumb , there is an academic paper that stated that GBM works best for forecasting when limited to max 2 week lookahead. The equations is as follows:
-
- Change in asset price over time interval -
— Asset price of the previous interval -
— The drift or the expected return for the time interval -
— The change in time (one interval) -
— Volatility term (a measure of spread) -
— Change in Brownian motion term
- Install Python3.6+
- Clone this repository
- Provide parameters (initial price, drift, volatility, # generated of paths)
- Run
python3 simulate.py -i <initial price> -d <drift> -v <volatility> -p <paths>
(use--help
for more information)
python3 simulate.py -i 400 -d 0.2 -v 0.3 -p 200