Principles of Financial Computing Course

Principles of Financial Computing

Time: 9:10 ~ 12:10 Wednesday (Spring Semester)
Location: Room 107 of the CSIE Building


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



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, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 ]

  1. 2017.02.22
  2. 2017.03.01
  3. 2017.03.08
  4. 2017.03.15
  5. 2017.03.22
  6. 2017.03.29 & 1st assignment due
  7. 2017.04.05
  8. 2017.04.12
  9. 2017.04.19
  10. 2017.04.26
  11. 2017.05.03 & 2nd assignment due
  12. 2017.05.10
  13. 2017.05.17
  14. 2017.05.24
  15. 2017.05.31 & 3rd assignment due
  16. 2017.06.07
  17. 2017.06.14
  18. 2017.06.21 & 4th assignment due

Programming Exercises

Homework should be turned in on time. No late homework will be accepted without legitimate reasons. There will be four to six programming assignments.
Treat each homework as an examination.
  1. Write a program to price the vanilla American put and its delta based on the CRR binomial tree. Inputs: (1) S (spot price), (2) K (strike price), (3) r (risk-free interest rate), (4) s (volatility), (5) T (years), (6) n (the number of periods). Output: (1) put price and (2) delta. For example, assume S = 100, K = 105, r = 0.05, s = 0.3, T = 0.75, and n = 300. Then the put price is 11.5082 and the delta is −0.4990. Please send your source code, executable code, and a brief explanation file if necessary (e.g., how to run it?) using the CEIBA system (CSIE 7134) before 08:00 AM of March 29, 2017. No late submissions will be accepted. Compress your files into a single file and name it StudentID_HW_1 for easy reference. Example: R91922054_HW_1. Even if you need to make an appointment with 盧政良 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 European-style Asian single-barrier up-and-out calls based on the CRR binomial tree. The payoff of this call at expiration date is max(average - X, 0) if the running average never touches or penetrates the barrier and 0 otherwise. Inputs: S (stock price at time 0), X (strike price), H (barrier, which is higher than S), t (maturity in years), s (%) (annual volatility), r (%) (continuously compounded annual interest rate), n (number of periods), and k (number of states per node). For example, when S = 100, X = 90, H = 110, t = 1 (years), s = 30%, r = 5%, n = 120, and k = 200, the price is about 2.9976. Please send your source code, executable code, and a brief explanation file if necessary (e.g., how to run it?) using CEIBA system (CSIE 7134) before 08:00 AM of May 3, 2017. No late submissions will be accepted. Compress your files into a single file and name it StudentID_HW_2 for easy reference. Example: R91723054_HW_2. Even if you need to make an appointment with 盧政良 for demonstration because of the unusual software you use, you still have to submit the files before the deadline.
  3. Write a least-squares Monte Carlo program to price American puts. Output its price and standard error. Inputs: S (stock price at time 0), X (strike price), T (maturity in years), s (%) (annual volatility), r (%) (continuously compounded annual interest rate), n (number of periods), and k (number of simulation paths). For example, when S = 101, X = 105, T = 1 (years), s = 15%, r = 2%, n = 50, and k = 100,000, the price is about 7.3634 and the standard error is about 0.0221. Please send your source code, executable code, and a brief explanation file if necessary (e.g., how to run it?) using CEIBA system (CSIE 7134) before 08:00 AM of May 31, 2017. No late submissions will be accepted. Compress your files into a single file and name it StudentID_HW_3 for easy reference. Example: R91723054_HW_3. Even if you need to make an appointment with 盧政良 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 American put options based on the GARCH model (Ritchken-Trevor algorithm). Output its price. Inputs: E (days before expiration), r (%) (annual interest rate), S (stock price at time 0), h0, b0, b1, b2, c, X (strike price), n1 (number of partitions per day), n2 (number of variances per node). For example, the option price is about 2.1883 when E = 30, r (%) = 1, S = 100, h0 = 0.010469, b0 = 0.000006575, b1 = 0.9, b2 = 0.04, c = 0, X = 100, n1 = 2, n2 = 2. Please send your source code, executable code, and a brief explanation file if necessary (e.g., how to run it?) using CEIBA system (CSIE 7134) before 08:00 AM of June 21, 2017. No late submissions will be accepted. Compress your files into a single file and name it StudentID_HW_4 for easy reference. Example: R91723054_HW_4. Even if you need to make an appointment with 盧政良 for demonstration because of the unusual software you use, you still have to submit the files before the deadline.

Enrollments