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.
- Time value of money
- Bonds, mortgages, and annuities
- Duration, convexity, and
immunization
- Yield curve,
forward rate, and spot rate
- Option pricing theory
and its wide-ranging applications
- Black-Scholes analysis
- binomial option pricing model (BOPM)
- Futures,
forwards, and other derivatives
- The combinatorics of random walks
-
Martingale,
Brownian motion,
stochastic calculus, and
Ito integral
- Risk-neutral valuation
- Risk management
- Fixed-income securities with embedded options
and interest rate derivatives
- Mortgage-backed securities (MBS)
- Numerical methods
- Monte Carlo methods
- Variance reduction (efficiency-improving) techniques
- Least-squares technique
- Quasi-Monte Carlo method
- Solving partial differential equations
- Yield curve fitting
- GARCH models
- Interest rate models and
calibration
-
2013.02.20
-
2013.02.27
-
2013.03.06
-
2013.03.13
& 1st assignment due
-
2013.03.20
-
2013.03.27
-
2013.04.03
No class
& 2nd assignment due
-
2013.04.10
-
2013.04.17
-
2013.04.24
& 3rd assignment due
-
2013.05.01
-
2013.05.08
& 4th assignment due
-
2013.05.15
-
2013.05.22
-
2013.05.29
& 5th assignment due
-
2013.06.05
-
2013.06.12
National holiday
-
2013.06.19
6th 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.
Do program carefully.
It is much more important to get the numbers right than to get a
pretty user interface running.
-
Write a program to compute forward rates from a spot rate curve.
Inputs:
number of spot rates n,
spot rates (% per period),
their maturities N1 < N2 < ... < Nn (in periods).
Output:
the forward rates f(0,N1), f(N1,N2), ..., f(Nn-1, Nn) in %.
For example, assume n=5, the spot rates are [2.0%, 2.5%, 3.0%, 3.5%, 4.0%], their corresponding maturities are
[1, 2, 3, 5, 8].
The forward rates are
f(0,1) = 2.0000%,
f(1,2) = 3.0025%,
f(2,3) = 4.0073%,
f(3,5) = 4.2546%,
f(5,8) = 4.8387%.
Please send your source code, executable code, and a brief explanation file
(e.g., how to run it?) using the
CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of March 13, 2013.
Compress your files into a single file and name it StudentID_HW_1 for easy reference.
Example: R91723054_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.
-
Write a binomial tree program to calculate the prices of European and American options whose payoff equals that of
long 1 call at strike price X1, short 2 calls at strike price X2 and long 1 call at strike price X3
on a stock paying a continuous dividend yield.
In other words, the payoff function is the butterfly spread. In the American case, the butterfly payoff is your early exercise
value. Do not treat the underlying calls as individual calls that can be selectively exercised.
Inputs: S (stock price), X1 (strike price 1), X2 (strike price 2), X3 (strike price 3), σ (volatility), t (year), n (the total number of periods), δ (continuous dividend yield), r (interest rate).
For example, suppose S = 80, X1 = 100, X2 = 120, X3 = 140, σ = 0.4, t = 1, n = 100, δ = 0.02, and r = 0.06. The European option price is about 1.7518 and the American option price is about 5.6296.
Please send your source code, executable code, and a brief explanation file (how to run it? what is the time complexity?) using the
CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of April 3, 2013.
Compress your files into a single file and name it StudentID_HW_2 for easy reference.
Example: R00723040_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.
-
Write a binomial tree program for arithmetic European Asian calls on a non-dividend-paying stock.
The payoff is max(average - X, 0), where average is as in the slides.
Inputs: S (stock price), X (strike price), t (year), n (the total number of periods), s (volatility in %),
r (risk-free rate in %), k (so k+1 averages per node and their logarithms are equally spaced). For example,
suppose S = 95, X = 100, t = 2 (year), n = 100, s = 20 (%), r = 15 (%), and k = 100.
The option price is about 10.1854.
Please send your source code, executable code, and a brief explanation file (e.g., how to run it?)
using the CEIBA system (922 U0270)/
CEIBA system (723 M9500) before 08:00 AM of April 24, 2013.
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.
-
Write a trinomial tree program to price European double-barrier knock-out calls.
Inputs: S (stock price), X (strike price), H (high barrier), L (low barrier), t (year),
s (volatility in %), r (interest rate in %), and n (number of periods).
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.
Please send your source code, executable code, and a brief explanation file (e.g., how to run it?) using the
CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of May 8, 2013.
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.
-
Write a Monte Carlo Simulation program to price a 3-asset single-barrier European knock-out put where the barrier is on the first asset S1.
Inputs:
S1,
S2,
S3,
X,
H (barrier on S1),
t (year),
s1 (volatility of 1st asset in %),
s2 (volatility of 2nd asset in %),
s3 (volatility of 3rd asset in %),
r (the correlations between any two assets in %),
r (interest rate in %),
n (number of paths),
and m (number of time points including today, not needed if the Brownian bridge method is used).
The terminal payoff is
max(X - (S1 + S2 + S3)/3, 0).
Assume H > S1.
The option will be knocked out if the first asset hits the barrier H.
For example, the price is about 3.15 ~ 3.2,
when S1 = 50,
S2 = 50,
S3 = 50,
X = 50,
H = 80,
t = 1 (year),
s1 =30 (%),
s2 =30 (%),
s3 =30 (%),
r = 40 (%),
and r = 6 (%).
It is suggested that you apply antithetic variables.
You earn extra credits for doing the Brownian bridge method and compare convergence speeds.
Please send your source code, executable code, and a brief explanation file (e.g., how to run it? how you reduce the variance?) using the
CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of May 29, 2013.
Compress your files into a single file and name it StudentID_HW_5 for easy reference.
Example: R91723054_HW_5.
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.
-
Write a program to price a European call option on zero-coupon bonds with the binomial interest rate tree.
Inputs: t (option expiration date in years), T (bond maturity date in years),
r (the spot rates for period i ),
s (the volatility for period i ) and X (strike price as % of par).
Outputs: the option value.
For example,
suppose t = 2, T = 3, r = [ 4% 4.2% 4.3% ], s =[ 20.27% 20.27% 20.27% ] and
X = 90% of par.
The call value is 0.0524.
Please send your source code, executable code, and a brief explanation file
(e.g., how to run it?)
using the CEIBA system (922 U0270)/
CEIBA system (723 M9500) before 08:00 AM of June 19, 2013.
Compress your files into a single file and name it StudentID_HW_6 for easy reference.
Example: R91723054_HW_6. 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.
-
Write a binomial tree program for arithmetic American Asian puts on a non-dividend-paying stock. Output its price, delta, and gamma. The gamma is based on p. 682 with e=0.2.
Of course, if the holder exercises early, the payoff is max(X - average, 0), where average means the running average.
Inputs:
S (stock price), X (strike price), t (year), n (the total number of periods), s (volatility in %), r (interest rate in %), k (the number of running averages on each node).
For example, suppose S = 95, X = 100, t = 2, n = 100, s = 20(%), r = 15 (%), and k = 100.
For arithmetic American Asian puts, the option price under binomial tree is about 5.644079, the delta is about -0.764680, and the gamma is about 0.04535.
Please send your source code, executable code, and an explanation file (how to run it? what is the time complexity?)
using the CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of May 9, 2012.
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.
-
Write 2 programs for pricing European binary calls (pp. 677~682 of the slides) on a non-dividend-paying stock. One uses a trinomial tree, and the other the Monte Carlo method. Output its price, delta, and gamma from both.
For trinomial tree, you may use the one on p. 590. (If you decide to use the trinomial tree on pp. 591ff, the convergence may be slightly better by
treating the strike price as the barrier in determining your l.)
For Monte Carlo method, one time step suffices as the lecture notes show. If you use any nontrivial ideas in either the trinomial tree or Monte Carlo to improve convergence or accuracy, please record them in your explaining notes. (Antithetic variates, e.g., will not be considered nontrivial.)
Inputs:
S (stock price), X (strike price), t (year), n (total number of periods), s (volatility in %), r (interest rate in %), m (number of sample paths of simulation; an antithetic method will produce twice that number of paths), and e (see pp. 679ff).
For example, suppose S = 100, X = 90, t = 2, n = 1000, s = 40(%), r = 5 (%), m = 1000000, and e=0.001.
For the trinomial tree, the price, delta, and gamma are about 0.47805, 0.006262, and -0.00007036, respectively.
For Monte Carlo, our price is around [0.48112, 0.48158], our delta is around [0.0039934, 0.0092489], and our gamma is around [-4.796, 5.1489].
Please send your source code, executable code, and an document file (what is the formulas you had used? how to run it? what is the time complexity?)
using the CEIBA system (922 U0270)/CEIBA system (723 M9500)
before 08:00 AM of May 30, 2012.
Compress your files into a single file and name it StudentID_HW_5 for easy reference.
Example: R91723054_HW_5. 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.
- Write a program to price an x-year European call option on a zero-coupon bond that matures at year y with a par value of 1 and output its delta. Use the trinomial tree for the Hull-White model on pp. 1023ff. In particular, use the jmax=jmin version on p. 1031.
Delta is the first differential of the option price with respect to the bond price. The market spot rate curve is A - B e- C t (annualized and continuously compounded).
Inputs: x (year), y (year), a, s (%), number of partitions n, strike price X (% of par), A, B, and C.
For example, the option price is about 0.017 and the delta is about 0.158 when x = 1, y = 4, a = 0.1, s = 10 (%), n = 100, X = 90 (%), A = 0.2,B= 0.15, and C=0.1.
Please send your source code, executable code, and an explanation file (how to run it? what is the time complexity?)
using the CEIBA system (922 U0270)/CEIBA system (723 M9500) before 08:00 AM of June 20, 2012.
Compress your files into a single file and name it StudentID_HW_6 for easy reference. Example: R91723054_HW_6. 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
-
Non-programmers will be strongly discouraged
as the probability of passing this course is slim,
if possible at all.
-
It is not impossible to pick up programming skills before
the first assignment.
-
Financial knowledge is a plus, but again it can be picked up if you are motivated.