Zvi Wiener slide 1

Financial Engineering
Continuous Time Finance
Zvi Wiener
[email protected]
tel: 02-588-3049
Zvi Wiener
ContTimeFin - 5
slide 1
Futures Contracts
 Mark to market
 Convergence property
 Spot-futures parity
 Cost-of-carry
 Martingale
 Risk-neutral Measure
 Forwards and Futures
 Girsanov’s Theorem and its counterpart
 Feynman-Kac Formula
 Stochastic optimization
 The Maximum Principle

Zvi Wiener
ContTimeFin - 5
slide 2
Futures Markets
Futures and forward contracts are similar to
options in that they specify purchase or sale of
some underlying security at some future date.
However a future contract means an
obligation of both sides.
It is a commitment rather than an investment.
Zvi Wiener
ContTimeFin - 5
slide 3
Basics of Futures Contracts
Delivery of a commodity at a specified place,
price, quantity and quality.
Example: no. 2 hard winter wheat or no. 1 soft
red wheat delivered at an approved warehouse
by December 31, 1997.
Zvi Wiener
ContTimeFin - 5
slide 4
Basics of Futures Contracts
Long position – commits to purchase the
commodity.
Short position – commits to deliver.
At maturity:
Profit to long = Spot pr. at maturity – Original futures pr.
Profit to short = Original futures pr. –Spot pr. at maturity
it is a zero sum game
Zvi Wiener
ContTimeFin - 5
slide 5
Futures Markets
The initial investment is zero however some
margin is required.
The later cash flow is mark-to-market for a
future contract and is concentrated in one
point for the forward contract.
Futures are standardized and not specify the
counterside.
Zvi Wiener
ContTimeFin - 5
slide 6
Futures Markets

Currencies
– all major currencies, including cross rate
 Agricultural
– corn, wheat, meat, coffee, sugar, lumber, rice

Metals and Energy
– copper, gold, silver, oil, gas, aluminum

Interest Rates Futures
– eurodollars, T-bonds, LIBOR, Municipal, Fed funds

