Jan 2022

## Modeling Asset Prices with Python

One landmark theorem in Financial Economics is the Efficient Market Hypothesis (EMH). This theorem posits that in an arbitrage-free market, we can model an asset’s present price as the discounted expected future price:

We can take the natural logarithm

to show that the natural logarithm of asset prices follows a random walk – the best forecast for prices is simply the current price. As such, applying regression methods from basic ARIMA models to advanced neural networks will fail – the models will simply repeat the last observation in the training data.

Instead, we can successfully predict asset prices by assuming their returns follow Geometric Brownian Motion (GBM):

Here, the change in returns is given by the expected value plus volatility, both multiplied by the last observed price. For the log of returns, and using Ito’s Lemma, one can write the solution to this differential equation as

where B_t represents a Brownian motion process. The above formula is how we will forecast liquid asset prices in this article. For models in other asset types (ie illiquid assets), one may simply substitute the GBM equation in Ito’s Lemma and derive a new formula for forecasting.

We first import our packages:

For today, we forecast Bitcoin using data from August 01, 2020 to November 15, 2021. Our data comes from Yahoo Finance.      