You are on page 1of 9

FINS 3635 Computer Assignment

For this assignment, you may work in groups of up to four.


The due date for the assignment is Friday, 1 June, 2018 by 11pm. Please submit one copy
of your assignment per group to the Assignment link on Moodle. I don't require that you use
a UNSW cover page, but please be sure that all your names and IDs are clearly visible. If
necessary, try to indicate which is your surname (by underlying or using all caps).

Introduction
The purpose of this assignment is to have you solve a number of problems using a variety of
spreadsheets that will be provided to you. For the most part, the spreadsheets are designed so
that you need merely enter the input variables, which are indicated by the red font. You
should only have to change the variables with the red font. Some other colours are used as
well, for example, in some cases the solution is given in blue font.

NOTE: any input variables that happen to be in the spreadsheet when you receive them
should be considered to be irrelevant. You will provide all the relevant input variables.

For each spreadsheet, answer the questions provided. The questions will be indicated by
letters, (a), (b), etc. Generally, each question is worth 1 mark. Please do not hand in a
spreadsheet unless explicitly asked to do so.

Introduction to the Spreadsheets Puts&Dvd.xls and Call&Dvd.xls


NOTE: in order to use all the features of the spreadsheets Call&Dvd.xls and Puts&Dvd.xls, you
need to go to Tools, Add-Ins, and make sure there’s a check mark beside Analysis ToolPak-VBA.
Also, make sure that there’s a check mark beside Solver.

Note also that the Analysis ToolPak-VBA add-in is only needed to find the dates of dividend
payments. This assignment doesn’t have any questions involving cash dividends, so this add-
in is not needed for the assignment.

Nevertheless, you do need Solver, and just in case you want to use these spreadsheets in the
future, let me show you how to add-in these two features. To do this with Office 2007, click
on the Microsoft Office button on the upper left corner. When the window comes up, look
for Excel Options at the bottom of the window. Then click “Add-Ins”. Then, in the Manage
box at the bottom of the window, select Excel Add-ins, and then hit Go. Make sure there are
ticks beside Analysis ToolPak-VBA and Solver.)

Many of the bond functions require the Analysis ToolPak-VBA add-in. In the past it has been
difficult to send files to students because of these bond functions. Therefore, I used to
remove the “equal” signs from all the bond functions. Now, however, I have included the
equal signs, as it doesn’t seem to be a problem any longer. Please let me know if I’m
mistaken about this.

The files Puts&Dvd.xls and Call&Dvd.xls calculate option prices using the binomial model we
learned in class. One thing that each of the spreadsheets has in common, is that the binomial
tree
Su

Sd
is represented in the spreadsheets as

S Su
c cu

Sd
cd
So, as prices move horizontally, they increase. So, for example, when the price of the
underlying asset is given in row 21, if the price moves up, it stays in row 21, if the price
drops, it moves down to row 23 (in the next column). (In general, once the price is in row 21
it can’t move back up to row 19, despite appearances; the best it can do is move horizontally.)
Also, the call (or put, depending on the spreadsheet) prices are given right below the stock
prices. For example, if the stock price is given in row 21, then the corresponding American
call price appears in row 22 (in blue font), directly below the stock price (given in black
bold). So, in a sense, one “node” in this case, is two cells high and contains information
about the price of the underlying asset, and the American call (or put).

The price of the European call (or put) is calculated in column CZ, to the right of the binomial
tree. This uses the formula
n
Price = f = e−rTEp[fT] = e−rT ∑ Binom(i, n, p ) × f i ,n ,
i =0
where i = the number of “up” ticks, n = total number of steps in the tree, the payoff fi,n is the
same notation used in Ch. 19, and Binom(i, n, p) is the binomial probability of having i up
ticks out of n steps when the probability of an up tick is equal to p. (In fact, Binom(i, n, p) =
n!
p i (1 − p )n −i .)
i !(n − i )!

Note that these spreadsheets were also designed so that they could (fairly) easily be made
larger. You should be able to use Copy and Paste in order to make these trees as big as you
like. Note, however that if you do make the tree larger, you need to change the number for n
(in cell L5). The time to maturity, T, and the number of steps, n, are independent of each
other.