Equity Futures
– S&P 500, NYSE index, OTC, FT-SE, Toronto
Zvi Wiener
ContTimeFin - 5
slide 7
Mechanism of Trading
money
Long
Short
commodity
Long
Zvi Wiener
Clearinghouse
ContTimeFin - 5
Short
slide 8
Marking to Market
Example: initial margin on corn is 10%.
1 contract is for 5,000 bushels,
price of one bushel is 2.2775,
so you have to post the initial margin =
$1,138.75 = 0.1*2.2755*5000
If the futures price goes from 2.2775 to 2.2975
the clearinghouse credits the margin account of
the long position for 5000 bushels x 2 cents or
$100 per contract.
Zvi Wiener
ContTimeFin - 5
slide 9
Marking to Market
Your balance
Initial
margin
Maint.
margin
margin call
Zvi Wiener
ContTimeFin - 5
time
slide 10
Marking to Market and Margin
The current futures price for silver delivered
in five days is $5.10 (per ounce).
One futures contract is for 5,000 ounces
Zvi Wiener
ContTimeFin - 5
slide 11
Marking to Market and Margin
Day
0 (today)
1
2
3
4
5
Zvi Wiener
Futures Price
$5.10
$5.20
$5.25
$5.18
$5.18
$5.21
ContTimeFin - 5
slide 12
Marking to Market and Margin
Day Futures P&L/oz.
Margin
1
$5.20
5.20-5.10= 0.10
500
2
$5.25
5.25-5.20= 0.05
250
3
$5.18
5.18-5.25=-0.07
-350
4
$5.18
5.18-5.18= 0.00
0
5
$5.21
5.21-5.18= 0.03
150
Total:
$550
Compare the total to forward: (5.21–5.10)5000
Zvi Wiener
ContTimeFin - 5
slide 13
Convergence Property
The futures price and the spot price must
converge at maturity.
Otherwise there will be an arbitrage based on
actual delivery.
Sometimes delivery is costly!
Zvi Wiener
ContTimeFin - 5
slide 14
Futures Markets
Cash delivery: sometimes is allowed,
sometimes is the only way to deliver.
The question of quality is resolved with a
conversion factor. The cheapest to deliver
option.
Zvi Wiener
ContTimeFin - 5
slide 15
Futures Markets
The S&P 500 futures calls for delivery of
$500 times the value of the index. If at
maturity the index is at 475, then
$500x475=$237,500 cash is the delivery
value.
If the contract was written on the futures price
470 (some time ago), who will pay money?
Short side will pay to the long side.
Zvi Wiener
ContTimeFin - 5
slide 16
Futures Markets Strategies
Hedging and Speculation – efficient tool for
hedging and speculation. A significant
leverage effect.
Zvi Wiener
ContTimeFin - 5
slide 17
Basis Risk and Hedging
The basis is the difference between the
futures price and the spot price. (At maturity
it approaches zero).
This risk is important if the futures position is
not held till maturity and is liquidated in
advance.
Spread position is when an investor is long a
futures with one ttm and short with another.
Zvi Wiener
ContTimeFin - 5
slide 18
Spot-Futures Parity Theorem
Create a riskless position involving a futures
contract and the spot position.
Buy one stock for S and take a short futures
position in it.
The only difference is from dividends.
Thus F + D – S is riskless.
The amount of money invested is S.
Zvi Wiener
ContTimeFin - 5
slide 19
Spot-Futures Parity Theorem
Create a riskless position involving a futures
contract and the spot position.
Buy one stock for S and take a short futures
position in it.
The only difference is from dividends.
Thus F + D – S is riskless.
The amount of money invested is S.
F DS
rf 
S
Zvi Wiener
ContTimeFin - 5
slide 20
Spot-Futures Parity Theorem
Cost-of-carry relationship
F  S (1  rf )  D  S (1  rf  d )
Zvi Wiener
ContTimeFin - 5
slide 21
Spot-Futures Parity Theorem
Cost-of-carry relationship
F S (1  rf  d )
T
For contract maturing in T periods
Zvi Wiener
ContTimeFin - 5
slide 22
Relationship for Spreads
F (T1 ) S (1  rf  d )
T1
F (T2 ) S (1  rf  d )
T2
F (T2 ) F (T1 )(1  rf  d )
(T2 T1 )
This is a rough approximation based on an
assumption that there is a single source of
risk and all contracts are perfectly correlated.
Zvi Wiener
ContTimeFin - 5
slide 23
Martingale
X - a stochastic time dependent variable.
Et - expectation based on information
available at time t.
Xt is a martingale if for any s > t
Et(Xs) = Xt
Zvi Wiener
ContTimeFin - 5
slide 24
Martingale
Most financial variables are not martingales
because of the drift component (inflation,
interest rates, cost of storage, etc.)
However one can change a numeraire so that
the new financial variable becomes a
martingale.
What can be chosen for an ABM, GBM?
Zvi Wiener
ContTimeFin - 5
slide 25
Martingale
dX = dt + dZ
ABM
Et(Xs) = Xt+ (s-t)
set Yt = Xt- t
then dYt= dt + dZ - dt = dZ
hence Et(Ys) = Yt
Zvi Wiener
ContTimeFin - 5
slide 26
Martingale
dX = Xdt + XdZ
GBM
What is Et(Xs)?
set Yt = Xte-t
dY = e-t dX - e-tXdt =
e-tXdt + e-t XdZ - e-tXdt =
( - )Ydt + YdZ.
What is Et(Ys)?
Zvi Wiener
ContTimeFin - 5
slide 27
Martingale
dY = ( - )Ydt + YdZ
then d(lnY) = ( -  - 0.5 2) dt + dZ
lnYt = lnY0 + ( -  - 0.5 2) t + Z
if a~N(, ), then E(ea) =exp(+0.52)
lnYt~N(lnY0 + ( -  - 0.5 2) t, t)
Then E0(Yt) = Y0exp(( -  - 0.5 2)t+0.52t).
Zvi Wiener
ContTimeFin - 5
slide 28
Martingale
E0(Yt) = Y0exp(( -  - 0.5 2)t+0.52t).
Set  = 
E0(Yt) = Y0
Et(Ys) = Yt - martingale!
What is the economic meaning of Y?
Zvi Wiener
ContTimeFin - 5
slide 29
Equivalent Martingale Measure

Harrison and Kreps

Harrison and Pliska
There exists a risk neutral probability measure.
There exists an equivalent martingale measure.
For a detailed explanation, see Duffie.
Extension to a stochastic volatility, see Grundy,
Wiener.
Zvi Wiener
ContTimeFin - 5
slide 30
Forward Contract
T




Q
0  Et exp    r ( s)ds (W  Ft )
 t



T


 
Q
Et exp    r ( s ) ds W 
 t
 

Ft 
T



Q
Et exp    r ( s ) ds 
 t


