Should the need arise, we will post clarifications, explanations, or corrections by updating this document from time to time. These changes will also be posted on the course web site. Make sure you keep up with these developments.
You should think of this assignment as being a small research project. You will have to take informed decisions, which you will justify in your writeup. The course staff will be available to answer questions and offer guidance.
All materials must be submitted by the deadline (extended by the grace period). You can change your submission any time before the deadline, however, we will only consider the last version when grading. If at all possible, do not wait with your submission until the very last minute; despite our best efforts CMS might get overloaded and you might not be able to complete your submission. Unless extraordinary circumstances warrant it, we will not accept late submissions. If all else fails (but then, and only then), send email to Radu and attach your work. Make sure you send the email in time, so that he receives it before the deadline.
In addition to the pdf file, you will submit one zipped file containing all the source and data files, if any, that you used to develop your programs. In your writeup you should indicate clearly which functions have been used to produce a certain result, and how these functions interact. Be precise and concise in your explanations. Your writeup should provide enough information for us to be able to reproduce your results.
If you do not know how to produce a pdf file, or if you do not have the needed software at hand, let us know - we will help you out. If you have any doubt about your ability to generate pdf files, please talk to us as soon as possible. We might not be able to provide you with support at the very last minute, just before the submission deadline.
function [Onm, Tm, Sn, taum, xn] = blsprice2(type,S0,K, r, sigma, T, Nt, Smin, Smax, Nx)
The interpretation of the input arguments is as follows:
The interpretation of the output arguments is as follows:
Note: all the above returned values are arrays. Onm is a matrix of size (Nx + 1)x(Nt + 1), while Tm, Sn, taum, xn are one-dimensional arrays of size Nt + 1, Nx + 1, Nt + 1, and Nx + 1, respectively. Given 1 ≤ i ≤ Nx + 1 and 1 ≤ j ≤ Nt + 1, Onm(i, j) must correspond to point (Sn(i), Tm(j)) in the original domain, and to point (xn(i), taum(j)) in the transformed domain. We must also have that xn(i) = xmin + (i - 1)*δx, taum(j) = (j - 1)*δτ, and point (Sn(i), tm(j)) in the original domain must correspond to point (xn(i), tm(j)) in the transformed domain.
Include the source code of the function in your report and discuss it extensively. Illustrate the correct behavior of your code with examples for both puts and calls, by showing that the solution of blsprice2 converges toward the solutions given by the Black-Scholes equation. Expect your code to be tested against our reference implementation.
function [Onm, Tm, Sn, taum, xn] = putAM(S0, K, r, sigma, T, Nt, Smin, Smax, Nx, eps)
The function's arguments have the meaning defined for the same symbols in the preceding problem, with one addition. The meaning of parameter eps is identical to that of ε from our class discussion - the upper limit used to test for convergence of the iterative step in the projected successive over-relaxation method. We will use the 2-norm to test for convergence.
You will have to pick a value between 1 and 2 for the over-relaxation parameter ω. Pick an initial value for it, say, 1.5, then search for better values as you advance with your solution. Use some of the ideas discussed in class, if you wish. Explain clearly what strategy you implemented when you prepare your report.
function plotBLS(Onm, Tm, Sn, taum, xn, s1, s2, t1, t2)
The function's first five arguments have the meaning defined for the same symbols in the preceding problem. The new parameters must be interpreted as follows:
In the following, whenever we talk about the "domain", this must be understood as the restriction of the original domain to the region [s1, s2]x[t1,t2]. The transformed domain must be restricted accordingly. This restriction allows for the visual examination of various subregions of the full domain; such an examination would not be possible for the entire original domain because of the variable step induced by the discretization of the original domain.
Function plotBLS must plot two 3D graphs next to one another, i.e. in the same figure window. The graph on the left will show the evolution of the option price in the original domain, while the graph on the right will show the evolution of the option price in the transformed domain. All axes must be appropriately labeled, as well as the plots themselves.
The vertical axis will be used to represent option values Pnm in both graphs. The corresponding domain grids must be shown at the "bottom" of each graph, in plane P=0 (show the gridlines, not only the points). Use color black to represent the gridlines.
Using color red, draw two lines that "bracket" the early exercise frontier both in the original and the transformed domain; represent it in plane P=0 in both graphs. The early exercise frontier will not pass, in general through the grid points. In such cases we will bracket the efficient frontier by marking the grid point just to the left, and the grid point just to the right of the efficient frontier. By uniting all the points just to the left and all the points just to the right of the frontier, respectively, we get the two curves we are looking for. Note that a particular subdomain that we are examining might not contain the any of these curves, or only parts of one or both of them.
Using the values obtained for the call at the grid points, interpolate these points to represent the resulting value surface (hint: use Matlab function mesh). Use uniformly colored blue wire mesh for your surface.
Include the source code of your functions in the report, and discuss it extensively. Explain how you search for a good value for ω. Illustrate the behavior of your function for specific parameter choices that you consider representative. Expect your functions to be tested against our reference implementation.