Acquaint yourself with the option pricing spreadsheets, Puts&Dvd.xls, Call&Dvd.xls TrinCall.xls
and TrinPut.xls. At the top of each spreadsheet you’ll find all the input variables: r = rate =
risk-free rate per annum (continuous compounding), q = dividend yield per annum (also with
continuous compounding), S = current stock price, X = exercise price, σ = sigma = volatility
per annum, as well as the Settlement Date (normally the date on which the option was
traded), the Option Expiry Date, and for the two spreadsheets Puts&Dvd.xls and Call&Dvd.xls
we also have Next Dividend Payment Date, the Dividend Payment, and the Number of
Dividends per year. The spreadsheet automatically calculates T = time to expiration (in
years, assuming 365 days in a year). Most of the cells containing input variables are
named. You can see the name of a cell by looking at the box in the upper left-hand corner of
the spreadsheet.

The values used in the Binomial tree, u, d, a, p, Smax, and Smin, are calculated from these input
variables, as are the values, d1, d2, etc., used in the Black-Scholes formula (given in cell F11).

2
Note that the spreadsheets use the Control Variate Technique to get better estimates of the
American option. This technique is described in Hull Ch. 20, section 20.3 p. 440 (8th Ed.).

Now let’s look at some of the features of Puts&Dvd.xls and Call&Dvd.xls in more detail.

Row 15 gives the dividend payments, row 16, the discount factor, and row 17 calculates the
present value of all remaining dividends. The counting numbers in row 18, and in column B
are just used to calculate the various prices in the tree.

To make sure that the dividend payment dates are precise, I’ve added some bond functions in
cells R2 – BE2. These bond functions require that you go to Tools, Add-Ins, and make sure
there’s a check mark beside Analysis ToolPak-VBA. Note that this only applies to the
spreadsheets Puts&Dvd.xls and Call&Dvd.xls.

Look at the formula in cell C19 (the stock price). The IF statement is merely designed to
make it easier to expand the binomial tree by using Copy and Paste. If you copy this equation
to an area that is below the tree, it produces a period, “.”.

Now look at the formula in cell C20 (American option). This cell contains the same IF
statement as in the previous case, but it also contains the MAX statement that involves the
early exercise option.

1. Implied Volatility
For this problem you’ll need to use Solver in EXCEL to find a put option’s implied volatility.
(NOTE: Goal Seek may also work.) Here we’ll use Puts&Dvd.xls. Suppose you observe a put
option with price P = $2.00, and suppose that the input variables are: r = 6% (compounded
continuously), q = 0, S = 40, X = 40, Option Expiry Date = settlement + 130, and the stock
pays no dividends, but sigma is unknown. We can use EXCEL to solve for sigma. This is
done using Solver, as we now describe. This approach is also used in question 4 below.

You can ignore the dividend payment if you set Dividend pmt equal to 0. If this is done, the
next dividend payment date and number of dividends per year become irrelevant.

We now want to use Excel’s Solver to find implied volatilities for each option. For a given
option, first enter the input data (stock price, settlement date, maturity date, risk-free rate and
exercise price) into the spreadsheet Puts&Dvd.xls. Next, enter the Market price in cell M11.
Here is a nice trick for finding the implied volatility.
(Step 1) Under Tools, click Solver. (For Office 2007, you go to Data, and then on the top
right-hand side, you’ll see Data Analysis, and then Solver. Again, make sure that
Solver has first been “added in”.)
(Step 2) Under Set Objective, enter the cell containing the American option price, I11 (or
click cell I11 in the spreadsheet). For the European put price use cell F11, the
Black-Scholes price.
(Step 3) Next to Equal to, click the circle beside Max.
(Step 4) By Changing Cells: enter the cell containing the value of sigma, E5.
(Step 5) Subject to the constraints: click Add, and enter the equation I11 = M11, (or F11 = M11
for the European put) and click Solve. Cell E5 in your spreadsheet will now contain
the implied volatility for this option.

(a) What is the implied volatility for this option if it is a European put?

3
(b) Repeat the above procedure assuming that the option is an American option (i.e., for
Set Target Cell, enter the cell containing the American put price). What is the implied
volatility for the American put?
(c) Very briefly (in two or three sentences maximum) explain why we get a lower
implied volatility when we assume that it is an American put.

2. Historical Volatility for the S&P/ASX 200


We want to estimate the S&P/ASX 200’s volatility using past prices. We can use the data in
S&P-ASX 200.xls to estimate the historical volatility. (Source: Datastream.) Using the
technique described in class, (see slide 8-9 from lecture 14&15, or section 14.4, p. 304, 8th
Ed., or section 15.4, p. 348-9 of the 9th Ed. of the textbook) you’ll first calculate the daily
continuously compounded returns, and then the (annualized) volatility. Use the prices in
column B. Put the daily continuously compounded returns in column C, with the first return
in cell C3.

