Midterm Exam Review

My handwritten notes for the midterm so far: put-call parity, binomial trees, the Black-Scholes assumptions and formulas, the Greeks, and the VBA code behind all of it.

Handwritten notes: put-call parity, a one-period risk-free portfolio and the call price formula, the VBA Max function, and the two-period and n-period call prices

Handwritten notes: the model’s assumptions, the stock price equation and its discretization, the Black-Scholes PDE and formulas, and a list of the Black-Scholes assumptions

Handwritten flowchart notes: the four flowchart symbols, a counter loop, and the profit or loss of a call option

Handwritten notes: payoff diagrams of a long call, long put, short call and short put; recording and running a macro; and a table of VBA data types with sizes and ranges

Handwritten VBA code: a Select Case statement and a Do loop

Handwritten notes: MsgBox and InputBox, using a worksheet function in VBA, comparison operators, and the logical operators Not, And, Or, Xor, Eqv and Imp with their truth tables

Handwritten notes: where a variable can be used (Dim, Public), the Set command, and the Greeks formulas for calls and puts

Handwritten VBA code: the binomial model for a European call, one period and two periods

Handwritten VBA code: the binomial model for an American call, two periods

Handwritten VBA code: a European call on a binomial tree, written into worksheet cells

Handwritten VBA code: an American call on a binomial tree, written into worksheet cells

Handwritten notes: the Excel functions NormDist, NormSDist, NormInv and NormSInv with one example each

Handwritten VBA code: simulating a Wiener process

Handwritten VBA code: simulating a stock price path with the discretized stock price equation

Handwritten VBA code: simulating a stock price path with the exponential form of the stock price equation

Handwritten VBA code: Monte Carlo simulation of the stock price at maturity and its mean

Handwritten VBA code: the Monte Carlo price of a European call

Handwritten VBA code: the Black-Scholes price of a European call and put, next to the formulas

Handwritten VBA code: historical volatility from eleven closing prices

Slide: the Black and Scholes formula with d1 and d2

Table of the Greek formulas for calls and puts: value, delta, vega, theta, rho and gamma

Image sources:


Heads-up. The figures here are the original notes, slips and all. A few things to watch for:

  • In the table of VBA data types, the Date range is January 1, 100 to December 31, 9999, not 1990/01/01 to 9999/12/30.
  • In the operator notes, read the Imp truth table with the rows as Y and the columns as X: X Imp Y is false only when X is true and Y is false.
  • In the Greeks table, the put delta is $-e^{-q\tau}\Phi(-d_1)$, not $-e^{-q\tau}\Phi(d_1)$.
  • In the two binomial routines, $t = 1$ with $n = 5$ makes each step 0.2 years; for one and two periods to maturity, $n$ should be 1 and 2. The two-period routine also writes u and d where its variables are named up and dn.
  • In the Black-Scholes code, the denominator of d1 needs parentheses: d1 = (Log(S / K) + (r + 0.5 * v * v) * T) / (v * Sqr(T)). Written as / v * Sqr(T), VBA divides by v and then multiplies by Sqr(T), so d1 comes out multiplied by T and the call price is off (32.67 instead of about 32.86).

Comments

Discussion happens via GitHub Discussions. You'll need a GitHub account to comment.