This example explores basic arbitrage concepts in a single-period, two-state asset portfolio. The portfolio consists of a bond, a long stock, and a long call option on the stock.

It uses these Symbolic Math Toolbox functions:

equationsToMatrixto convert a linear system of equations to a matrix.

Symbolic equivalents of standard MATLAB functions, such asdiag.

This example symbolically derives the risk-neutral probabilities and call price for a single-period, two-state scenario.

Create the symbolic variablerrepresenting the risk-free rate over the period. Set the assumption thatris a positive value.

Define the parameters for the beginning of a single period,time = 0. HereS0is the stock price, andC0is the call option price with strike,K.

Now, define the parameters for the end of a period,time = 1. Label the two possible states at the end of the period as U (the stock price over this period goes up) and D (the stock price over this period goes down). Thus,SUandSDare the stock prices at states U and D, andCUis the value of the call at state U. Note thatSD=K=SU.

The bond price attime = 0is 1. Note that this example ignores friction costs.

Collect the prices attime = 0into a column vector.

Collect the payoffs of the portfolio attime = 1into thepayoffmatrix. The columns ofpayoffcorrespond to payoffs for states D and U. The rows correspond to payoffs for bond, stock, and call. The payoff for the bond is1 + r. The payoff for the call in state D is zero since it is not exercised (becauseSD=K).

CUis worthSU – Kin state U. Substitute this value inpayoff.

Define the probabilities of reaching states U and D.

Under no-arbitrage,eqns == 0must always hold true with positivepUandpD.

Transform equations to userisk-neutralprobabilities.

(pDrn+pUrn-1SDpDrnr+1-S0+SUpUrnr+1-C0-pUrnK-SUr+1)

The unknown variables arepDrn,pUrn, andC0. Transform the linear system to a matrix form using these unknown variables.

Usinglinsolve, find the solution for the risk-neutral probabilities and call price.

(S0-SU+S0rSD-SU-S0-SD+S0rSD-SUK-SUS0-SD+S0rSD-SUr+1)

Verify that under risk-neutral probabilities,x(1:2), the expected rate of return for the portfolio,E_returnequals the risk-free rate,r.

As an example of testing no-arbitrage violations, use the following values:r = 5%,S0 = 100, andK = 100. ForSU 105, the no-arbitrage condition is violated becausepDrn = xSol(1)is negative (SU = SD). Further, for any call price other thanxSol(3), there is arbitrage.

(-SU-105SD-SUSD-105SD-SU20SD-105SU-10021SD-SU)

Plot the call price,C0 = xSol(3), for50 = SD = 100and105 = SU = 150. Note that the call is worth more when the variance of the underlying stock price is higher for example,SD = 50, SU = 150.

Advanced Derivatives, Pricing and Risk Management: Theory, Tools and Programming Applicationsby Albanese, C., Campolieti, G.

A modified version of this example exists on your system. Do you want to open this version instead?

You can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Accelerating the pace of engineering and science

MathWorksis the leading developer of mathematical computing software for engineers and scientists.