(a) Using the entire series of stock prices, what is your estimate for the (historical)
volatility?

Next, let’s use this procedure to see how the volatility has changed over time. Assuming that
the daily continuously compounded returns are in column C, move to the first free column (D,
say) and go to row 52. Calculate the (annualized) volatility using the first 50 daily returns [so,
in my spreadsheet, in cell D52, I would just type =STDEV(C3:C52)*252^0.5]. Now COPY this
formula and PASTE it into the remaining cells in the column. (Alternatively, you can drag the
formula down; whichever works best for you.) This will give you a time series of volatilities
(where each volatility is calculated based on 50 daily returns.)
(b) What’s the maximum volatility over the period? The minimum? The average? (Use
MAX, MIN and AVERAGE in EXCEL.)
(c) Repeat part (b) using the calculated volatilities starting from 1 February, 2017 (row
531). Is the spread between the maximum calculated volatility and the minimum
calculated volatility much different from the spread given by the entire period?
(d) Graph the entire time series of volatilities in Excel. Does volatility seem to be
constant? (Just use your judgment.)
(e) We’ll compare historical volatilities to option implied volatilities in a later question.

3. Interest Rates and SPI Futures


For this question, I have decided to use interest rate futures to find the risk-free rates for our
options. We’ll do the option pricing in the following question, but for now let us calculate
the continuously compounded risk-free rates and use them to find dividend yields implied by
SPI futures prices.

For the interest rates, we’re using 30 Day Interbank Cash Rate Futures (sometimes we use
one 90 Day Bank Accepted Bills Futures). The Settlement prices can be found in the
Newspaper data. The newspaper is from 7 March, 2018, which means that all the data is
from the previous date. So, for these problems, the settlement date is 6 March, 2018. In
case you can’t read the column headings, here they are:

4
SETTLEMENT
$Value Vol- Prev.
Ex Prev. Open- High Low Price Change of ume O/P
Price Price ing Chng
Trade

These headings are the same for the 30 Day Interbank Cash Rate Futures (and the 90 Day
Bank Accepted Bills Futures) as well as the SPI 200 futures and options.

We’ll assume that the futures contracts that mature first give us the 30-day spot rate. Using
this rate and the futures rates we can find the spot rate for each maturity.

ASIDE: For those who are interested, here’s how we use the quoted forward prices to
calculate the risk-free rates needed for our option pricing. First, note that the futures prices
are quoted prices. Suppose the August futures price is 95.00. Then the corresponding
interest rate is 100 – 95.00 = 5%. (These calculations are done in column E.) Let’s call this
interest rate F0,1. The second contract (with maturity in September) gives us the forward rate
that is locked in from date t1 to date t2 = t1 + 30 days, denoted by F 1,2, and so on. I’m
assuming that the spot rate uses simple interest, so in general, a futures contract that matures
at date tk would deliver a 30-day zero coupon bond that matures 30 days later, at date tk+1, and
this bond would have a locked-in price of
1
,
30
1 + Fk ,k +1
365
which does assume simple interest, and for convenience assumes a face value of $1. Let
b(0, tn+1) be the price (today) of a zero coupon bond that pays $1 at date tn+1. It is possible to
show that

1 1 1
b(0, tn +1 ) = × ×K × .
30 30 30
1 + F0,1
1 + F1,2 1 + Fn,n +1
365 365 365
Sometimes the last term in this product uses a maturity of 90 days. These calculations are
done in column G.

Note that the final futures contract used matures at date tn, but the zero coupon bond matures
at date tn+1. This is reflected in the difference between the futures maturity month in column
B and the Zero coupon bond maturity month in column K.

These bonds give us the discount rates we need for pricing options and futures, but we need
to find their yields using continuous compounding. So, if we write the bond price using
continuous compounding, i.e., b(0, tn +1 ) = exp( − rn +1tn +1 ) , then we can solve for rn+1:
rn +1 = − ln[b(0, tn +1 )] / tn +1 . These calculations are done in column J.

Enter the futures prices in column D. Use Settlement Prices for 30 Day Interbank Cash Rate
Futures. (This semester we don’t need any 90 Day Bank Accepted Bills Futures).

