Principles of Financial Computing Course

Principles of Financial Computing

Location: Room 205, Building 2


On Wall Street, being right on the fundamentals and
wrong on the timing is the same as just being wrong.
---Jonathan Cohen

Where is the risk management at J.P. Morgan Chase?
--- Bloomberg News, January 16, 2002

10. Of course, I make a lot investing.
I only teach so I can help young people.
--- Top Ten Lies Finance Professors Tell Their Students


A single-semester course for the students of the Department of Finance and the Department of Computer Science and Information Engineering.
Required course for the Financial Engineering Track in the Department of Finance's Master's program.


To Students,

You will learn a perhaps different perspective on finance, especially as it pertains to pricing and software engineering. Our emphasis on computation should add a new dimension and toolbox to your existing knowledge and financial sense. (But see Enrollments below.)
It is your responsibility to learn to write in high-level programming languages. We cannot impart that skill in the class. If the mathematics proves hard going, you are expected to fill in the gap by self-reading. The technicalities are not beyond a motivated graduate student's reach.


The major topics covered in the course, time permitting, are listed below for your reference.


Notes [ 2003, 2004, 2005 ]


Programming Exercises

Homework should be turned in on time. No late homework will be accepted without legitimate reasons. There will be three to four programming assignments. You are expected to write your own codes and turn in your source code. Do not copy or collaborate with fellow students. (But discussions are allowed.) Never ask your friends to write programs for you. Do program carefully. It is much more important to get the numbers right than to get a pretty user interface running. etc.
  1. Write a program to calculate the static spread of a bond given the bond price, the spot rates, the maturity, and the coupon rate of the bond. All times are period-based for convenience. Inputs: coupon bond price (% of par), maturity (number of periods), spot rates (%, one for each period), and period coupon rate (% of par). For example, the bond price may be 99%, the maturity may be 3 periods, the spot rates may be [ 1%, 1.5%, 2% ], and the coupon rate may be 10%. You then calculate the static spread to be 8.47%. Due: April 6, 2005. Please send your source code, executable code, and an explanation file (how to run it? what is the programming language used?) under a folder/directory to Mr Yang before 9:00 AM of April 6, 2005. Name your directory StudendID_Name_HomeworkNumber for easy reference. Example: R91723054_YourName_1. Even if you need to make an appointment with Mr Yang for demonstration because of the unusual software you use, you still have to submit the files before the deadline.
  2. Write a program to price American calls AND puts based on the CRR binomial tree. Observe its convergence behavior. You may want to play with fancy ideas to improve the convergence speed. Inputs: S, X, tau (year), sigma (%), r (%), continuous dividend yield q (%), and n. For example, when S = 50, X = 50, q = 1(%), t = 0.5 (year), s = 20(%), and r = 5(%), the price is about 3.29595 for an American call (I used a trinomial model here). Due: April 27, 2005. Please send your source code, executable code, and an explanation file (how to run it? what is the programming language used?) under a folder/directory to Mr Yang before 9:00 AM of April 27, 2005. Name your directory StudendID_Name_HomeworkNumber for easy reference. Example: R91723054_YourName_2. Even if you need to make an appointment with Mr Yang for demonstration because of the unusual software you use, you still have to submit the files before the deadline.
  3. Write a program to price floating-strike European Asian calls based on the CRR binomial tree. The payoff function is max(Sn - average, 0). You may want to play with fancy ideas to improve the convergence. Inputs: S, t (year), s (%), r (%), and n. For example, when S = 42, t = 0.5 (year), s = 20%, and r = 10 (%), the price is about 1.92. Due: May 11, 2005. Please send your source code, executable code, and an explanation file (how to run it? what is the programming language used?) under a folder/directory to Mr Yang before 9:00 AM of May 11, 2005. Name your directory StudendID_Name_HomeworkNumber for easy reference. Example: R91723054_YourName_3. Even if you need to make an appointment with Mr Yang for demonstration because of the unusual software you use, you still have to submit the files before the deadline.
  4. Write a program to price European double-barrier knock-out calls. Think about how to match both barriers exactly for better convergence. Observe its convergence behavior. Inputs: S, X, high barrier H, low barrier L, t (year), s (%), r (%), and n. Assume L < S < H. For example, the price is about 1.457-1.4584 when t = 1 (year), r = 10 (%), S = 95, s = 25 (%), X = 100, L = 90, H = 140. Due: May 25, 2005 with on-site demonstration. Please send your source code, executable code, and an explanation file (how to run it? what is the programming language used?) under a folder/directory to Mr Yang before 9:00 AM of May 25, 2005. Name your directory StudendID_Name_HomeworkNumber for easy reference. Example: R91723054_YourName_4. Even if you need to make an appointment with Mr Yang for demonstration because of the unusual software you use, you still have to submit the files before the deadline.
  5. Write a program to price discretely monitored European-style Asian calls. Inputs are identical to problem 3 except that n should be interpreted as the number of monitoring dates (today counted). You need an extra input N to denote the number of sample paths. Use at least antithetic variates to reduce the variance. Due: June 22, 2005. Please send your source code, executable code, and an explanation file (how to run it? what is the programming language used?) under a folder/directory to Mr Yang before 9:00 AM of June 22, 2005. Name your directory StudendID_Name_HomeworkNumber for easy reference. Example: R91723054_YourName_5. Even if you need to make an appointment with Mr Yang for demonstration because of the unusual software you use, you still have to submit the files before the deadline.

Enrollments