Computational Finance Course: Java version

Philip H. Dybvig
Washington University in Saint Louis

Philip H. Dybvig Teaching Page

Syllabus MBA version (FIN 549A) --- undergrad version (FIN 400B)

Many thanks to our excellent speakers who helped to enrich the class by telling us about institutions and how the tools we are studying apply to their businesses:

Dave Eichhorn (NISA)

Adam Olive (Bank of America)

Dan Scholz (NISA)

Michael LaCour-Little (Wells Fargo)

I have translated a modern fast random number generator called the ``Mersenne Twister'' (aka MT19937) from C into java: MTwister.java. The original C version by Makoto Matsumoto and Takuji Nishimura can be found at http://www.math.keio.ac.jp/matumoto/emt.html.

Final presentations are on April 25 and 30. Contact me if you need any last-minute help.

The Midterm Exam has been graded. Competition was tough at the top, with about half the course scoring over 85 and about a third of the class scoring over 100. One reason was the easy extra credit problem of describing an application of our tools from one of the class presentations. The rest of the grades were spread out more. The graded exams have been returned to mail files. If you did not receive your exam (probably because we did not find a mail file for you in the school), you can probably pick it up from Lenda Massie in Simon 220.

I graded the exams myself, so come to me if you have any questions. I am eager to fix it if I have made a major error in the grading, but you may not find me sympathetic if you come in looking for a few additional points.

This year's midterm Answers

Here are some sample exams (from past offerings of the course) with answers.

Sample exam 1 Answers

Sample exam 2 Answers

Submitting homework Please e-mail your homework to fin450@dybfin.wustl.edu if you are enrolled in FIN450 or to fin549a@dybfin.wustl.edu if you are enrolled in FIN549A. Include answers to the questions and your .java, .html, and .class files.

My contact information:
Phil 935-4569 Simon 205 dybvig@dybfin.wustl.edu

TA contact information:
Paskalis 935-4884 Simon 284 glabadanidisp@olin.wustl.edu
Yufeng 935-4884 Simon 284 hany@olin.wustl.edu
Yuriy 935-7167 Simon 150 fedyk@olin.wustl.edu

Homework 0 NPV applet: Start learning the Java language using a very simple finance application!
...Homework assignment cfinjh0.html ... Due January 31
...HTML file NpvA.html See the applet you will modify! (use "save as" to save the .html file -- but not the applet -- to disk)
...Java program file: NpvA.java
...Compiled applet class file: NpvA.class
...More information -- a browser file containing heavily annotated versions of NpvA.html and NpvA.java NpvAnotes.html
...Still more information -- hints hints.html and fixes for some problems we have encountered fixes.html

Homework 1 Binomial option pricing applet: utilize the workhorse of option pricing and risk management! originally developed by Cox, Ross, and Rubinstein
...Homework assignment cfinjh1.html ... Due February 14
...HTML file CrrA.html See the applet you will modify! (use "save as" to save the .html file -- but not the applet -- to disk)
...Java program file: CrrA.java
...Compiled applet class files: CrrA.class and Crr.class
...More information -- a browser file containing heavily annotated versions of CrrA.html and CrrA.java CrrAnotes.html

Homework 2 Binomial Interest Rate Cap pricing applet: utilize the binomial model to price interest derivatives!
...Homework assignment cfinjh2.html ... Due February 28
...HTML file Caplet.html See the applet you will modify! (use "save as" to save the .html file -- but not the applet -- to disk)
...Java program file: Caplet.java
...Compiled applet class files: Caplet.class and F_I_bin.class
...More information -- a browser file containing annotated versions of Caplet.html and Caplet.java Capletnotes.html

Homework 3 Futures Option Pricing Program: compare theoretical prices to prices pulled off the Web!
(note: standalone program -- cannot view in Web browser and no .html file to download)
...Homework assignment cfinjh3.html ... Due March 23
...Java program files: FutOpStart.java, FutOp.java, and ValHedge.java
...More information -- a browser file containing annotated versions of FutOpStart.java, FutOp.java, and ValHedge.java FutOpnotes.html

Homework 4 Asset Allocation Simulation: see the implications of portfolio decisions!
...Homework assignment cfinjh4.html ... Due April 5
...HTML file AssetAlloc.html See the applet you will modify! (use "save as" to save the .html file -- but not the applet -- to disk)
...Java program files: AssetAlloc.java and BasicLinePlot.java
...Compiled applet class files: AssetAlloc.class, ValuePlotFrame.class, AssetAllocEngine.class, AssetAlloc.class, and BasicLinePlot.class
...More information -- a browser file containing annotated versions of AssetAlloc.html, AssetAlloc.java, and BasicLinePlot.java AssetAllocnotes.html

Homework 5 Stochastic Volatility Option Pricing Simulation
...Homework assignment cfinjh5.html ... Due April 17
...HTML file SVPrice.html See the applet you will modify! (use "save as" to save the .html file -- but not the applet -- to disk)
...Java program files: SVPrice.java and SVPriceEngine.java
...Compiled applet class files: SVPrice.class, SVPriceFrame.class, SVPriceEngine.class
...More information -- a browser file containing annotated versions of SVPrice.html, SVPrice.java, and SVPriceEngine.java SVPricenotes.html

Lecture -1 Course Perspectives
...Adobe .pdf file size 140K
...portrait .pdf file size 108K

Lecture 0 Review of Net Present Value and a Java NPV Applet
...Adobe .pdf file size 117K
...portrait .pdf file size 76K

Lecture 1 Review of Binomial Option Pricing and a Java Binomial Option Pricing Applet
...Adobe .pdf file size 155K
...portrait .pdf file size 98K

Lecture 2 Binomial Interest Option Pricing and a Java Binomial Interest Cap Pricing Applet
...Adobe .pdf file size 130K
...portrait .pdf file size 87K

Lecture 3 Pricing Futures and Futures Options and a Futures Option Pricing Program
...Adobe .pdf file size 132K
...portrait .pdf file size 88K

Lecture 4 Asset Allocation Simulation concepts and Applet
...Adobe .pdf file size 147K
...portrait .pdf file size 96K

Lecture 5 Simulation Estimation of Option Prices and Stochastic Volatility Option Pricing Applet
...Adobe .pdf file size 93K
...portrait .pdf file size 91K

Some useful resources:

NCSA (at UIUC) Beginner's Guide to HTML

Java Tutorial (local mirror -- password required outside .wustl.edu)
Java Tutorial (version at SUN)

Java API (application user interface) references (local mirror -- password required outside .wustl.edu, part of JDK documentation available from SUN below):
...Index of Methods and Variables
...Class Hierarchy
...Package Index

Java Development Kit (version 1.1, for download from SUN):
...JDK 1.1
...JDK 1.1 documentation

Code Examples for The Java Class Libraries: Second Edition, Volume 2 by Chan and Lee