Starting from:
$35

$29

Programming Assignment 8: Pricing an American-Option via Trinomial Trees Solution

    • Trinomial Trees and Lattices

Pretty much everything parallels the Binomial Tree from a conceptual sense. If the stock price at discrete time step k is denoted by Sk. In this case, the process Sk is speci ed as
8
< uSk
Sk+1
=
Sk


u



: Sk

with probability pu;
with probability pd;
with probability 1    pu    pd:

Just as with the binomial tree whose leaves can be combined to form the bino-mial lattice, you can get a trinomial lattice from a trinomial tree. To ensure the martingale property
EfSk+1 j Skg = R    Sk;

where R = er Tn , as with the Binomial Tree. We need to assign1 p

    • =

pu    =

e2(T=n)


p



1

2








pu





!










p1u


R


pu







































p




p


!
2






R



u






pd  =
p



p1u





u

















Just as with the binomial lattice. you can use (k; i) to denote an arbitrary vertex on the trinomial lattice. The vertex (k; i) is connected to f(k + 1; i + 1); (k + 1; i); (k + 1; i 1)g with the appropriate probabilities along the appropriate arcs. If V (k; i) is value of the option at (k; i), for the european call option we have the recursion

V (k; i) =
maxf0; S0    ui
Kg

V (k+1;i  1)
if (k; i) is a terminal node

)  V (k+1;i)+p




pu  V (k+1;i+1)+(1  pu  pdR

d

otherwise

The option price is V (0; 0).

You are going to do a little more than this for this programming assignment.


    • You can verify this at your leisure.




1





    • Part 1: Pricing an American-Option using a Trinomial Model by Recursion

Using my C++ program american option pricing by binomial model.cpp on Com-pass as reference, write a C++ program that takes as command-line input the values of T; N; r; ; S0 and K, and presents the value of an American-Option using a trinomial model.


Input: The command-line input is the same as what I have for the C++ code that priced the European option in lesson 6 of my notes.

Output: A sample output that I expect from your code is shown in  gure

??



















Figure 1: Sample output (Note: 20 divisions will take some time to run on your computer. Be patient. The next part of this assignment will be able to handle a large number of divisions, as you will see.).



    • Part 2: Pricing an American-Option using a Trinomial Model by Dynamic Programming

Using my C++ program american option pricing by dynamic programming.cpp on Compass as reference, write a C++ program that takes as command-line input the values of T; N; r; ; S0 and K, and presents the value of an American-Option using a trinomial model.


Input: The command-line input is the same as what I have for the C++ code that priced the European option in lesson 6 of my notes.

Output: A sample output that I expect from your code is shown in  gure

??




2








































Figure 2: Sample output (Note: A large number of Divisions should not be a problem when you use Dynamic Programming.)



















3

More products