CSS522 - Assignment 3

Deadline: April 19, 2005, 10:00 am

A. General Comments

You will each work independently. Feel free to discuss the text of the assignment itself, of the behavior and characteristics of various predefined Matlab functions that you consider relevant. Do not show, make available, discuss, or otherwise share your programs, your algorithms, and/or conclusions with anybody else.

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 be given real trading data, and the problems you will have to solve will not be fully specified. 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. 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.

B. Data Sources

For this assignment you will have to use one of the most complete repositories of financial data available, specifically, Bloomberg. A Bloomberg terminal is publicly accessible in the library of the Johnson School. While library personnel will probably be able to give you limited support for using the system, you will have to rely on your own effort to understand how to access the information you need. When at the terminal, you will be able to access the system's help files - study these carefully!

C. Tools You Can Use

For this assignment, the volume of data you have to handle is small. You can use any software you might need to format your input data. All computations, however, must be performed in Matlab.

D. What to Submit

You should submit a single pdf document that contains the written answers to all the questions we pose below. Your answer should include, if applicable, a description of the decisions that you had to make, a description of the results (including graphs), an explanation of how you approached and solved the problem (i.e. describe your program in detail). Provide specific examples of usage for your functions, including the values of input parameters and the corresponding results. Include any other comments you find relevant. Your answers must be complete, unambiguous, and as concise as possible.

In addition to the pdf file, you will submit one zipped file containing all the source and data files 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 right software at hand, let us know - we will help you out. If you have any doubt about your ability to generate pdf files, please let us know as soon as possible. We might not be able to provide you with support at the very last minute, just before the submission deadline.

