Sie sind auf Seite 1von 30

Binomial Tree &

Heap
Group 8

• Name : Fahim Islam Mohip


Id: 2013 – 1 – 60 – 010

• Name : Fhamida Islam Lima


Id: 2013 – 1 – 60 – 062

• Name : Abdullah Al Mosharraf


Id: 2013 – 1 – 60 – 009
Overview
 What are Binomial Tree & Heap ?
 Structure
 Properties
 Operation of Binomial Heap
 Application of Binomial Heap & Tree
What is a Binomial Tree ?
• A binomial tree is an ordered tree which is defined
recursively.

• The tree Bk is an binomial tree of K’th order.


Where the orders are from 0 up to k.

• A binomial tree Bk is consists of two binomial trees


Bk-1. Where one’s root is another’s leftmost child.
Structure

• For the binomial tree B0 of 0 order


there is just one node

B0
Structure(continue….)
• Then for B1, It is consist of two B1-1 or two B0, where one’s root is
another’s leftmost child. So it’ll be ……..

B0 B0

B0
B1

B0
Structure(continue….)
• So for B2 , there will be combine of two B1 .

B1 B1

B2
For B3 , there will be two B2

B3
So in the whole view, it shows the tree order increase
recursivley. B4 is combines of B0 , B1, B2, B3. They are
common in root
B4 :

B0

B1
B2
B3
Binomial Trees
 Another way to look at binomial tree

B1 Bo
B2
Bk-2

Bk-1 Bk
Binomial Tree Properties
Bd has the following properties:
1. Has 2d nodes.
like for B2 :
1 there are 22 = 4 nodes
2
3

11
2. Has height d, and depth is i=0,1….. D.
Like in a B3 :
d
6 0
8 14 29
1
11 17 38 2
27
3

Here height & depth are both 3.


3 . The root has the highest degree above all nodes,
like here is 3.
4 . The root of Bk has K sub trees, as the sub trees are
B0 , B1 …… upto Bk-1 .
Bd

B1 B0
B2

Bd-2
Bd-1

5. The highest degree of any node in Bk is lg n .


Binomial Heaps

• A binomial heap is a set of binomial trees that


satisfies the following binomial-heap
properties.
• 1. Each binomial tree in H is heap ordered. The
value or key of a node is greater than or equal
to the key of it’s parent.
• 2. There is at most one binomial tree in H
whose root has a given degree.
Binomial Heaps
Example:
A binomial heap with n = 13 nodes
3 2 1 0

13 =< 1, 1, 0, 1>2
Consists of B0, B2, B3 , where everyone is heap ordered.
head[H]
10 1 6

B0 12 25 8 14 29

18
B2 11 17 38

B3
27
Representation of Binomial Heaps

• Let x be a node with sibling[x] ≠ NIL

– Degree [sibling [x]]=degree[x]-1


if x is NOT A ROOT

– Degree [sibling [x]] > degree[x]


if x is a root
Operations on Binomial Heaps

CREATING A NEW BINOMIAL HEAP

MAKE-BINOMIAL-HEAP ( )
allocate H RUNNING-TIME= Θ(1)
head [ H ]  NIL
return H
end
Operations on Binomial Heaps
BINOMIAL-HEAP-MINIMUM (H)
x  Head [H]
min  key [x]
x  sibling [x]
while x ≠ NIL do
if key [x] < min then
min  key [x]
yx
endif
x  sibling [x]
endwhile
return y
end
Operations on Binomial Heaps

Since binomial heap is HEAP-ORDERED

The minimum key must reside in a ROOT NODE

Above procedure checks all roots

NUMBER OF ROOTS ≤ lgn + 1

RUNNING–TIME = O (lgn)
Application of Binomial tree & Heap
 Binomial tree and binomial heaps tree mostly used in
mathematical algorithm , computer science and real
life platform, just like as:-

• In economics like Option Pricing method. It’s a


measurement procedure of up & down of stock
market.
• Probability theory.
• In statistics like binomial distribution using tree.
• It’s an advanced kind of data structure, so as it is used
advanced analysis and computing.
One of the most popular application

Binomial Tree Option Pricing

• John Cox, Stephen Ross, and Mark Rubinstein


published a paper detailing their method in 1979
• “Option Pricing: A Simplified Approach”
Option Pricing in Binomial Tree
• Say we have a stock price at t0, S0. In the Binomial Method, the
price can go either up or down. At t1 (after one time interval), the
price can either be an “up” price or a “down” price. These prices
can each go either up or down over the course of the next time
interval.
• You can see that the possible prices quickly “branch” out over
time, thus the term Binomial “Tree.”
• By making the number of time intervals
between t0 and time of expiry T very large,
we will get many possible stock prices at T
and we will have a better approximation of
the Brownian Random Walk, which is a
time continuous model.
The Up and Down Ratios
• In order to get from S0 to Su, we have to multiply S0 by
what’s called the up ratio, labeled u. Similarly, to get from
S0 to Sd, we have to multiply S0 by the down ratio, labeled d.
These factors are constant throughout the tree.
 u and d depend on two things: volatility of the stock and
the length of a time interval. Cox, Ross, and Rubinstein
chose the up and down ratios to be these:
The Up and Down Ratios
• Let’s say we want to price a European call option with a
strike of $100. The initial stock price is $100, volatility is
30%, time to expiry is one year, and the riskless interest
rate is 5%. Let’s build our stock price tree with four time
intervals.

(where node * is located m up


moves and k down moves from S0)
Transition Probabilities
• If the probability of S0 rising to Su is p, then the
probability of S0 falling to Sd must be 1-p, since
one of those two outcomes must happen in this
model.
• We can say that the expected price at t1 is the
probability of the up move happening times the
up price plus the probability of the down move
happening times the down price.
Transition Probabilities

• We want the Binomial Method to be risk


neutral. A riskless asset should grow by a
factor of after delta t, with r as the
riskless interest rate.

• Set the risk neutral expected value of S


equal to the binomial expected value of S.
Transition Probabilities
• Solving for p yields:

• This is the risk-neutral transition probability of an up


move.
• Remember that u and d only depend on the volatility and
the length of the time interval, so this probability only
depends on volatility, the length of a time interval, and
the riskless interest rate. All of these will remain constant
throughout our binomial tree, so this probability will
remain constant throughout the tree as well.
Constructing tree with price
• So , the tree of with Sd , Su or upper and lower
stock price will be like,
t0
100 $

86.06 $ 116.18 $
t1
100 $
74.08$
134.9$
t2
63.76 $ 86.06 $
116.18 $ 156.83$
t3
54.88 $ 182.21 $
t4
74.08 $ 100 $ 134.9 $
Why Binomial Model ?
Binomial tree model is efficient for option
pricing because

• Uses of relatively simple mathamatics


• More states can be included with multiple steps
• Easy to implement as computer program
• Can handle any payoff functions and stock features
• Still in wide use in practice!
Thank You

Das könnte Ihnen auch gefallen