(a) What are the continuously compounded risk-free rates for each maturity? You can
present a table of these values. Include the quoted futures prices in your table (to
make it easier for me to mark). These rates will be used to find futures prices and
option prices below.

5
As a quick application, let’s find dividend yields for SPI 200 futures. Here we assume that
the March futures price is the spot price, S. We then use the formula F = Se(r – q)T to solve for
the dividend yield, q. Enter the SPI 200 settlement prices for each maturity in the appropriate
cells in column C. These contracts mature on the Friday after the third Thursday of the
maturity month (i.e., the day after the third Thursday). Enter these dates in the appropriate
cells in column D. Using the continuously compounded risk-free rates from the top of the
spreadsheet, enter the correct risk-free rate for each maturity in the appropriate cells in
column F. The dividend yield for each contract is given in column G.

(b) What are the (continuously compounded) dividend yields for each maturity? You
can present a table of these values. Include the futures prices, maturity dates, and
risk-free rates in your table (to make it easier for me to mark).

4. Newspaper Prices
For this question, we are using the Newspaper data pdf file for SPI 200 index options. The
underlying asset for these options is the SPI 200 futures, so these are options on futures, and
they are American options. The maturity date is the same as for the corresponding futures
contract, with the same maturity month as the option. If you can’t read the headings in the
pdf file, the headings are the same as in the previous question.

Note that the spreadsheets are designed to price options on an asset paying a dividend yield,
q. To see how to use this spreadsheet to price options on futures, see Hull p. 370, Section
17.8 8th Ed or p. p. 414, Section 18.8 9th Ed, or see slide 36 from the Ch 17&18 lecture notes.

Using the spreadsheet Puts&Dvd.xls, we want to find implied volatilities for some of the
options listed.

For the risk-free rate, use the continuously compounded risk-free rates calculated in the
previous question.

We now want to use Excel’s Solver to find implied volatilities for each option. See question
1 above for a description of how to use Solver to find implied volatilities.

Find the option implied volatilities for the June 18 put options with strike prices
5350, 5400, 5625, 5650, 5675. You can ignore the multiplier for this question; that is ignore
the comment (A$25 × SPI200).

(a) What does the 18 refer to? Show me all your inputs for this problem (i.e., the cells
with red font). This is in order to make it easier for me to mark the question.
(b) Show me a table of strike prices and implied volatilities for these options. Is there
any evidence of a volatility skew or smile?
(c) Graph the implied volatilities as a function of the strike prices. Is the pattern
interesting?

Now, find the option implied volatilities for the September 18 put options with strike prices
5300, 5375, 5600, 5625, 5725.

(d) Again, show me your inputs for this problem (i.e., the cells with red font). This is
in order to make it easier for me to mark the question.
(e) Show me a table of strike prices and implied volatilities for these options. Is there
any evidence of a volatility skew or smile?

6
(f) Graph the implied volatilities as a function of the strike prices. Is the pattern
interesting?
(g) How do all the option implied volatilities compare to the range of historical
volatilities found in question 2 above? Use your judgement; e.g., compare the
range of historical volatilities to the range of implied volatilities from this question
and see if they overlap substantially.

5. Portfolios
Using Portfolio.xls, assume that r = 6% (compounded continuously), q = 0, S = 26.30, and σ =
0.25. Suppose the following options are available on this stock:

Call/Put Time to Maturity (days) Strike Price


Call 30 26.00
Call 30 26.50
Call 60 26.00
Call 60 26.50
Call 60 27.00
Call 90 26.50
Put 30 26.50
Put 30 27.00
Put 60 26.50
Put 90 26.00
There may be space on the spreadsheet for more options. You can ignore those other rows if
you just assume that the number of contracts you hold in those options (column B) is equal to
zero. In column C you enter the type of option; so, e.g., if you type call, the spreadsheet
calculates the value of the call (column G) and each of the Greek letters for the call (columns
H-L).

For the maturity dates, enter =TODAY + 30, etc in column D. The spreadsheet is designed to
continuously update today’s date, so you won’t be able to type in actual maturity dates for
this question. Enter the strike prices in column E. Note that the spreadsheet also allows for
different implied volatilities (column F), but at the moment, I’ve set each implied volatility
=SIGMA, so if you enter the volatility into cell D7, you don’t need to worry about the other
implied volatilities.

