Matrix for a Binomial Tree - American option

1 view (last 30 days)
Hi everyone, i haven't a lot of experience in matlab and i have to do a project about pricing options. The problem is about the Creation of the price forecast Matrix: i have two rate, up and down, that is the market direction. The Matrix is this:
[d^0*u^0, d^0*u^1, d^0*u^2, d^0*u^3;
0 , d^1*u^0, d^1*u^1, d^1*u^2;
0 , 0 , d^2*u^0, d^2*u^1;
0 , 0 , 0 , d^3*u^0]
I would use two for but i don't know hot to index the columns because aren't form 0 to 3 but for every row, they change. The two index are from 0 to 3 but is just for easiness, the index are input because are the option maturity.
Beyond the financial things, my question is how to create that Matrix, i hope i was clear,
Thanks!
-- Andrea
  1 Comment
andreastasia
andreastasia on 6 Jan 2018
I found a solution: i have used a toeplitz Matrix of a vector from 0 to maturity for the up exponent, and take the "triu"; for the down exponent i've used:
for i=1:step+1
for k=1:step+1
X(i,k)=(i-1);
end
end
down=triu(X);
Now i'll close the question, i write this if someone will have the same problem
Andrea

Sign in to comment.

Answers (0)

Categories

Find more on Price and Analyze Financial Instruments in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!