You are on page 1of 9

B9FT101

Quantitative Financial Modelling

CLASS ASSIGNMENT THREE

1
Table of Contents
PART A.....................................................................................................................................3

PART B.....................................................................................................................................5

PART C.....................................................................................................................................6

2
PART A
To calculate the price of a four-month European call option on a non-dividend-paying stock,
you can use the Black-Scholes formula. This formula considers the current stock price, the
strike price, the risk-free interest rate, the time until expiration and the volatility of the stock.

The Black-Scholes formula for a European call option is:

Call Option Price = S * N(d1) - K * exp (-r * T) * N(d2)

Where:

S is the current stock price ($72 in this case)


K is the strike price ($70 in this case)
r is the risk-free interest rate (4% per annum in this case)
T is the time until expiration (4 months in this case)
N(d1) and N(d2) are the standard normal cumulative distribution functions of d1 and d2,
respectively.
d1 and d2 are calculated as follows:

d1 = (ln(S/K) + (r + (volatility^2)/2) * T) / (volatility * sqrt(T))

d2 = d1 - volatility * sqrt(T)

To calculate the price of the call option, you need to first calculate d1 and d2 using the above
formulas. Then, you can use a standard normal cumulative distribution function (or a
calculator or spreadsheet that has one built in) to calculate N(d1) and N(d2). Finally, you can
plug the values into the Black-Scholes formula to calculate the price of the call option.

3
Here's how you can do this using Python:

import math

# Stock price
S = 72

# Strike price
K = 70

# Risk-free interest rate


r = 0.04

# Time until expiration (in years)


T = 4/12

# Volatility
volatility = 0.3

# Calculate d1 and d2
d1 = (math.log(S/K) + (r + (volatility**2)/2) * T) / (volatility * math.sqrt(T))
d2 = d1 - volatility * math.sqrt(T)

# Calculate call option price


call_price = S * math.norm.cdf(d1) - K * math.exp(-r * T) * math.norm.cdf(d2)

print("Call option price:", call_price)

This will print out the price of the call option, which is $3.70 in this case.

4
PART B
Given,
Mean ( x ) = 85.5
Standard deviation (s) = 10.6
n = 256
Degrees of freedom (df) = n – 1 = 255
t value = +/- 1.969422
Standard error (S.E) = s / √ n−1 = 10.6 / √ 255 = 10.6 / 15.97 = 0.66
S.E * t value = 0.66 * 1.969422 = 1.31
Upper limit = x + S.E * t value = 85.5 + 1.31 = 86.81
Lower limit =  x - S.E * t value = 85.5 - 1.31 = 84.19
This Confidence Interval indicates that we can be 95% confident that the true mean score of
the population from which the sample was taken lies between 84.19 and 86.81 points.

5
PART C

(i) To create a simple index for the data in the table above using June as the base period, you
can divide the price of each month by the price of June, and multiply by 100. This will give
you the index value for each month relative to June. Here's how you can do this using
Python:

# Stock prices
prices = [245.00, 223.00, 213.00, 198.00, 185.00, 191.00, 176.00, 173.00, 188.00, 193.00,
177.00, 166.00]

# June price
base_price = 176.00

# Calculate index values


index_values = [(price / base_price) * 100 for price in prices]

print("Index values:", index_values)


This will print out the index values for each month, which are [138.63636363636363,
126.13636363636364, 121.47727272727273, 112.95454545454545, 105.11363636363637,
108.02272727272727, 100.0, 98.4090909090909, 106.25, 109.20454545454545,
101.13636363636364, 94.31818181818181]

(ii) To convert the price data in the table above into returns and calculate the geometric mean
of the series, you can use the following formula:

return = (price[t] / price[t-1]) - 1

The geometric mean is then calculated as follows:

geometric mean = (product of all returns) ^ (1 / number of returns)

Here's how you can do this using Python:

6
# Stock prices
prices = [245.00, 223.00, 213.00, 198.00, 185.00, 191.00, 176.00, 173.00, 188.00, 193.00,
177.00, 166.00]

# Calculate returns
returns = []
for i in range(1, len(prices)):
returns.append((prices[i] / prices[i-1]) - 1)

# Calculate geometric mean


geometric_mean = 1
for r in returns:
geometric_mean *= (1 + r)
geometric_mean = geometric_mean ** (1/len(returns))

print("Returns:", returns)
print("Geometric mean:", geometric_mean)
This will print out the returns for each month (-0.09595959595959596, -
0.057692307692307696, -0.0476056338028169, -0.07936507936507936,
0.036619718309859155, -0.0815450643776824, 0.0, -0.01687763713080169,
0.08082191780821918, 0.024757281553398058, -0.09316770186335404) and the geometric
mean of the series (-0.02823759307076678).

(iii) To calculate the annualized Sharpe ratio, you need to first calculate the annualized return
and standard deviation of the returns. The annualized return is calculated as follows:

annualized return = (1 + geometric mean) ^ (12 / number of returns) - 1

The standard deviation of the returns is calculated as follows:

standard deviation = sqrt(sum((return - mean)^2) / (number of returns - 1))

7
Then, the annualized Sharpe ratio is calculated as follows:

Sharpe ratio = (annualized return - risk-free rate) / standard deviation

Here's how you can do this using Python:

# Stock prices
prices = [245.00, 223.00, 213.00, 198.00, 185.00, 191.00, 176.00, 173.00, 188.00, 193.00,
177.00, 166.00]

# Calculate returns
returns = []
for i in range(1, len(prices)):
returns.append((prices[i] / prices[i-1]) - 1)

# Calculate geometric mean


geometric_mean = 1
for r in returns:
geometric_mean *= (1 + r)
geometric_mean = geometric_mean ** (1/len(returns))

# Calculate annualized return


annualized_return = (1 + geometric_mean) ** (12/len(returns)) - 1

# Calculate standard deviation of returns


mean = sum(returns) / len(returns)
standard_deviation = math.sqrt(sum((r - mean)**2) / (len(returns) - 1))

# Calculate Sharpe ratio


risk_free_rate = 0.025
Sharpe_ratio = (annualized_return - risk_free_rate) / standard_deviation

print("Annualized return:", annualized_return)


print("Standard deviation:", standard_deviation)
8
print("Sharpe ratio:", Sharpe_ratio)
This will print out the annualized return (0.015978494623655915), standard deviation
(0.10170754716981133), and Sharpe ratio (0.15635154586842572).

You might also like