E. Questions

  1. As we have learnt, acquiring the data for a financial project can be a very challenging undertaking. In this part of the homework your task is to obtain actual option pricing information. You will use two data sources: Yahoo's financial web site, and Bloomberg, perhaps the most complete repository of financial information available.

    Note that Yahoo's web site offers limited historical information. It is best to retrieve the data on the days specified below. We can not provide you with help if you fail to do this.

    Unless explicitly specified otherwise, you will have to acquire data for two days: Thursday, April 7, 2005, and Friday, April 8, 2005. Daily data must refer to "closing" or "end of day" values. All your data retrivals must concern data for both IBM and General Electric.

    Using Yahoo's financial web site (finance.yahoo.com) do the following:

    Organize and present your data per company, clearly showing all the data that you have captured.

    Use Bloomberg to retrieve the end-of-day price for the first day on, or after March 15 for which prices are available, for all options maturing in May 2005 for which you have captured data from Yahoo (i.e. for all options that traded on both dates of interest). Clearly show your results. If an option did not trade on the respective day, say so. Briefly explain the commands that you used to retrieve your data.

    Hint: The Bloomberg data searches have now been greatly simplified; you can retrieve most of your data from Yahoo, which you can access through the web. You can start your search for option prices by looking up information on company stock prices. After you log in to Bloomberg, go to the equity screen and look for stocks first; when you find stock information you will be able to retrieve associated option information as well. Type <F8><enter> after you log in to start.

  2. Compute the continuously compounded yield of the Treasuries selected in point (1). Should you need to, feel free to adapt the code you have been given in class, or to reuse the Matlab code you have developed for the previous assignment.

    Hint: You will have to decide whether the prices you acquired from Yahoo contain the accumulated interest on the bonds or not. You can determine this if you examine functions like prbond. Keep in mind that the "yield to maturity" quantity quoted by markets does not represent the continuously compounded yield of the bond (it is a discretely compounded quantity that we will not use directly).

    Provide the resulting yields in your report. You will use these yields as proxies for the constant interest rate that you need in order to value options of various maturities.

  3. For the case of European call and put options, both the Black-Scholes and the Binomial method are simple to implement. Consider a European instrument with an expiration of 6 months; the underlying stock has a time 0 value is $100.00, and the volatility is 25%/year. Further, assume that the continuously compounded return r is equal to 2%. The underlying stock pays no dividends.

    Determine the minimum number of intervals n necessary to consider in the binomial method so that the difference between the result of the Black-Scholes method and that of the binomial method is less than eps=$0.001. Represent n as a function n = n(M), where M is the moneyness of the option; provide one graph for calls, and one for puts. Comment on any pattern you notice.

    Feel free to use and - if needed - modify predefined Matlab functions for the purpose of answering this question. Do not use functions you have not understood and inspected fully! If you modify predefined functions, report exactly on the changes you have undertaken. Rename any modified function so that there is no danger of confusing the original function with the modified one.

  4. Implement a simple binomial pricing model to evaluate the time 0 value of an arbitrary payoff (discussed below). Assume that the underlying stock does not pay any dividends. The interface of the function is defined as follows:
    function v = binprice522(S0, r, T, n, sigma, payoff, show, params)
    

    The meaning of parameters is as follows:

    Payoff functions must accept two or three arguments. The first argument is the price of the stock at the node for which the payoff has been called. The second argument is the time associated with the current node, expressed in years from the start of the interval [0, T]. The third argument is optional, and is equal to the params argument passed to function binprice522.

    Consider the following implementation of the payoff function:

    function p = amcall(S, t, K)
      max(S - K, 0)
    

    This payoff function computes the time-t payoff of an American call with strike K. K is passed on as the third argument. We can easily modify it into a function that returns the payoff of a European call:

    function p = eucall(S, t, params)
      T = params.T;
      K = params.K;
    
      if abs(t-T) < .0001
        max(S - K, 0)
      else
        % Is this the best way to express "no early exercise" for
        % an arbitrary payoff? Why does it work for calls (or puts)?
        0 
      end
    

    Note how the third argument is interpreted as a structure with two fields; one for the length of time to expiration, the second for the strike price. If one were willing to "hardwire" these constants into the function, then the third argument of the payoff function (and the last, optional, argument of binprice522 could be dispensed with).

    Function binprice522 must return the time-0 value of the payoff, as inferred from the binomial lattice. The function should perform sanity checks on all its input arguments and reject values that should not occur. For example, you should not permit negative interest rates.

    If parameter show is equal to 1, then the setup and the evolution of the computation must be shown graphically. You can assume (and must enforce) that whenever show=1, the value of n will be less than, or equal to 10. This is so that you have enough space to display all the needed information. At the start of the simulation you must show a representation of the grid roughly similar to the images you have seen in the lecture notes. Initially, no text should be shown next to the nodes of the lattice.

    Hint: you might find it easier to "build" your lattice on a regular, rectangular grid, and rotate it by 45 degrees before you display it. For example, you might want to consider placing the point corresponding to k "up" moves and l "down" moves at point (l, k) in the rectangular grid. You can apply a similar idea when trying to determine the location where the text (label) for each node must be placed.

    As the simulation progresses, you must fill out the information associated with the node you are processing. In each node, you must display a triplet of the following information: the price of the underlying stock, the payoff if the contract is exercised in the respective node, and the value of the respective contract. Label these quantities with S, P, V, respectively. Show only two decimals for each numeric value.

    When you process a node N, you must highlight the paths from the initial node (i.e. the root) to N. The highlighting must be performed by changing the attributes (e.g. color, thickness) of the lines that have been drawn initially, not by redrawing new lines on top of the old ones. Once you move away from a node, all highlighting indicating paths to the respective node must be removed.

    When showing the lattice, introduce a delay of approximately one or two seconds between the processing of successive nodes, so that a user of your program has time to follow and understand what is happening. You must make all needed changes to the lattice at the same time you compute the values associated with the nodes; it is not acceptable to precompute all (or several) values, and then just "replay" the results in order to display them.

    To illustrate the correct behavior of your implementation of binprice522, consider the "European" payoff function defined as follows:

    	  /
    	  | S - K, if S < K
    	  |
    payoff = <  0, if K <= S <= 2K
    	  |
    	  | S - 2K, if S > 2K
    	  \
    

    At expiration, this payoff behaves like the payoff of the portfolio S - K - C(K) + C(2K) (can you find a simpler structure for the equivalent portfolio?). From here, you can infer the value of the payoff at time 0. Your goal is to show that your function prices this payoff accordingly.

    Implement this payoff function as given, and compute its value using binprice522 (choose several reasonable sets of parameter values when evaluating your payoff). Argue that your results are correct by comparing these results with results obtained for related payoffs that you can evaluate using function blsprice. Note: we are not expecting a formal proof of correctness, just an empirical argument providing arguments for credible correctness. If you want to, you can choose other payoffs of similar complexity (in addition, or replacing the payoff given above) in order to support the contention that your implementation is correct.

  5. For this problem, you will use the data you have gathered in point (1) above.

    First, use the binomial model to infer the implied volatility for each expiration date and strike price for the data of April 7.

    You can use Matlab's predefined function for implementing the binomial model. You must implement the search for the implied volatility yourselves (hint: you can try to bracket the true value of the volatility in an interval, and then use interval bisection to find the correct volatility). Stop when you can approximate the value of the respective option with a precision better than $.01 (one cent).

    Use discrete dividends. You can assume that each company will pay dividends equal to the last actual dividend they have paid. Further, you can assume that dividends will be paid on the schedule used for the last year (i.e. if the company paid a dividend on day X in the last year, you can assume that it will pay on the same day during the current and subsequent years; do not worry about X being a weekend day or holiday).

    Report on the size of the time step you have chosen for your simulations, and explain the rationale behind your choice. Hint: Use the smallest time step that is practical. You should try using bigger steps initially, so that you do not spend a lot of time debugging your code.

    You will get a series of triples (expiration date, strike price, implied volatility [sigma]); represent these in a three-dimensional system of coordinates. Do not create a surface, represent the discrete points! Use separate graphs for the two firms. Represent the points for puts and calls on the same graphs. Use points for representing values inferred from call prices, and small circles of a different color to represent values inferred from put prices.

    Using the implied volatilities you have obtained for April 7, "predict" the prices of the corresponding instrument for April 8. Use the same parameters for the binomial model that you used when solving the inverse problem above. Provide graphs showing the discrepancy between predicted and actual prices for the two firms; use separate graphs for puts and calls, and for each date.

    Briefly discuss ways that you think might improve the quality of your price predictions. Hint: discuss in principle how you could use the volatility surface to get better approximations for the volatility (as opposed to just reusing the "old" volatilities, as you did above).

  6. Implement the Crank-Nicholson method for solving the Black-Scholes equation. Define function blsprice2, which should have exactly the same arguments as Matlab's blsprice function, except for the last one, q, which you must remove (and you should assume that q=0).

    Note: The Crank-Nicholson method will be discussed in class; a handout describing it will also be provided.