Topics in Continuous-Time Finance



Navigation






New and not-so-old news


23/6:
Så er jeg kommet igennem jeres projekter. Alle er godkendt. Kig evt. forbi & hent & få kommentarer. Fra alle der ikke er Mat/Øk-stud. skal jeg have et cpr.-nr. aht. det videre papirarbejde. Hvis/når jeg bli'r meget energisk, så kommer der "min version" af et par Vasicek-svar.

Vi skal have lavet en kursusevaluering. Det sker ved udfærdigelse af en
kursusrapport. Til det er jeres input nødvendigt. Betragt det som en ekstraopgave til det afsluttende projekt at komme med mindst en kommentar.

Tirsdag 13/5 holdt Jesper Andreasen (jesper.andreassen@nordea.com; ja det er riggigt at der er et varierende antal s'er i navnet) & Dirk Bangert fra Nordea Markerts foredrag om "hva' det hele kan bruges til". Deres slides.

Det er nu slut med forelæsninger.

Endelige projekter:

Et link til FMLs "crash course" 26-30/5 om Risk Management. Jeg har pålidelige efterretninger om at studerende fra HCØ slet ikke skal betale.

The thesis topics & literature page


Coming Lectures


There aren't any!

Back to the top.


Past Lectures


Monday February 3:
Lots of practical stuff. See the slides. Especially: If somebody has objections/better suggestions for the evaluation construction, please tell me. (To remind you: Two "pass/do-over"-graded common projects that can be done in groups of up to 3. A larger final project (form a more or less specific list) that can be done in 3-groups, but if you want a 13-scale grade, you must do it on your own.
Very fast reminder of "pricing by no arbitrage". You may want to read Seydel's Chapter 1
Simulation. Random numbers from computers, Monte Carlo simulations & basic output analysis. Seydel 2.1-3.
I talked about the program R. You can get more info (and download R) here. I'll also bring some installation CDs to the lectures. But again: Use any software you like.

Wednesday February 5:
Variance reduction, I: Anti-thetic & control variates. Seydel 3.5; article by Boyle, Broadie, Glassermann, app. the first 8 pages.
My R-code for the simulations (you'll need the Black-Scholes functions too). (Made with XEmacs; looks odd when I open it with Notepad. Hmm...)

Monday February 10:
Time/accuracy-trade-offs. Variance reduction, II: Moment matching & importance sampling. In all, we've now covered about the first 20 pages of the BBG-article.
My slides.
My R-code for moment matching and for importance sampling .
You can find various introductions to R by following this link.

Wednesday February 12:
Simulating diffusion processes whose solutions you don't know. Seydel 3.1-3. My slides.
My R-code for Euler and for Milstein schemes.
(Der var en film jeg havde glemt hvad hed; "Troldmandens lærling" var det. Analogien er at i en scene hakker Mickey Mouse en genstridig kost i stykker; men det kommer der bare flere koste ud af. Ikke mindre genstridige, bare mindre. (Simpsons-fanatikere vil kende ideen fra en "Itchy & Schratcy"-film.) Det samme sker når man Ito-Taylor ekspanderer multiple integraler.)

Monday February 17:
Numerical solution techniques for partial differential equations. Seydel pages 99-106. I got to just about to embark on stability.
My R-code for for the explicit finite difference method from equation (4.6).

Wednesday February 19:
More numerical PDE solution. Stability (incl. an amount of linear algebra). Explicit and implicit finite difference methods. Numerical solution of (sparse) linear systems of equations. Seydel 107-9.
Seydel doesn't state it, but I did: The Lax-Richtmyer Eqivalence Theorem. Suppose we have a well-posed PDE (unique & sufficiently smooth solution) and a discretization scheme where the local trucation/disretization error (the remainder when the difference scheme is applied to the true solution; what we get from Taylor-expansions in other words) goes to 0 as steps sizes go to 0. Then the finite difference solution converges (ie. for any fixed T, app.soln(x-grid; T) -> true.soln(x-values; T)(in L^2 sense)) if and only if the scheme is stable.
I'll probably put that (and some more stuff) in a note later. But for now just think a little about what the theorem tells us. In particular it is important to understand the difference between local errors and global errors. The finite difference approximation is obtained by recursively solving a series of linear equations. Each of these contain discretization errors. When we take more steps, the error in each step gets smaller, but there are much more of them, so apriori it overall outcome isn't clear.
My R-code for the implicit finite difference method from equation (4.6) (this includes an O(N) algorithm (called Thomas'alg.) for solving tridiagonal systems).

Monday February 24:
More numerical PDE. The Crank-Nicolson method, including a detailed proof that the local truncation/discetization error is O((dx)^2 + (dt)^2). Seydel Section 4.3 and Exercise 4.3. I will at some not-too-distant future time write a supplementary note on numerical PDE solution. This will be in there. Global order determination and Richardson (as it is called) extrapolation. Seydel says something about it in Section 4.7. More details: "In the note". If you can't wait have a look at the notes by Ole Østerby that I have linked to below.
My R-code for Crank/Nicolson and some commands & results of extrapolation.

Wednesday February 26:
Recap of extrapolation, error estimation, optimal step size choice.
"Non-0" boundary conditions; possibly unknown. (Seydel 4.4)
Solving the real BS-equation (4.1), not just the heat-equation (4.2): Not hard, just a lot of terms to keep track of. ("Between the lines" in Seydel.)
American options: Reminder of american option pricing in the binomial model. (If you think of p=1/2 then u,d = exp( (r-sigma^2/2)dt +/- sigma dt^1/2) means that "P = Q" (approximately at least); the limit, however, is independent of what we put in front of the 'dt'-term.)
My R-code for plotting the exercise boundary and for examining convergence.

Monday March 3:
American options as free boundary value problems (you know what the function is at "the boundary"; you just don't know where the boundary is) or variational problems (same excecpt some things have been hidden). I proved that P^AMR = u(x,t) where the function u statisfies the (in)equalities
i) u_t + rxu_x + sigma^2 x^2 u_xx - r u <= 0
ii) u(x,t) >= f(x) (the pay-off function)
iii) (u_t + rxu_x + sigma^2 x^2 u_xx - r u)*(u-f) = 0.
This is Seydel's equation (4.25) and his problem 4.7 on page 124 (where it's given in the transformed world). The proof followed Lamberton & Lapeyre's "Introduction to Stochastics Calculus Applied to Finance". (You can find this book in the Actuarial Library.) The proof had two stages. The first is proving that the only arbitrage-free price for an American option is:
V^AMR (t)= sup_{tau: stopping time between t & T} E^Q(exp(-r*tau)*f(S_tau))
This seems reasonable, but is in fact tricky. Especially in continuous time. So I skipped it. You can find it in a dircrete world in Ch. 2 of the L&L-book; their Ch. 3 says something about continuous time.
The second part of the proof was showing that if u solves the PD in-Eq's, then V^AMR (t)= u(t,S(t)). This was easier than you'd think (Theorem 5.1.7 in L&L).

Wednesday March 5:
More about American options. "Naive PDE" solution: C/N looses a time order. This is PDE (or rather: it's dicretized version) does not hold on the point just above the boundary.
Here are some results that show this. And the R-code I used to produce them. (The you can also make your own versions of Seydel's Fig. 4.7 & 4.8)
However by using an iterative procedure called (projected) successive over- relaxation (SOR) can be used to find a solution that satisfies ALL relevant contraints. This is decribed in Seydel's appendix A5 and Section 4.6. The actual coding is not that hard (it's just (4.34a) (4.35)), and this method retains second-order time accuracy.
That was the good news. The bad news is that when I implement the SOR-method the time-consumption grows quadratically rapidly. Doubling the no. space steps makes each iteration take twice as long AND it makes the no. iterations needed double (or more) too. Hmmm, the literature also give mixed signals.
Here is my R-code that solves our "base-case" nice smooth heat-equation with SOR. I don't see anything wrong with it ...
There are two interpretations:
a) This was not a succes, so you should never try out "new, untested material" in a course
b) This was a succes, because we have laid some ground but still don't have a perfect solution. So there's a possible "final project".
I also handed back your "Project 1"'s. They were quite nice.

Monday March 10:
PDE's for other types of options. Seydel Ch. 6. (The astute student will note that we skipped Ch. 5 on finite element methods.) I handed out hard copies of the article "Partial to the Exotic" by Dewynne & Wilmott.
Particular emphasis on Asian options, that are options that in some way involve some stock price average (over time, of course).
With continuous averaging the price staisfies a 3-D PDE. That we knew from Bjørk (Prop. 7.6)
Sometimes a similarity reduction is possible, so price(t) = S(t) * H(A(t)/S(t),t), where H solves another PDE (that can't be more than 2-D 'cause there are no more arguments!).

Wednesday March 12:
Similarity reduction by change of numeraire. Then we (as noted by Rogers & Shi originally) can also get a PDE when the pay-off is of the form (average - fixed strike). See the article by Lewis posted below for more info. (But don't ask me about the cunning contour integration bits.)

Stocks with "lumpy dividends". Regular PDEs between dividend dates; at dividend dates stock prices jump but option prices do not ie. we have what is called a jump-condition V(S(t-),t-)= V(S(t+),t+)=V(S(t-)-dividend,t+). The process V(t) has continuous paths ("it's continuous"); the function x-> V(x |t) has a discountinuity at t. (So I if you call it a "no-jump"-condition, I don't mind.) See also Section 11.1 in Bjørk. This is easy to implement in an FD-solver. Here is the core of my R-code. If you want to test your full implemantation use Bjørks Proposition 11.6.

Many options satisfy d^2V/dS^2 = 0 in (space) boundaries. That's easy to implement in finite difference methods.
Finally I talked about other "jump features", such as discrete updating of averages. This can also be handled by jump conditions, but this time in "the other space variable". See Seydel 6.2.4. This idea is quite useful. Implementing it would make a nice final project.

Monday March 17:
We're done with Seydel. So we'll looked at big extensions of the Black/Scholes-model. First up: "Stochastic volatility". We started disretely and looked at GARCH models & at data. The basic GARCH(1,1) model says u(t) = \sqrt(h_t) \epsilon_t, with h_t = a0 + a1*h_{t-1} + a2*u_{t-1}^2= a0 + a1*h_{t-1} + a2*h_{t_1}epsilon_{t-1}^2, and where the epsilons are (n)iid random variables. See also the article by Frey below, or consult some econometrics book. There are a lot of different GARCH-models around. While they look quite simple, they are often "technically hard". I just got around to stating that GARCH(1,1) can converge to a 2-D diffusion.
My R-code for playing around with GARCH & data. To get this to work you need to install the package 'tseries'. On (your own) Windows you do that by clicking on "Packages" on the top, choosing "Install from CRAN" and then following the instructions. On the local system here at HCØ it's sufficinet to write "library(tseries)". To get full functionality from 'tseries' you need a few other packages. The documentation tells which. These all come with R, but are not loaded. That is done with the "library" command.

Wednesday March 19:
More stochastic volatility.
I proved (to some extend) that we can get diffusions as limits of GARCH models. Here are my slides; see also the paper by Frey (below).
Here is some more R-code til play around with GARCH and data.
We reminded yourselves how to price in (mildly) incomplete models such as the SV-case. This is known from Bjørk's Chapter 10, and is in virtually every book/article (with varying notation & elegance). My version looked like Gatheral's (which is really Wilmott's; see below). We arrived at a (2+1)-D PDE that prices of simple contingent claims most fulfill for arbitrage to be excluded. This PDE includes a (volatility) risk-premium (because volatility is nontraded). This can be stochastic BUT not "derivative dependent", ie. it depends on at most S, sigma and time.

Monday March 24:
More stochastic volatility.
The risk-premium & martingale formulations.
More or less specific call-price formulas. The quite useful conditioning/mixing argument of Hull and White, see article below. This argument works in the case where volatility is independent of the Brownian motion that drives stock-price changes (W_1). With some sleight of hand it can also help when there is non-0 correlation ("rho"). I proved Proposition 4.1 in Romano & Touzi's article. I have also posted a very nice article by Lewis that dicusses this.
Comparative statics for option prices in SV-models; "Smiles" (typically when rho = 0), "skews" (rho < 0; this means that what is really mispriced compared to Black/Scholes are (deep) out-of-the-money put options).
Empirical illustration: On the Chicago Board Options Exchange homepage you can - at any given time - find lots of price information about options. There is a lot of cross-sectional information; less relevant historial time series. These have to found from other sources, but this will do for introductory purposes.
Here are some data from 23/3 2003 for 1M options on SP500-index. And some more information. And some R-code to estimate yields and interest rates and plot implied volatility smiles and skews.

Wednesday March 26:
Further illustation of where to find option data, what to do with them and what they tell us. Here are some more data and information from 23/3 2003 for "different strike & exipiry-dates" options on SP500-index. This R-code can produce plots of implied volatilities. These neat skews for instance.
A benchmark SV model: Heston. Original article below; the Frey-paper and Gatheral notes discuss it too. I gave an outline of the derivation of the call-price formula. The need to actually invert the charateristic function is probaly new to you. (In Stat 1B for instance almost all charateristic functions are as if by magic those of the normal distrubtion.)For this you need a version of what is known as a Fourier inversion formula. (Characteristic functions and Fourier transforms work in much the same way up to some signs & sqrt(2pi) factors.) See here; or don't. The finer points in the complex integration needed to get from the general formula to to Heston's equation (18) (where T should be t) are beyond me. Maybe you can flesh them out ...?
Anyway, here's here's my implementation. (Note 2 self & possibly others: Not 100% road tested. I can still make this code misbehave. But the general idea is OK.)
You can now play around and see how the implied volatilities in the Heston model match the observed ones. Like this for instance. (Dotted lines are observations; full curves are implied volatilities from the Heston model.) For longer-dated options the Heston model fits observed implied volatilies quite well, but short-dated (deep) out-of-the-money puts are significantly more expensive than the model predicts.
This motivates the inclusion of jumps. Therefore I started on Jump-Diffusions. This involved hand-out from a book by Paul Wilmott and a paper by Jesper Andreasen. Monday March 31:
More jumps. I handed out the original jump-diffusion article by Merton. My arguments follwed the Wilmott-handout (from 26/3). We tried doing our usual hedge argument and discovered that the model is grossly incomplete; the problem is that the jump size is random. But if we assume that jump-risk is not priced then we arrived at a partial-integro-differential equation. This can be supported by thinking of jump risk as idiosyncratic in a CAPM-sense, see Merton's article, i.e. it can be diversified away by investing in many firms. An alternative way of saying this is that people are risk-neutral to jumps. Arguably, this is not the best argumnt in the world, but we need it to get somewhere. (Some risk-aversion could be introduced through "new parameters". Or see the hedging dicussion in the Wilmott-handout.) Anyway, if we further assume that jumps are lognormal, then we arrive at a call-price forumla where the JD-call-price is expressed as a sum of BS-prices (Wilmott p330; Mertob eqn. (9.19)). I didn't prove the formula explicitly, I merely gave an outline. The trick is to condition on the number of jumps and possibly to write(Bjørk Prop. 19.14) Call = S Q^S(lnS(T)>lnK) - e^-rT K Q(lnS(T)> K), as in Andreasen & Gruenewald. (The astute student will note that this trick also simplified matters for the Heston model.)
The formula itself is easy to code. By fudging with parameters, we can obtain at good fit the short term option prices, just look here. Our empirical treament of both stochastic volatility and jump-diffusions is very much "quick & dirty". Check the paper by Andersen, Benzoni & Lund for a very readable "state of the art" account emprical facts.
It should also be said that the jump-diffusion (where a simple Poisson-process governs jump arrivals) is not the only way to model jumps. Many authors will advocate modelling by (general) so-called Levy-processes.
I got started on local volatility models, see section 2 in the Gatheral StochVol-note.

Wednesday April 2
d^2 Call/dK^2 is proportional to the Q-density of the stockprice. You can use this on data but with brute force the picture becomes somewhat irregular.
More on local volatility models. I followed Gatheral, but handed out the article "Pricing with a Smile" by Bruno Dupire.
By doing some partial integrations I derived the Dupire forward PDE for call-prices. This is a PDE that "runs in" strike and expiry-date, so by solving it (for a given sigma-function) we can get prices for all calls in one sweep through a grid. Alternatively, we could isolate the sigma-function and try to infer it from data (various derivatives of the (strike,T)-surface of optionprices). This can be done, but it requires considerable regularization.I handed out the article "Riding on a Smile" by Derman and Kani. It discusses (in a binomial setting) one way of using the forward PDE to calibrate.
Inferring sigma from data is much more "calibration" than "estimation". There is no model control and if you come back a month later (in practice) you don't/can't use the shifted-sigma function to match prices, need to recalibrate. (This is sometimes called the forward volatility problem.) I have posted two articles below that discuss the empirical performance of various approaches to stock-price modelling and derivative hedging.

Monday April 7
Lectures cancelled.

Wednesday April 9
We went Black/Scholes-model and to do a brief stint on so-called static hedging. See this little note.
At the very end things didn't go as well as I had planned. I seemed to be missing an "exp(-r(T-t))"-term in for the h-claim to have value 0 at the barrier. The reason that happened was that I has forgotten that the R/N-derivative for the martingale measure corresponding to, say, S as numeriare is S(T)*exp(-rT)/S(0), not just S(T), see here, so I have to be a bit more careful. Another way os putting it is that I have to apply the "Abstract Bayes Formula", as given in for instance Proposition 14 (p67) in Chapter 5 in the Investment- and Finance-teory notes. This has now been clarified in the note.

Monday April 14
Clean-up of static barrier option hedging.
Start on stochastic interest rate model. The main complexity here is that at each date we have a whole curve, the term structre (in the guise of ZCB prices, or ZC yields, or forward rates) that we must model. We started out softly with some considerations about the Vasicek model. How to (maximum likelihood) estimate it. Theoretical and observed ZCB prices din't match. That's where "calibration" comes in. Some of the calibration can be intepreted as a change between P and Q.
You should refresh your memory by reading Bjørk Chapters 15-19.

Wednesday April 16 & Monday April 21
Easter break. No lectures.

Tuesday (yes!) April 22
I killed two birds with one stone and merged the lectures with lectures I'm giving in a continous-time finance (PhD) course. We are at exactly the same point in the narrative in the two courses. my slides from the lectures. There is more info + some of the referenced literature here (general) and here(RP specific) There were 3 paticularly relevant topics, that may ot may not be new to you: 1) Pricing options on coupon bonds (harder than you'd think) 2) LIBOR market models (easier than you'd think) 3) Cap and swaption pricing & applications hereof; in particualr the exercise with to stylized capped floating rate loan.

Wednesday April 23
No lectures. Maybe you went to David Lando's PhD-course lectures about jump-diffusion processes. Maybe you didn't. Either is fine.

Monday April 28
Calibration of interest rate models.
Multi-dimensional models.
Mortgage-backed bonds.
Covered in Chapter 3 & 4 of Brigo & Mercurio which I handed on (on 30/4).

Wednesday April 30
Practical info. In particular: Jesper Andreasen "et al" from Nordea will do a highly relevant show for your amusement on Wednessday May 14. More info will appear at the top of the page as soon as I get it.
Hand-back of project 2. Hard work. Nice too. See my code(s) for solution in the "Projects"-section below. Summary of the course & brief intros to final projects.
My slides


Back to the top.


Projects


Project 1 Hand-in date: 24/2. Groups of at most 3.



Project 2 Hand-in date: 9/4. Lastest verison 12/3. Changes: Hand-in date moved 1 week & a typo-correction ('i+1'->'i').
A "sufficient version" (dated 24/3) of Project 2.

My finite difference code: The R-code with my core functions is this one .
An R-source-file is here.
Some messy code that solves the heat-equation tranformed problem (among other things)

An Excel-file with build-in VBA-modules that solve the B/S-PDE. (As in the paper by Peter Honore & I. ) Some fairly slow calculations are involved so "recalculation" has been set to "manual", ie. you have to press F9 to recalculate.



Suggestions the final project. Lastest verison 1/5. More may follow. Hand-in date: 10/6.


Back to the top.


Articles, Papers & Other Stuff

Posting these is probably a major copyright infringement.

Desmond Higham shows
how and how not to compute option prices in the (or rather: a) binomial model.

Boyle, Broadie and Glasserman on Monte Carlo simulation.

Some notes on order determination, error estimation and extrapolation (for PDE solutions) by Ole Østerby from the Dept. of Computer Science at the University of Aarhus.

An article by Alan Lewis about (fixed strike) Asian options.

A survey article by Rudiger Frey about stochastic volatility
Some course notes by Jim Gatheral about stochastic volatility and implied volatility models.
A classic article by John Hull & Alan White about stochastic volatility.
Alan Lewis with some extensions of the Hull/White conditioning idea. The idea that conditioning also works with correlation may be more clear from Proposition 4.1 in Romano & Touzi.
The original article with Steven Heston's stochastic volatility model
.
Two articles on empirical hedge performance: Dumas, Flemming and Whaley and Bakshi, Cao and Chen.


Back to the top.