Stochastic Tree Method for Option Pricing
Amit Kumar Jha
January 06, 2024
1 Introduction
The Stochastic Tree Method is akin to predicting the numerous possible routes one
could take on a journey through a forest with many forks in the path. At each fork,
a traveler must choose one of several directions to continue. Similarly, this numeri-
cal technique used in financial mathematics to price options, particularly exotic options
like Bermudan options, considers the multiple potential paths that an asset’s price could
follow over time. Just as a traveler decides at each fork based on the landscape ahead,
the pricing of options using the Stochastic Tree Method involves simulating various
future asset price scenarios and making decisions at each step based on the potential
future values. These simulations generate a tree of possible price outcomes, capturing
the asset’s volatility and the randomness of market movements. The final destination
in the case of the stochastic tree is the option’s value at maturity, which is reached by
traversing the tree from the beginning (current price) to the end (expiration), consider-
ing the option to ’stay’ or ’turn’ (exercise the option) at each decision point, analogous
to the forks in our journey through the forest. The result is a robust model that reflects
the myriad paths an asset’s price can take, allowing for a nuanced valuation of options
that may be exercised at multiple times before their expiration date.
2 Mathematical Framework of the Stochastic Tree Method
The core of the Stochastic Tree Method lies in its ability to approximate the expected
value of an option’s future price conditional on its current price. This is achieved by
traversing through the tree of possible future prices, step by step, in a process that
closely mirrors the complexities of financial markets.
For each time step tk , the continuation value E[e−r∆t Vk+1 (Sk+1 )|Sk ] represents the
expected value of the option at the next time step k + 1, discounted back to the current
time step k, given the current asset price Sk . This expected value is crucial for option
pricing, as it helps to determine whether it is more valuable to exercise the option at
the current time or to continue holding it for a potential better payoff in the future.
To approximate this continuation value using the Monte Carlo method, we proceed
as follows:
1 2 b
1. First, we sample b possible future prices Sk+1 , Sk+1 , . . . , Sk+1 from the exact con-
ditional distribution of Sk+1 given the current price Sk .
1
2. Second, we approximate the mathematical expectation by the sample mean of the
discounted values at the next step, which can be mathematically represented as:
b
1 X −r∆t
E[e−r∆t Vk+1 (Sk+1 )|Sk ] ≈ e i
Vk+1 (Sk+1 ).
b i=1
By iterating this process across all time steps and branches of the tree, we effectively
construct a full pricing model for the option that accounts for the time value of money
and the uncertainty inherent in the asset’s future price movements. This method thus
balances the sophistication of continuous-time models with the practical necessity of
discrete-time calculations suitable for computational implementation.
3 Stochastic Tree Method Algorithm
The algorithm for the Stochastic Tree Method can be broken down into several key
steps:
• Initial Simulation: Start with the initial asset price S0 and simulate b indepen-
dent successors S1,1 , S1,2 , . . . , S1,b , each following the probability law of S1 ≡ S(t1 ).
• Recursive Simulation: For each S1,i1 , simulate b independent successors S2,i1 ,1 , S2,i1 ,2 , . . . , S2,i1 ,b ,
each following the law of S2 ≡ S(t2 ) conditioned on S1 = S1,i1 , and so on for each
time step.
• Option Value at Terminal Nodes: At the terminal nodes, set the option value
equal to the payoff value ΛM (Si1 ,...,iM ).
• Backward Induction: Calculate the option value at each node by maximizing the
exercise value and the expected continuation value, computed as the average of
the values of its successors, discounted back to the present.
4 Python Implementation
Below is a Python implementation of the Stochastic Tree Method for a Bermudan op-
tion, showcasing the simulation of the stock price paths:
1 import numpy as np
2 import matplotlib . pyplot as plt
3 def s im u l at e _ su c c es s o r s (S , sigma , r , delta_t , b ) :
4 """ Simulate b successors for the stock price . """
5 drift = ( r - 0.5 * sigma **2) * delta_t
6 shock = sigma * np . sqrt ( delta_t )
7 return S * np . exp ( drift + shock * np . random . normal (0 , 1 , b ) )
8
9 def c a l c u l a t e _ o p t i o n _ v a l u e ( S0 , K , r , sigma , T , b , exercise_dates ) :
10 delta_t = T / len ( exercise_dates )
11 discount_factor = np . exp ( - r * delta_t )
12
13 # Initialize the tree
14 tree = {0: np . array ([ S0 ]) }
2
15 option_values = {0: np . array ([0.0]) }
16
17 # Simulate the tree
18 for i in range (1 , len ( exercise_dates ) + 1) :
19 tree [ i ] = np . concatenate ([ s im u l at e _ su c c es s o rs (S , sigma , r ,
delta_t , b ) for S in tree [i -1]])
20 option_values [ i ] = np . zeros_like ( tree [ i ])
21
22 # Calculate payoffs at maturity
23 option_values [ len ( exercise_dates ) ] = np . maximum ( tree [ len (
exercise_dates ) ] - K , 0)
24
25 # Backward induction
26 for i in reversed ( range ( len ( exercise_dates ) ) ) :
27 for j in range ( len ( tree [ i ]) ) :
28 successors = tree [ i +1][ j * b :( j +1) * b ]
29 successor_values = option_values [ i +1][ j * b :( j +1) * b ]
30 hold_value = np . mean ( successor_values ) * discount_factor
31 exercise_value = max ( tree [ i ][ j ] - K , 0)
32 option_values [ i ][ j ] = max ( hold_value , exercise_value ) if
exercise_dates [ i ] else hold_value
33
34 return option_values [0][0]
35
36 # Parameters
37 S0 = 100
38 K = 100
39 r = 0.05
40 sigma = 0.20
41 T = 1 # 1 year
42 b = 3 # branches
43 steps = 3 # Number of time steps
44 exercise_dates = [ False , True , False , True , True ] # Exercise only at
quarter end
45
46 # Calculate option value
47 option_value = c a l c u l a t e _ o p t i o n _ v a l u e ( S0 , K , r , sigma , T , b ,
exercise_dates )
48 print ( f " The estimated value of the Bermudan option is : $ { option_value
:.2 f } " )
49 # Plotting
50
51 def p l o t _ s t o c h a s t i c _ t r e e ( S0 , steps , b ) :
52 # Initialize the tree
53 tree = [ np . array ([ S0 ]) ]
54
55 # Simulate the successors for each node
56 for t in range (1 , steps + 1) :
57 level_prices = []
58 for S in tree [ -1]:
59 level_prices . extend ( s im u l at e _ su c c es s o rs (S , sigma , r , T /
steps , b ) )
60 tree . append ( np . array ( level_prices ) )
61
62 # Plot the tree
63 plt . figure ( figsize =(10 , 6) )
64 for t in range ( steps ) :
65 for i in range ( b ** t ) :
3
66 S = tree [ t ][ i ]
67 for j in range ( b ) :
68 next_S = tree [ t + 1][ b * i + j ]
69 plt . plot ([ t , t +1] , [S , next_S ] , ’ko - ’ , lw =2)
70
71 plt . title ( ’ Stochastic Tree Simulation ’)
72 plt . xlabel ( ’ Time Step ’)
73 plt . ylabel ( ’ Asset Price ’)
74 plt . show ()
75
76 # Plotting the stochastic tree
77 p l o t _ s t o c h a s t i c _ t r e e ( S0 , steps , b )
5 Simulation Plot
The following plot illustrates the simulated stock price paths using the Stochastic Tree
Method:
Figure 1: Stochastic Tree Simulation Plot
6 Conclusion
The Stochastic Tree Method is a powerful tool for option pricing, particularly for options
with complex features such as Bermudan options. Its ability to model multiple potential
future paths of an underlying asset makes it highly versatile and useful in financial
modeling.