QF3101 Investment Instruments:
Theory and Computation
Chapter 1
Visual Basic for Applications
Gong Zheng
Department of Mathematics
National University of Singapore
1/34
What is VBA?
Visual Basic for Applications (VBA) is the language embedded
within the s

QF3101 Investment Instruments:
Theory and Computation
Chapter 6 Part 1
Value at Risk
Gong Zheng
Department of Mathematics
National University of Singapore
1/19
Introduction
Value at Risk (VaR) is an attempt to provide a single number for
senior management

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 2 Solution
1.
Storage cost is USD 2/4=USD 0.5 per ounce per quarter.
Quarterly interest rate is 1%/4=0.25%.
The theoretical forward price is
F = 1664(1.0025)4 + 0.5 1.002

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 2
1.
The current price of gold is US$1664 per ounce. The storage cost is US$2 per ounce per year,
and is to be paid quarterly at the beginning of each quarter. Assuming a

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 3
1.
Time now is 0 and a forward contract on a dividend-paying stock expires at time T . The
current stock price is S0 and the dividend of $D is paid at time t, 0 < t < T

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 1
1.
Recall that a bond with face value F , annual coupons at rate c, n years to maturity, and the
yield to maturity (annualized) y, has its valuation given by the formul

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 11 Solution
1.
Note that for delta-normal methods, the individual VaR is given by
VaRi = i Wi = i wi W,
i = 1, 2.
Hence multiplying both sides of the equation
2
2 2
2 2
p

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 10 Solution
1. (a)
The 1-day 99% VaR for the stock is
VaR = 2.326 0.25
(b)
2.
1/250 $10 millon = $0.3678 millon.
Note that there are 5 trading days in a one-week period.

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 9 Solution
1.
Let c = c/d(0, T ), S0 = S0 /d(0, T ).
ST
ST X
ST > X
Short Call
value
prot
0
c
(ST X)
c (ST X)
Long Asset
value
prot
ST
ST S0
ST
ST S0
Total Prot
ST S0 + c

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 7 Solution
1.
Let the implied rate over the 9-month period be x.
Then we have
(1 + 0.405%
92
91
90
)(1 + 0.6%
)(1 + 0.825%
)=1+x
360
360
360
which yields x = 0.4621%.

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 8 Solution
1. (i) The fair xed rate for the 3 6 is the forward rate for the 3-month period 3 months from
now:
1 + 0.3971% 182/360
360
f=
1
= 0.5302%.
1 + 0.2636% 91/360

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 6 Solution
1. (i)
Since you do not wish to wait in the bid-ask queue, you sell the T-bill at the bid quote
of 1.84. With a maturity of 38 days and a bid quote of 1.84, th

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 5 Solution
1.
In 4 months, 0.5 0.12 $100 million = $6 million will be received and 0.5 0.096
$100 million = $4.8 million will be paid. In 10 months, $6 million will be r

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 4 Solution
1. (i)
The July 2015 contract has the expiry date of 14 July 2015, this date occurs after the
commitment date of 10 July and nearest to it (comparing against f

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 3 Solution
1.
Case 1. At time 0, obtain a forward contract to sell one unit of the stock at time T at price
F0 , and borrow S0 cash to buy one unit of the stock. At time

QF3101 Investment Instruments: Theory and Computation
Semester 2, 2014/2015
Tutorial 1 Solution
1.
Function MyBondPrice(F, c, n, y) As Currency
Dim i As Integer
Dim temp As Currency
temp = 0
For i = 1 To n incrementally add the discounted coupons
temp = t

QF3101 Investment Instruments:
Theory and Computation
Chapter 6 Part 3
Value at Risk
Gong Zheng
Department of Mathematics
National University of Singapore
1/19
Risk mapping
Due to the typically large number of assets in a portfolio, it
is very difcult to

QF3101 Investment Instruments:
Theory and Computation
Chapter 6 Part 2
Value at Risk
Gong Zheng
Department of Mathematics
National University of Singapore
1/30
Outline
1
Valuation approaches
2
Delta-Normal Methods
3
Simulation Methods
2/30
Valuation appro

QF3101 Investment Instruments:
Theory and Computation
Chapter 5 Part 1
Options
Gong Zheng
Department of Mathematics
National University of Singapore
1/44
Outline
1
Introduction
2
Trading Strategies
2/44
Introduction
An option gives the holder the right, n

QF3101 Investment Instruments:
Theory and Computation
Chapter 5 Part 2
Options
Gong Zheng
Department of Mathematics
National University of Singapore
1/23
Fixed income and interest rate options
Here we examine various examples of options in use in
practice

QF3101 Investment Instruments:
Theory and Computation
Chapter 2 Part 1
Forward, Futures and Hedging
Gong Zheng
Department of Mathematics
National University of Singapore
1/28
Forward contracts
A forward contract on a commodity is a contract
to buy or sell