Compute with option prices in finance.
In this exercise we are going to consider the pricing of so-called Asian
options. An Asian option is a financial contract where the owner earns money
when certain market conditions are satisfied.
The contract is specified by a strike price \(K\) and a maturity time \(T .\) It
is written on the average price of the underlying stock, and if this average
is bigger than the strike \(K\), the owner of the option will earn the
difference. If, on the other hand, the average becomes less, the owner
recieves nothing, and the option matures in the value zero. The average is
calculated from the last trading price of the stock for each day.
From the theory of options in finance, the price of the Asian option will be
the expected present value of the payoff. We assume the stock price dynamics
given as,
$$
S(t+1)=(1+r) S(t)+\sigma S(t) \epsilon(t)
$$
where \(r\) is the interest-rate, and \(\sigma\) is the volatility of the stock
price. The time \(t\) is supposed to be measured in days, \(t=0,1,2, \ldots\),
while \(\epsilon(t)\) are independent identically distributed normal random
variables with mean zero and unit standard deviation. To find the option
price, we must calculate the expectation
$$
p=(1+r)^{-T} \mathrm{E}\left[\max \left(\frac{1}{T} \sum_{t=1}^{T} S(t)-K,
0\right)\right]
$$
The price is thus given as the expected discounted payoff. We will use Monte
Carlo simulations to estimate the expectation. Typically, \(r\) and \(\sigma\) can
be set to \(r=0.0002\) and \(\sigma=0.015 .\) Assume further \(S(0)=100\)
a) Make a function that simulates a path of \(S(t)\), that is, the function
computes \(S(t)\) for \(t=1, \ldots, T\) for a given \(T\) based on the recursive
definition in (8.17). The function should return the path as an array.
b) Create a function that finds the average of \(S(t)\) from \(t=1\) to \(t=T\).
Make another function that calculates the price of the Asian option based on
\(N\) simulated averages. You may choose \(T=100\) days and \(K=102\)
c) Plot the price \(p\) as a function of \(N\). You may start with \(N=1000\).
d) Plot the error in the price estimation as a function \(N\) (assume that the
\(p\) value corresponding to the largest \(N\) value is the "right"price). Try to
fit a curve of the form \(c / \sqrt{N}\) for some \(c\) to this error plot. The
purpose is to show that the error is reduced as \(1 / \sqrt{N}\).
Name of program file: option_price.py.
If you wonder where the values for \(r\) and \(\sigma\) come from, you will find
the explanation in the following. A reasonable level for the yearly interest-
rate is around \(5 \%\), which corresponds to a daily rate \(0.05 / 250=0.0002 .\)
The number 250 is chosen because a stock exchange is on average open this
amount of days for trading. The value for \(\sigma\) is calculated as the
volatility of the stock price, corresponding to the standard deviation of the
daily returns of the stock defined as \((S(t+1)-S(t)) / S(t)\). "Normally", the
volatility is around \(1.5 \%\) a day. Finally, there are theoretical reasons
why we assume that the stock price dynamics is driven by \(r\), meaning that we
consider the riskneutral dynamics of the stock price when pricing options.
There is an exciting theory explaining the appearance of \(r\) in the dynamics
of the stock price. If we want to simulate a stock price dynamics mimicing
what we see in the market, \(r\) in Equation \((8.17)\) must be substituted with
\(\mu\), the expected return of the stock. Usually, \(\mu\) is higher than \(r
\cdot \diamond\)