When using the graphs, if either T1 or T2 are greater than one of your maturity dates, then
that option will not appear in that graph. Also, in general, you may have to click on the
graph’s x-axis to re-set the minimum and maximum values. Note that there are two graphs,
one using a non-smoothed plot and the other (to the right of the first) using a smoothed plot.

The market convention in Australia for equity options is that one option contract is actually
for options on 100 shares, usually. This is shown in column A.

(a) Assume that you buy 500 of each of the above options contracts (but no shares or
futures). Report the value of this portfolio, and of all the portfolio “Greeks”. Also,
report how the value of the portfolio changes when various inputs change.
(b) How many shares of the underlying asset must you buy or sell if you want the above
portfolio to be (approximately) delta-neutral? (You should round off to the nearest
integer.) With this delta-neutral portfolio, what is the effect of increasing or
decreasing S by 1% (see the portfolio changes in row 7 of the spreadsheet)? Is it
(approximately) symmetrical? Was it symmetrical in the previous case? If not, why
not? What would be the effect of increasing or decreasing S by 1% if the portfolio

7
delta was still zero but gamma was the negative of its current value? What is the
simplest way to form such a negative gamma portfolio?
(c) Now assume that you own 50,000 shares of the underlying asset as well as 500 of
each of the option contracts. We want to use the call option with the largest delta,
and the put option with most negative delta. With these two options use Solver to find
out how many of these options you have to hold (i.e., be long or short) in order to be
both delta and gamma-neutral. [HINT: you can set gamma equal to zero subject to
the constraint that delta equals zero. You do this while changing two cells in column
B. Again, round off to the nearest integer number of options.]
(d) Hand in a screenshot of the first page of this spreadsheet showing the delta and
gamma-neutral portfolio. (This is to make it easier for me to mark.)

Graphing the payoff of a combination of options.


(e) Assume that you buy 1000 put option contracts with strike price 26.50 and 60 days to
maturity. How many 60-day 27.00 call option contracts must you sell in order to pay
for this put option? (In other words, you want the initial value of this combination of
put and calls to be equal to zero dollars—assuming there are no other assets in this
portfolio.)
(f) Explain briefly why a hedger (not a speculator) might want this combination of
options.
(g) Consider the graph of the value of this combination after T1 = 30 days, and after T2 =
59.99 days. Use either the non-smoothed graph or the smoothed graph (to the right of
the first graph)—whichever you prefer. Hand in a copy of your graph.

6. Comparing the Spreadsheets


Consider an American put option with S = 110, X = 100, σ = 20%, r = 12%, q = 8% (both
with continuous compounding) and T = 0.25 years. The correct price of the put (based on a
10,000 step binomial tree) is 0.7832.

We haven’t discussed the TrinPut.xls or the Analytic.xls spreadsheets in class, but you should be
able to enter the correct inputs in each spreadsheet. If you want more details about trinomial
trees, see the aside in the Ch. 21 lecture notes.

There is one thing that you MUST do in order to use the Analytic.xls spreadsheet. This
spreadsheet requires that you use Solver. First, enter the input variables, as usual (i.e., the
cells with red font). Now, to find the call price, use Solver to set the Call Equation (cell J16)
equal to zero by changing S* (cell A16). To find the put price, use Solver to set the Put
Equation (cell J22) equal to zero by changing S** (cell A22). These instructions are also
given at the bottom of the spreadsheet. The interesting thing about this spreadsheet is that S*
represents the price at which you should exercise the call immediately, and S** is the price at
which you should exercise the put option. This is interesting information. For more on this
analytical approximation, see the Aside at the end of Ch. 21, if you’re curious.

(a) Calculate the price of the American put using three spreadsheets: Puts&Dvd.xls,
TrinPut.xls, and Analytic.xls. What is the put value according to each spreadsheet?
Which spreadsheet comes closest to the true value?

7. Early exercise of the option


(a) Using Puts&Dvd.xls, I want you to write an IF statement that will tell you whether or
not to exercise an American put early for a given stock price at a given step. Write
the statement so that it will produce an “X” if you are to exercise, and an “O”
otherwise. Write the IF statement as if you were applying it to the option price in cell
F26 (i.e., corresponding to the lowest stock price at step 3.)

8
(b) Now I want you to apply the formula you’ve written above. Use the input values from
question 6 above. At the 28th step of the tree (column S), what is the highest of the
stock prices in that column at which you would exercise the put?

You might also like