## Applying Finite Difference Methods To The Blackscholes Equation

We have shown in section 2.6.2 that the value at time t of an option written on an underlying asset whose price is S(t) is a function f(S, t) satisfying the with suitable boundary conditions that characterize the type of option. Different equations may be written if the hypotheses are changed and if path dependency is introduced, but this equation is the starting point to learn how to apply numerical methods based on finite differences for option pricing. As we have seen in chapter 5, to solve...

## Quasimonte Carlo Simulation

In the preceding sections, we have considered the use of variance reduction techniques, which are based on the idea that random sampling is really random. However, the random numbers produced by a LCG or by more sophisticated algorithms are not random at all. Hence, one could take a philosophical function Price, CI BlsMCIS(SO,K,r,T.sigma,NRepl) ISRatios exp( (2*(nuT - ISnuT)*VY - nuT2 + ISnuT2) 2 siT 2) DiscPayoff exp(-r*T)*max(0, (S0*exp(VY)-K)) Price, VarPrice, CI normfit(DiscPayoff....

## Pricing American Options By Binomial Lattices

Pricing an American option by the binomial lattice technique that we have illustrated in the last section is fairly easy. The only critical point is how we should account for early exercise. We deal here with a vanilla American-style put option on a non-dividend paying stock.2 Consider a point (i, N) on the last time layer of the lattice. If the option is in the money at expiration, it is obviously optimal to exercise it. Hence, in the last time layer we have where Si SuldN l is the underlying...

## Yt 53Tit 0 1 N

For instance, this approach is taken in 11 , where minimum transaction lots are dealt with. This approach does not require any statistical modeling, but we should mention that there is a risk of overfitting with respect to historical data. Finally, the MILP model may not really be aimed at building a portfolio from scratch. Rather, one could devise a target portfolio by whatever technique, subject to variety of constraints related to critical market exposure and liquidity. Then the target is...

## Numerical Methods For Unconstrained Optimization

In principle, an unconstrained problem minx6Rn (x) may be solved by looking for a stationary point. Some care is needed for the non-convex case, since second-order information should be checked furthermore, what we get in general is a local optimizer indeed, almost all the non-linear programming libraries commercially available are aimed at local optimization. The stationarity condition yields a set of non-linear equations which could be solved to spot candidate optima in fact, there are a few...

## Info

0 5 10 15 20 25 30 35 40 45 50 Fig. 3.12 Fitting a second-order polynomial in example 3.15. number of nodes is larger than the set of coefficients in the polynomial. The trouble may be that, even if the fit is good, the approximating function is not monotonically increasing. If the logarithm is actually a utility function, we would require an increasing approximation which shows non-satiation. Since using a second-order polynomial is not that satisfactory, we could try increasing the order of...

## F9 J fxgxdx

They are the first polynomials in the family of Legendre polynomials. Similarly, the Chebyshev polynomials defined in (3.9) form an orthogonal system with respect to the inner product Actually, there are general strategies to build orthogonal systems, which will be outlined in section 4.1.2. We should also mention that orthogonal systems of random variables can also be built. The idea, said very roughly in financial terms, is to decompose risk (a random variable) into the sum of uncorrelated...

## The Shortest Path Problem

The easiest way to introduce dynamic programming is by considering one of its most natural applications, i.e., finding the shortest path in a network. Graph and network optimization are not customary topics in Finance or Economics, but a quick look at figure 10.1 is enough to understand what we are talking about. A network consists of a set of nodes (numbered from 0 to 7 in our toy example) and a set of arcs joining pairs of nodes. Arcs are labeled by a number which can be interpreted as the...

## Index

235, 237, 247, 276, 458 active set method, 365, 378 ADI, see Alternating Direction Implicit method algorithm polynomial, 145 Alternating Direction Implicit method, sampling, 244, 447, 547 arbitrage, 71, 103, 126, 415, 486, 550 opportunity, 39, 104, 129, 551 arc (in a network), 497 arithmetic finite precision, 15 asset allocation, 73, 77, 506 asset-liability management, 530, 534, 556 logarithmic, 375 monitoring, 122 option, see option, barrier binary, 138 decimal, 138 in Halton sequence, 270...

## Pricing A Vanilla European Option By An Explicit Method

As a first attempt to solve equation 9.1 , let us consider a vanilla European put option. We approximate the derivative with respect to 5 by a central difference and the derivative with respect to time by a backward difference. This is not the only possibility, but any choice must be somehow compatible with the boundary conditions. The result is the following set of equations to be solved with the boundary conditions of example 9.1. It should be noted that, since we have a set of terminal...

## Financial Theory

This chapter is a reasonably brief introduction to some basic problems in finance. It is mostly aimed at readers with a scientific or engineering background, but with little previous exposure if any to the theory of finance. The complementary set of readers, i.e., those with a background in finance may wish to have a cursory look at the material, or maybe to refer back to this chapter for a quick refresher when needed. The treatment here is purely instrumental to motivating and stating certain...

## N A 55i

Differentiating II and using equation 2.32 , we get 41 - A 5 - - A - 48 - f i i-g 2.37 We may eliminate the term in dS by choosing With this choice of A, our portfolio is riskless hence, by no-arbitrage arguments, it must earn the risk-free interest rate r Eliminating dll between equations 2.37 and 2.38 , we obtain Now we have a deterministic partial differential equation describing an option value S, t . This equation applies to any option whose payoff depends only on the current price of the...

## R s

In example 6.10, we have found an explicit representation of the dual function. In general, the maximization of the dual function must be tackled by a numerical method. In practice, the following iterative procedure can be adopted assuming the inequality-constrained case 1. Assign an initial value fj, gt 0 set k 0. 2. Solve the relaxed problem with multipliers 3. Given the solution of the relaxed problem, compute a search direction s fc and a step length and update the multipliers making sure...

## DFdxdxmdt2 0bdt

Which, substituting for dX, becomes the celebrated Ito's lemma Although this proof is far from rigorous, we see that all the trouble is due to the term of order y St linked to the Wiener process. Indeed, if we set 6 0, i.e., there is no random term due to the Wiener process in the differential equation, Ito's lemma boils down the chain rule for derivatives and thus, given differential equation 2.22 for x, dF J dFJ dF ot dt dt. dx dt In Ito's lemma we have an extra term in dW, which is expected...

## References

Introduction to Partial Differential Equations with MATLAB. Birkh user, Berlin, 1998. 2. D.G. Luenberger. Investment Science. Oxford University Press, New York, 1998. 3. R. McOwen. Partial Differential Equations Methods and Applications. Prentice Hall, Upper Saddle River, NJ, 1996. 4. K.W. Morton and D.F. Mayers. Numerical Solution of Partial Differential Equations 2nd ed. . Cambridge University Press, Cambridge, 2005. 5. R.D. Richtmyer and K.W. Morton. Difference Methods for...

## Finite Difference Methods for Partial Differential Equations

Partial differential equations PDEs play a major role in financial engineering. Since the seminal work leading to the Black-Scholes equation, which we introduced in section 2.6.2, PDEs have become an important tool in option valuation. It turns out that PDEs provide a powerful and consistent framework for pricing rather complex derivatives. Unfortunately, as analytical solutions like the Black and Scholes formula are not available in general, one must often resort to numerical methods. The...

## Solving The Bidimensional Heat Equation

Sometimes, PDEs arising in financial engineering involve two uncertain quantities. They may be the prices of two assets in a multidimensional option, or a price and an interest rate, or a price and a volatility. In these cases we have a more complex PDE to deal with. When the dimensionality of the equation goes beyond a certain limit, we must necessarily resort to Monte Carlo methods, but in two or three dimensions plus time , finite difference schemes can be still applied. To get a feeling for...

## Explicit And Implicit Methods For The Heat Equation

Let us consider the heat equation in dimensionless form Fig. 5.11 Intuitive interpretation of the heat equation heat flows from hot points to cold points. With some work, the Black-Scholes equation can be transformed into this form, so it is worthwhile to investigate this equation in some detail. We also assume that the domain of interest is x e 0,1 and t 6 0, oo actually, in a practical scheme, we will also limit the domain with respect to time, t 0, T . We have initial conditions for t 0 and...

## Constrained Optimization In Matlab

In this section, we briefly describe functions from the Optimization toolbox which can be used for constrained optimization. In particular we consider the functions linprog for linear programming, quadprog for quadratic programming, and fmincon for generic constrained optimization. The coverage is not complete really, but we will provide a couple of examples related to financial problems. 9Computational complexity has been introduced in section 3.1.3. The Optimization toolbox includes a...

## Explicit And Implicit Methods For The Heat Equation 305

Fig. 5.12 Computational diagram of the explicit method for the heat equation, by the approximation 5.10 . This yields 4 gt i,j 1 - lt t gt tj _ 4 gt i i.j - Hij lt Pi-i,j st Sxy It is easy to see that we may rearrange this equation by solving for the unknown value 4 gt ij 1 lt i gt i.j 1 P lt Pi-i,j 1 - 2p 4 gt ij p lt j gt i i,j, 5.19 Starting from the initial conditions j 0 , we may solve the equation for increasing values of j 1, , M. Note that for each j, i.e., for each layer in time, we...

## Portvrisk Matlab

Assuming that the overall portfolio value is 10 million, and that the confidence level is Var 107 2.3263 0.05011 1,165,709. The same result can be obtained by using the MATLAB functions portstats and portvrisk. The first one, given the expected return vector for each asset, the covariance matrix, and the portfolio weights, computes the portfolio risk and the expected return PRisk, PReturn portstats ExpReturn, CovMat, Wts . The second one computes the VaR, given the expected...