if W and r are independent Ft=EtQ(W)
Zvi Wiener
ContTimeFin - 5
slide 31
Futures Contract
t  E
Q
t
W 
Mark-to-market procedure equates
the instantaneous price to zero.
Zvi Wiener
ContTimeFin - 5
slide 32
Girsanov’s Theorem
Let dX = (X,t)dt + (X,t)dZ.
If there exist  and , such that  =  - ,
then there exists a new probability measure
equivalent to the original one, such that
relative to the new measure the original
process X becomes:
dX = (X,t)dt + (X,t)dZ*
Zvi Wiener
ContTimeFin - 5
slide 33
Girsanov’s Theorem
dX   ( X , t )dt   ( X , t )dZ t can be transformed to
dX   ( X , t )dt   ( X , t )dZt*
by a change of the probability measure (note B*),
if there exists a process  such that     .
Zvi Wiener
ContTimeFin - 5
slide 34
dX  ( X , t )dt   ( X , t )dZt can be transformed to
1.
dX   ( X , t )dt   ( X , t )dZt*
(Girsanov)
change of variables F ( X , t )
2.
dF  ...dt  a(t )dZ t
(Theorem 1)
3.
dF  ...dt  Fa(t )dZt
(Theorem 1’)
Zvi Wiener
ContTimeFin - 5
slide 35
Monotonic change of variables preserves order
y
y2
y1
x
x1
x2
x 2  x1  y 2  y1
Zvi Wiener
ContTimeFin - 5
slide 36
Monotonic change of variables preserves order
y1
x
x1
Prx  x1   Pr y  y1 
Zvi Wiener
ContTimeFin - 5
slide 37
Example
dx   ( x, t )dt   ( x)dZt
x
change of variables:
leads to
1
y ( x)
dx
 (x)
K
  ( x, t )  ' ( x ) 
dt  dZ t
dy  

2 
  ( x)
Constant volatility case: dx   ( x, t )dt  ˆ xdBt
x
1
1
x
y ( x ) 
dx 
ln
ˆ x
ˆ
K
K
Zvi Wiener
ContTimeFin - 5
slide 38
Theorem 1. The diffusion process
dx   ( x, t )dt   ( x, t )dZ t
is transformed by the following change of variables
x
a(t )
F ( x, t )  
d
 ( , t )
A( t )
into a process with a deterministic diffusion parameter


  1 
dF   a(t )    F2 dt  a(t )dZ
 2 


Free parameters:
a(t) – defines the resulting diffusion parameter
A(t) – defines zero level of the new variable
Zvi Wiener
ContTimeFin - 5
slide 39
Feynman-Kac Formula
0.52fxx + fx + ft - rf + h=0
f(X,T) = g(X)
The solution is given by:


f ( X , t )  E x ,t   t ,s h( X s , s)ds   t ,T g ( X T )
t

T
T
t ,s  e
Zvi Wiener

 r ( X  , ) d
t
the discount factor
ContTimeFin - 5
slide 40
Stochastic Optimization
In many cases financial assets involve
decisions. In some cases we should assume
that decision makers are rational and try to use
an optimal decision, in some cases we assume
not rational behavior.
Zvi Wiener
ContTimeFin - 5
slide 41
A Time-Homogeneous Problem
Values do not depend on time explicitly.
A financial asset V, which depends on a set of
variables X, and time t.
Control variable .

V  max E0  e u ( X ,  )ds

 rs
0
dX   ( X ,  )ds   ( X , s)dZ
Zvi Wiener
ContTimeFin - 5
slide 42
A Time-Homogeneous Problem
Sometimes the control variable  is a constant,
sometimes it is a function of time and state.
The expected cash flow is:
ECF = u(X, )ds
The capital gain is:
CG = dV = VxdX+0.5Vxx(dX)2
The expected capital gain is:
ECG = (Vx+0.52Vxx)dt
Zvi Wiener
ContTimeFin - 5
slide 43
A Time-Homogeneous Problem
The value of V does not depend on time.
The optimally managed total return per unit of
time is given by:
ETR = max(ECF+ECG)=
max[u(X, )+  (X, )Vx +0.52 (X, )Vxx]
It must be equal the risk free return:
rV= max[u(X, )+  (X, )Vx +0.52 (X, )Vxx]
Zvi Wiener
ContTimeFin - 5
slide 44
The Maximum Principle
X follows an ABM with parameters  and .
An asset pays continuous cash flow at the rate Xdt.
There is no limited liability option.
A manager can influence the growth rate of X.
Suppose that for any  one has to pay 2dt to
managers.
What is the optimal strategy?
Zvi Wiener
ContTimeFin - 5
slide 45
The Maximum Principle

V  max E0  e

 rs
X   ds
2
0
s.t. dX  ds  dZ

rV  max X    Vx  0.5 Vxx

Zvi Wiener
2
ContTimeFin - 5
2

slide 46
The Maximum Principle

rV  max X    Vx  0.5 Vxx

2
2

0  2  Vx
 opt  0.5Vx
