2
$\begingroup$

This is an exercise from Mark Joshi's book (exercise 3.6):

A stock is worth 100. Each month its value increases or decreases by precisely 10. The riskless bond is worth $e^{rt}$ at time t years with r equal to 5% Price a four-month European put option struck at 110.

At the end of the book, Joshi provides the solution 13.06. Unfortunately that's not what I find: I get 15.22. Since Joshi does not show his computation, I am wondering where the difference comes from. I use the following Python script for the computation:

import math

def get_risk_neutral_prob(S, S1, S2, r, delta_t):
    Sp = max(S1, S2)
    Sm = min(S1,S2)
    if Sm == Sp:
        return 1/2
    return (math.exp(-r*delta_t) * S - Sm)/(Sp-Sm)

def payoff(S):
    return max(110-S, 0)
r = 0.05
delta_t = 1/12


def get_price(S, N):
    if N == 0:
        return payoff(S)
    S1 = S+10
    S2 = S-10
    p = get_risk_neutral_prob(S, S1, S2, r, delta_t)
    return math.exp(-r*delta_t) * (p * get_price(S1, N-1) + (1-p) * get_price(S2,N-1))



print(get_price(100,4))

As you can see, my computation is straightforward. I first compute the risk-neutral probability, and then the discounted expected value of the payoff, recursively.

For one month, I did it by hand and my result, 10.372, agrees with what the script tells me.

$\endgroup$
  • 2
    $\begingroup$ You have a bug in your script - the function get_risk_neutral_prob should return (math.exp(r*delta_t) * S - Sm)/(Sp-Sm) instead. You have an extra minus sign. $\endgroup$ – Chris Taylor Sep 2 at 16:38
  • $\begingroup$ Indeed, thank you very much! $\endgroup$ – user11823918 Sep 3 at 5:58
1
$\begingroup$

Answer was provided by Chris Taylor: the formula for the risk-neutral probability was off by a minus sign, it should be $$ p = \frac{e^{r \Delta t} S - S_m}{S_p - S_m} $$

$\endgroup$
0
$\begingroup$

I cannot comment (low reputation) so I add an answer. In Python, you should write:

delta_t = 1.0/12

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.