Homework 2
Binomial Futures Option Pricing Model

Computational Finance

Copyright © Philip H. Dybvig 1996

Scenario You are working on the design of a hedging program for a company that uses large quantities of copper for its hedging operations. There are a number of interesting debates about what should be done. One camp argues that the expected quantity of copper should be hedged in the futures market, while another argues that hedging is uncertain and derivatives are risky, and therefore it is best to do nothing. Another view is that the hedging problem is more subtle, and an analysis of demand should be included.

Action You will be given an existing program that computes prices and hedges for futures options and adapt it to compute the hedge under various assumptions. This analysis would be a useful input to the hedging discussion.

Concept Corporate hedging strategies represent one of the most important uses (and in some cases abuses) of option pricing theory. This homework is an application that is already more sophisticated than practice at many firms. On the computer side, you will be responsible for a bit more of the program than in previous homeworks. Also, you will use file output so that the results of the calculations can be read into a spreadsheet program for convenient plotting.

Instructions

  1. Put the program files (futtest.cc, fut.cc, and fut.h ) in a directory on your machine where you want to work. Compile the program and run it, trying different values for the options's strike price and the underlying futures price. Compare the futures options prices with the corresponding stock option price (for the same strike price and the futures price equal to the stock price). Give one sentence explaining the difference.
  2. Add a member function to fut that can compute the value and the hedge ratio for the firm given that sales can depend linearly on the spot price price of copper. (See the notes below for more on this.)
  3. Modify the test program file futtest.cc to read the parameters from one file and write the output to another. You can prompt the user for the two file names, use input and output redirection, or open the files as streams whose names are compiled into the program. The output of the program should be suitable for reading into a spreadsheet. Include a loop in the program that varies the sensitivity of output to copper prices.
  4. Use the program to generate data for a graph of the optimal hedge ratio as a function of the sensitivity of output to copper prices. Read the data into a spreadsheet program to make the graph.
  5. Thought question What does your analysis suggest about the desirability of hedging the expected quantity of copper to be used?
  6. Thought question What would you say about the debate on the desirability of hedging? (Be brief.)
Extra for Experts
  1. Show how the hedge ratio depends on the futures price at a given maturity, using a modified version of the valuation/hedge ratio computation that does all the values at once (in the same binomial tree rather than in a separate binomial tree for each value of the futures price).
  2. Use the futures option part of the program in concert with your new commodity hedge function to devise a hedging program using at-the-money call options on futures (maturing with the futures) to provide a hedge that is more robust to large price movements.
  3. Thought question What adjustments would be required if the available futures mature much sooner than the date of the cash flows we want to hedge?
  4. Thought question What adjustments would be required to account for taxes? for randomness in sales not due to copper price changes?
A Simple Model of Revenues and Expenses

The formulation is consistent with the example in my paper with Bill Marshall entitled ``Risk Management: the Good, the Bad, and the Ugly.'' For simplicity, consider a hedge of one month's worth of cash flow realized one year from now and assume no taxes. We will only consider the risk that is determined by copper prices; in practice we would want to think about random variation due to other factors as well. Letting C be the copper price, assume that sales will be equal to
S=s0 + s1 C,
where s0 and s1 are constants. We would normally think of both demand and copper prices being high when the economy is doing well, so it is natural to think of s1 as being positive. (We can also think of circumstances in which they would move independently, for example due to civil war in a major copper-producing country that would drive up copper prices even in a flat economy, which is why a more complete analysis would allow for other sources of risk.)

To keep things simple, assume that the net cash flow is equal to profits=revenues-costs, as it might be if capital expenditure for maintenance were just equal to depreciation and there were no other complications. Taking the output price P and the unit cost excluding copper cost to be c, net cash flow is given by
(s0 + s1 C)(P - q C - c),
where q is the quantity of copper required per unit of output. Keep in mind that the call option program gives the amount of futures to buy to replicate the option; an optimal hedge should take the opposite position (e.g. sell instead of buy).

Your program will give fut a new member function to compute the hedge of net cash flow. You will have to decide what parameters the new component will be passed by the calling routine (in futtest.cc or wherever).

You will also be using file input/output for part of the assignment, using types ofstream and ifstream. Chapter 3 of Jamsa is a good reference for file input/output.

Exhibit A: the header file fut.h

// fut.h
//
// Binomial futures option pricing model: declarations
//
#define MAXTERNODES 40 

struct valhedge {
  double value;
  double delta;};
class fut {
public:
  fut(double ttm=.25,int npers=4,double r=.05,double sigma=.3);
  valhedge eurcall(double f0,double X);

private:
  int nper;
  double tinc,r1per,disc,disctm,up,down,pratio,prcup,prcdn;
  double val[MAXTERNODES];};
Exhibit B: the test file futtest.cc
// futtest.cc
//
// Binomial futures option pricing model: test
//
#include <iostream.h>
#include "fut.h"
main() {
  fut c1;
  valhedge x;
  double futprice,strikeP;
  cout << "\nType the futures price, a space, the strike"
    << " price, and then ENTER.\n"
    << "Make the futures price negative to terminate." << "\n\n";
  while(1) {
    cout << "futures-price strike-price: ";
    cin >> futprice >> strikeP;
    if(futprice < 0.0) {
      cout << endl;
      return(0);}
    if(!cin) {
      cout << "invalid input" << endl;
      return(1);}
    x = c1.eurcall(futprice,strikeP);
    cout << "call option value = " << x.value << "\n"
      << "hedge (number of contracts) = " << x.delta
      << "\n\n";}}
Exhibit C: the implementation file fut.cc
// fut.cc
//
// Binomial futures option pricing model: implementation
//
#include <math.h>
#include "fut.h"
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
fut::fut(double ttm,int npers,double r,double sigma) {
  nper = npers;
  tinc = ttm/(double) nper;
  r1per = exp(r * tinc);
  disc = 1.0/r1per;
  disctm = exp(-r * ttm);
  up = 1.0 + sigma * sqrt(tinc);
  down = 1.0 - sigma * sqrt(tinc);
  prcup = 0.5*disc;
  prcdn = 0.5*disc;}

valhedge fut::eurcall(double f0,double X) {
  int i,j;
  double futprice;
  valhedge x1;
// initialize terminal payoffs
// i is the number of up moves over the whole life
  for(i=0;i<=nper;i++) {
    futprice = f0 * pow(up,(double) i) * pow(down,(double) (nper-i));
    val[i] = MAX(futprice - X,0);}
// compute prices back through the tree
// j+1 is the number of periods from the end
// i is the number of up moves from the start
  for(j=0;j<nper-1;j++) {
    for(i=0;i<nper-j;i++) {
      val[i] = prcdn * val[i] + prcup * val[i+1];}}
  x1.value = prcdn * val[0] + prcup * val[1];
  x1.delta = (val[1]-val[0]) / (f0*(up-down));
  return(x1);}