Note that Shimko assumes that one can not replace
a manager, thus opt is constant and hence Vxx=0.
Zvi Wiener
ContTimeFin - 5
slide 47
The Maximum Principle
With this assumption we get V=2X opt + C
rV  r (2 X opt  C )  X  2 opt
X
1
V  3
r 4r
Zvi Wiener
ContTimeFin - 5
slide 48
The Maximum Principle
Assuming one-time decision we can value the
security as a sum of linearly growing perpetuity
(ABM) minus a level perpetuity (constant payment
of 2 forever.
X  
V  2
r r
r
2
Optimizing with respect to  we obtain:
X
1
V  3
r 4r
Zvi Wiener
ContTimeFin - 5
slide 49
The Maximum Principle
Without this assumption we get:
rV  X  0.25Vx   0.5 Vxx
2
2
A non-linear ODE, must be solved numerically.
What are the appropriate boundary conditions?
Zvi Wiener
ContTimeFin - 5
slide 50
Multiple State Variables
Consider a perpetually lived value-maximizing
monopolist who produces output at a rate of
qdt, but faces a stochastically varying demand.
Assume that the demand is linear p = a - bq,
where p is the price of the good, and a, b are
given by:
da  f (a, b, q)dt   (a, b, q)dZ a
db  g (a, b, q)dt   (a, b, q)dZ b
dZ a dZ b  dt
Zvi Wiener
ContTimeFin - 5
slide 51
Multiple State Variables
The initial conditions are a(0)=a0, b(0)=b0.
Assume that the cost of production is zero.
The value of the firm is V, such that:

V  max E0  e (a  bq)qds
q
Zvi Wiener
 rs
0
ContTimeFin - 5
slide 52
Multiple State Variables
The expected cash flow is:
(a-bq)qdt
The capital gain component is:
dV = Vada+Vbdb+0.5Vaa(da)2+Vabdadb+0.5Vbb(db)2
The expected capital gain is:
ECG=E[dV]=fVa+ gVb+0.52Vaa+Vab+0.52Vbb
Zvi Wiener
ContTimeFin - 5
slide 53
Multiple State Variables
The maximum total return is:
max(TR) = max(ECF+ECG) = rV
Therefore

rV  max (a  bq)q  fVa  gVb  0.5 2Vaa  Vab  0.5 2Vbb
q

The first order condition is:
a  2bq  f qVa  g qVb  0.5 qVaa  Vab ( q   q )  0.5 qVbb  0
Zvi Wiener
ContTimeFin - 5
slide 54
Multiple State Variables
Assume that
f(a,b,q) = af0
g(a,b,q) = bg0
(a,b,q) = a0
(a,b,q) = b0
a2
rV 
 af 0Va  bg 0Vb  0.5a 2 02Vaa  Vab ab 0 0  0.5b 2 02Vbb
4b
The value of the firm is:
a2
V
4b(r  2 f 0  g 0   02  2  0 0  02 )
Zvi Wiener
ContTimeFin - 5
slide 55
Optimal Asset Allocation
Merton 1971.
Utility function:
U= r - 0.5A2
Here r is the expected rate of return and  - its
standard deviation.
A - is the individual’s coefficient of risk
aversion.
Zvi Wiener
ContTimeFin - 5
slide 56
Optimal Asset Allocation
Denote by  - proportion invested in risky
assets. Then
rP  r  (1   )r f
  
2
P
Zvi Wiener
2
2
ContTimeFin - 5
slide 57
Optimal Asset Allocation
Maximizing utility with respect to , we get:
U


 
1

2
2 
 r  (1   )rf  A  P   0
2


 opt 
Zvi Wiener
r  rf
A 2
ContTimeFin - 5
slide 58
Dynamic Asset Allocation
dX  Xdt  XdZ
dP  rPdt
How one can apply the Girsanov’s theorem?
Perfect markets, no taxes, costs, restrictions.
The budget equation:
dW  [WX  (1   )WrP  c]dt  WXdZ
Zvi Wiener
ContTimeFin - 5
slide 59
Dynamic Asset Allocation
The objective function is to maximize the
expected lifetime discounted utility.

J  max E0  e U (c( s)) ds
c ,
 s
0
s.t. dW  [WX  (1   )WrP  c]dt  WXdZ
Zvi Wiener
ContTimeFin - 5
slide 60
Problem 4.3
The height of a tree at time t is given by Xt,
where Xt follows an ABM. We must decide
when to cut the tree.
The tree is worth $1 per unit of height, and if
the tree is cut down at time  at height Y, then
its value today is:
V = e-rY.
Zvi Wiener
ContTimeFin - 5
slide 61
Problem 4.3
a. What PDE must the value of the tree satisfy?
b. What are the boundary conditions?
c. Value the tree, assuming that the value is zero
when the tree’s height is -.
d. What is the optimal cutting policy?
Zvi Wiener
ContTimeFin - 5
slide 62