Description


Introduction

This project began when I was reading a thesis by a fellow Computer Science student focusing on finance. He developed a machine learning model to predict the ‘direction’ of a stock using various indicators. While he successfully predicted the direction, I debated its relevance due to the dynamic nature of the implied volatility of options across different strike prices, as although a stock could have a implied direction, the expected value of payout should remain consistent in a fair market (See efficient market hypothesis). Additionally, although a stock may trend in a certain direction, its movements are centered around the mean of the distribution with respect to the cost of holding the security, rather than the median which although implies raw directionality, lacks sentiment.

Think about this risk-neutral situation: A die costs $100 to roll; if the die lands on a 6, you gain $600, however if not, (rolls 0-5) you loose your initial investment. Whats the probable outcome?

Test-2.jpg

Above I have modeled the probability distribution that some stock will be ‘x’ price after an allocated amount of time. Note that this Lognormal distribution has skew. This is something very typical of stocks. With this its clear that the medium is lower than the mean. The stocks current price should follow its mean, as it is weighted with the costs associated with the security. However, logically half the distribution lays on either side of the medium, meaning that the directionality inherently associated with this stock will be down. Logically we can say in this situation there is a large chance to gain a lot, and a small chance to loose a little.

Black-Scholes Model

There is an interesting parallel between the distributions of underlying price and European Options. Formally, a European option is defined as ‘the option, but no the obligation, to purchase an underlying asset at a particular date in the future at a set price’. The price of the option at said date in the future (denoted as the expiration date), would logically be the ‘strike price’ (set price we agreed on), minus the cost of the asset at expiration, or zero if that is not profitable upon execution (remember we have the option to execute, not the obligation). The options contract holds inherent value, dictated by the potential volatility the stock has to go over the strike price adjusted with time remaining.

$C =$ $N(d_1)$$S_t$ $-$ $N(d_2)$ $K$$e^{-rt}$

$d_1$ $~=\frac{\ln\left(\frac{S_0}{K}\right) + \left(r + \frac{\sigma^2}{2}\right)t}{\sigma \sqrt{t}}$

$d_2$ $~= d_1 - \sigma \sqrt{t}$

Above is a simplified version of the Black–Scholes model, a mathematical equation that calculates the fair price of a European call option contract, I have broken down the main components of the equation into colors, for which I will explain below.

$C =$ $N(d_1)$$S_t$ $-$ $N(d_2)$ $K$$e^{-rt}$

$N(d_1)$ = Represents probability-weighted value of the stock price at expiration, considering the time value of money and volatility. $d_1$ is the z-score of currently how far in or out the money the underlying is to the strike price; accounting time-value, and volatility, extracting “money-ness”.

$S_t$ = Current price of underlying asset

$N(d_2)$ = Represents probability that option will be in-the-money (ITM), given the distribution of possible stock prices at expiration. $d_2$ is the z-score that represents the position of the stock price relative to the strike price; removing the volatility component over time.

$K$ = Strike price of the option

$e^{-rt}$ = Represents the discount factor for the present value calculation. This discounts the future value of the strike price $K$ to its present value. This is because money in the future is worth less than money now due to time value of money. So this accounts for risk-free interest rate over time.

$N(d_1)$$S_t$ = Represents present value of the underlying, adjusted for the probability that the stock price will exceed the strike price at expiration taking into account the time value of money.