I am a big fan of trees. It is a very nice way to see how financial pricing works, for derivatives. An with a matrix-based language (R for instance), it is extremely simple to compute almost everything. Even multiple assets options. Let us see how it works. But first, I have to assume that everyone knows about trees (or at least is familiar), and about risk neutral probabilities, and with standard financial derivatives. Just in case, I can upload some old slides of the first course on asset pricing we gave a few years ago at École Polytechnique.

Let us get back on the code to price a (European) call option with trees.The idea is simple. We have to fix the number of periods. Let us start with only one (as described in the slides above). The stock has price and can go either up, and then have price or go down, and have price . And the fundamental theorem of asset pricing says that we do not really care about probabilities of going up, or down. Assuming that we can buy or sell that stock, and that a risk free asset is available on the market, it is possible to price any contingent financial product, like a financial option. Since we know the final value of the option when the stock goes either up, or down, it is possible to replicate the payoff of that option using the stock and the risk free asset. And we can prove that the price of the option is simply

where the probability is the so-called risk neutral probability

So, we’ve done it with only one single period, but it is possible to extend it to multiperiods. The idea is to keep that multiplicative representation of possible values of the stock, and to get a recombinant tree. At step 2, the stock can take only three different values: when up twice, when down twice, or went up and down (or the reverse, but we don’t care, this is the point of recombining). If we write things down, then we can prove that

for some probability. But we do not really care about those closed formula, the goal is to write an algorithm which compute the tree, and return the price of a call option (say). But before starting, we have to make a connection between that model with up and down prices, and the parameter of the Black-Scholes diffusion, for the stock price. The idea is to identify the first and the second moment, i.e.

(where, under the risk neutral probability, the trend is the risk free rate) and

The code is clearly not optimal, but at least, we see what’s going on. For instance, we do not need a matrix when we calculate using backward recursions the price of the option. We can just keep a single vector. But this matrix is nice, because we can use in to price American options.

But the great thing with trees, is that we can extend them to model comovments of two underlying prices. For instance, with the code below, we compare the price of an American put option, and the price of European put option.

Another great thing with trees, is that it becomes possible to plot to region where it is optimal to exercise our right to sell the stock.

Let us move now to a model with two assets, as suggested by Rubinstein (1994). First, observe that a discretization of two independent Brownian motions will be based on two independent random walk, taking values

i.e. both went up (NW), both went dowm (SE), and one went up while the other went down (either NE or SW).

With independent and symmetric random walks, the probabilities will
be respectively 1/4. Here, the idea is to consider possible correlation,
i.e.

And again, the idea is then to identify the first two moments. This
gives us the following system of equations for the four respective (risk
neutral) probabilities