Finance and Optimal Portfolios
Finance and Optimal Portfolios
Continuous Time
Given the equations for continuous compounding, we can derive the dynamics for a risk
free bank account B(t) with a deterministic rate of return, rB (t)
Similarly, we can create the dynamics for a risky asset, by assuming that it’s wealth
follows the same kind of interest dynamics however with a stochastic ”interest rate”
with constant drift µ and diffusion σ .
S(t + 1) − S(t)
rS (t) = µ + σξ(t) = (2)
S(t)
More generally, there are n risky assets in the market. The asset price processes
Si(t), i = 1, . . . , n, of the risk-bearing investments satisfy the stochastic
differential equation (Si(0) > 0)):
dSi(t)
= µi(S(t), x(t), t) dt + σi(S(t), x(t), t) dWS (t)
Si(t)
2. Logarithmic function
U (x) = ln(x)
3. Power functions (b < 1 and b 6= 0)
1 b
U (x) = (x)
b
a
4. Quadratic functions (x ≤ 2b )
2
U (x) = ax − bx
Utility U
6
U (x2 )
1 (x + x )) r
U(2 1r 2
r
1 U (x ) + 1 U (x )
U (x1 ) 2 1 2 2
r
- x
x1 1 x2
2 (x1 + x2 )
n
X
X(t) = Ni(t)Si(t)
i=0
n
X n
X
dX(t) = ui(t)X(t)µi(t)dt + ui(t)X(t)σi(t)dW (t) − C(t)dt
i=0 i=0
Pn
As u0(t) = 1 − i=1 ui(t) denotes the fraction of wealth invested into the risk free
asset S0(t) with return r(t) we can write
n
X ¡ ¢ ¡ ¢
dX(t) = ui(t) µi(t) − r(t) X(t)dt + rX(t) − C(t) dt
i=1
n
X
+ ui(t)X(t)σi(t)dW (t)
i=1
In vector notation
· ³ ´ ¸
T ¡ ¢
dX(t) = X(t) u(t) µ(t) − er(t) + r(t) − C(t) dt
T
+X(t)u (t)σ(t)dW (t)
with
u(t) = (u1(t), . . . , un(t)T ∈ Rn
e = (1, . . . , 1)T ∈ Rn
µ(t) = (µ1(t), . . . , µn(t)T ∈ Rn
σ(t) ∈ Rn×m
dW (t) ∈ Rm m-dimensional Brownian motion
X(t), r(t) and C(t) are scalar.
With knowledge of utility functions and wealth dynamics we can write the
stochastic optimal control problem in which we regard:
• wealth-equation:
dX(t) = [X(t)(uT (µ − e r) + r) − C] dt + X(t)uT σdW (t)
• cost functional: ( )
RT1 −ρt γ
J(u) = maxu(t) E 0 γ
e C(t) dt + γ1 πX(T )γ , (π < 1, γ < 1)
cost-to-go function:
(Z )
T
1 −ρt γ 1 γ
J(X(t), t) = max E e C(t) dt + πX(T ) .
C,u(t) 0 γ γ
Payoff
6
Long position
0 - ST
K
Short position
or
1
K= S0,
(1 + r)T
respectively.
• forward price is Ft
• delivery price of the forward is K
• risk-free interest rate is r
• delivery at time T
current value of the forward contract (long position)
−r(T −t)
ft = e (Ft − K)
or
1
ft = T −t
(Ft − K),
(1 + r)
respectively.
Forwards are traded over the counter, futures overcome this drawback, therefore
they need standardization. A future is specified by:
• The underlying asset (usually commodities or shares)
• The contract size (the quantity of the asset)
• Delivery arrangements
• Delivery date (month)
• Quality of delivered goods
• Price quotes
• Daily price movement limits (prevention of large movements)
• Position limits (maximum of contracts a speculator may hold)
Remaining problems: how to avoid defaults and how to specify the forward
price.
Solution: margin account
• initial margin
• maintenance margin
• margin call
6
Price
Futures
Spot
- t
T
• The right, but not the obligation, to buy (or sell) an asset (underlying) in
the future
– call option: right to buy
– put option: right to sell
• Specification
– underlying (what can be bought or sold)
– the exercise (strike) price K
– expiration date T of the option
• Two types of options regarded here
– American option
– European option
• The party that grants the option is said to write an option
• The purchaser of an option faces only the risk of the original purchase price
P C
6 6
0 - S 0 - S
K K
Put option Call option
Underlying concepts:
• arbitrage (equilibrium of prices)
• writer of the option should not undertake any risks by writing the option
asset price dynamics
dB = rB(t)dt
The Black Scholes equation is a PDE which explains the price dynamics of
derivative on a security.
• f = f (t, S): price of an arbitrary derivative on S
• r : risk free interest rate
• main idea: build a replicating portfolio with investments at the risk-free rate
and in the stock
The call option is a derivative security of the underlying stock S and therefore,
it changes its value dC according to Itôs formula
³ ∂C ∂C 1 ∂ 2C 2 2´ ∂C
dC = + µS + σ S dt + σSdW (4)
∂t ∂S 2 ∂S 2 ∂S
The writer of the option does not want to undertake any risks by writing the
option and therefore forms a portfolio G which is comprised of the amount x
of the underlying stock and of the amount y of a bond B , which should match
the option value at all times.
dB = rBdt (5)
The term dxS + dyB equals zero, because a change in the amount of stocks
and bonds we hold at constant stock and bond prices equals an in- or outflow
of money.
The portfolio dynamics are extended by substituting dS from (??) into (6).
This yields
Since the portfolio dynamics should match the dynamics of the option, we
match the coefficients of dt and dw in (7) and (4).
∂C
x= . (8)
∂S
Since we want G = C and using G = xS + yB yields
∂C
G = yB + S=C
∂S
1³ ∂C ´
y= C− S . (9)
B ∂S
Substituting the (8) and (9) into (7) and matching the coefficient of dt in (4)
gives
∂C 1³ ∂C ´ ∂C ∂C 1 ∂ 2C 2 2
µS + C− S rB = + µS + 2
σ S .
∂S B ∂S ∂t ∂S 2 ∂S
Finally, we arrive at the celebrated Black-Scholes PDE
∂C ∂C 1 ∂ 2C 2 2
rC = + rS + σ S . (10)
∂t ∂S 2 ∂S 2
The solution of the PDE together with the appropriate boundary conditions
gives the pricing of the option.
Let us consider the stock itself. It is (in a trivial way) a derivative of the stock
itself, so C(t, S) = S(t) should satisfy the PDE. With this choice we have
∂C
• ∂S = 1
∂ 2C
• ∂S 2
=0
∂C
• ∂t = 0
and therefore rS(t) = rS(t).
This proves that C(t, S) = S(t) is a possible solution. There are uncountably
many more solutions to this PDE.
with d1 und d2
2
S
ln( K ) + (r + σ2 )(T − t) p
d1 = √ , d2 = d1 − σ T −t
σ T −t
Relationship between the put and the call price of a European option → arbitrage
argument:
• long position in call with strike price K with value C
• short position in put with strike price K with value P
• payoff at maturity:
C − P = max(S(T ) − K, 0) − max(K − S(T ), 0) = S(T ) − K
This yields (at maturity): C − P + K = S(T )
→ Lend Ke−r(T −t), which will be worth K at maturity:
−r(T −t)
C − P + Ke = S(t)
with d1 und d2
2
S
ln( K ) + (r + σ2 )(T − t) p
d1 = √ , d2 = d1 − σ T −t
σ T −t
∂P ∂P 1 ∂ 2P 2 2
+ rS + σ S − rP ≤ 0
∂t ∂S 2 ∂S 2
dB = rBdt
∂f ∂f 1 ∂ 2f 2
rf = + rS + σ(t, S)
∂t ∂S 2 ∂S 2
HJB equation:
h
Jt + max JxX(t)[(µ − r)u(t) + r] + Jµκ(θ − µ(t))
u(t)
1 1 i
2 2 2 2
+ JxxX (t)u (t)σP + JxµX(t)u(t)ρσP σµ + Jµµσµ = 0
2 2
1 γ
J(T ) = X(T )
γ
Jx(µ(t) − r) + JxµρσP σµ
u(t) = − .
JxxX(t)σP2
The optimal u(t) is plugged back into the HJB equation and rearranged, which
yields:
1 2
Jt + JxX(t)r + Jµ κ(θ − µ(t)) + Jµµ σµ
2
2 2 2
1 Jx2(µ(t) − r)2 JµxJx(µ(t) − r)ρσµ 1 Jµxρ σµ
− − − = 0.
2 JxxσP2 JxxσP 2 Jxx
1 κ b(t) c(t) 2r
ḃ(t) + (2 θ c(t) − b(t)) + +
γ γ γ (γ − 1) σP2
ρ σµ(a(t) − r c(t) 2 ρ2 σµ2 b(t) c(t)
− − = 0
(γ − 1) σP (γ − 1)
The three ODEs can be solved off line before the controller is used to make the
investment decisions.
dPi(t)
= µi(t, x(t)) dt + σi(t)dZP (t) , (11)
Pi(t)
Pi(0) = pi0 > 0 .
Here µi(t, x(t)) ∈ R is expected return, σi ∈ R1×n is the i-th row of the volatility
matrix σ(t) ∈ Rn×n, and ZP (t) ∈ Rn is a Brownian motion. Additionally, we consider
a “risk-freeässet with a short-term interest rate, obtained by
dP0(t)
= r(t, x(t))dt , (12)
P0(t)
P0(0) = p00 > 0 .
The factors affect the mean return of the risk-bearing assets and the interest rate of
the risk-free asset. Furthermore, we assume that the drift terms are affine functions of
the factor levels as given by
where x(t) = (x1(t), x1(t), . . . xm(t))T ∈ Rm, Gi(t), F0(t) ∈ R1×m, and
gi(t), f0(t) ∈ R. The factors are modelled as Gaussian processes obtained by
where A(t) ∈ Rm×m, a(t) ∈ Rm, ν(t) ∈ Rm×m, and Zx(t) ∈ Rm is a Brownian
motion. The correlation matrix between ZP (t) and Zx(t) is ρ(t) ∈ Rn×m. The factors
allow us to connect the mean returns with the underlying economic environment.
where u(t) = (u1(t), u2(t), . . . , un(t))T denotes the fraction of wealth (port-
folio value) invested in the i-th asset at time t, and q(t) denotes and in-
Pn
or outflows of money. The weights fulfil the constraints i=0 ui (t) = 1 and
T
u(t) = (u1(t), u2(t), . . . , un(t)) ∈ U where U is a convex set. We use the
following abbreviations
The first portfolio choice problem is to maximize the expected power utility defined
over terminal wealth. Additionally, we assume that q(t) = 0, ZP (t) and Zx(t) are
correlated, and u is unrestricted. Mathematically the problem statement is:
h1 i
γ
max E W (T )
u(·)∈Rn γ
s.t.
T
dW (t) = W (t)[F0(t)x(t) + f0(t) + u (t)(F (t)x(t) + f (t))]dt
T
+W (t)u (t)σ(t)dZP , W (0) = W0
dx(t) = (A(t)x(t) + a(t))dt + ν(t)dZx, x(0) = x0
dZP dZx = ρ(t)dt , (17)
where T denotes the time horizon and γ < 1 denotes the coefficient of risk aversion.
The second portfolio choice problem is to maximize the exponential utility defined over
terminal wealth. We assume the risk-free interest rate not to be a function of x(t),
i.e., F0(t) = 0 and that q(t) = H(t)x(t) + h(t). Problem statement is given by
h 1 −γ W (T )i
max E − e
u(·)∈Rn γ
s.t.
T
dW (t) = W (t)[f0(t) + u (t)(F (t)x(t) + f (t))]dt
T
+[H(t)x(t) + h(t)]dt + W (t)u (t)σ(t)dZP , W (0) = W0
dx(t) = (A(t)x(t) + a(t))dt + ν(t)dZx, x(0) = x0
dZP dZx = ρ(t)dt , (18)
where T denotes the time horizon and γ > 0 denotes the coefficient of risk aversion.
T 1 2 T
+ (A(t)x(t) + a(t)) Jx(·) + W (t)u (t)Σ(t)u(t)JW W (·)
2
1 i
T T T
+ W (t)u (t)σ(t)ρ(t)ν (t)JW x(·) + tr{Jxx(·)ν(t)ν (t)} = 0,(19)
2
where Σ(t) = σ(t)σ T (t) and with the terminal condition J(T, W (T ), x(T )) =
1 γ
γ W (T ) . Using the first order conditions, we obtain the optimal portfolio control
(composition) vector
∗ −Σ−1(t) ³ T
´
u (·) = JW (·)(F (t)x(t) + f (t)) + σ(t)ρ(t)ν(t) JW x(·) . (20)
W (t)JW W (·)
By using the optimal portfolio vector (20) and inserting it back in (19), we obtain
T
Jt(·) + W (t)(F0(t)x(t) + f0(t))JW (·) + (A(t)x(t) + a(t)) Jx(·)
1 T
+ tr{Jxx(·)ν(t)ν(t) }
2
2
1 JW (·) T −1
− (F (t)x(t) + f (t)) Σ (t)(F (t)x(t) + f (t))
2 JW W (·)
T −1 T JW (·)
− (F (t)x(t) + f (t)) Σ (t)σ(t)ρ(t)ν (t) JW x(·)
JW W (·)
T
JW x (·) T T
− ν(t)ρ (t)ρ(t)ν (t)JW x(·) = 0 , (21)
2JW W (·)
The solution for J(t, W (t), x(t)) needs to be found in order to calculate the optimal
feedback controller. Hence we conjecture a functional form of the solution
We obtain the following three systems of nonlinear ODEs. For the scalar k1(t):
1
k˙1
T T T
+ tr{ν (k2k2 + K3))ν} + a k2 + γf0
2
γ ³ ´
T −1 T −1 T T T T
− f Σ f + 2f Σ σρν k2 + k2 νρ ρν k2 = 0
2(γ − 1)
k1(T ) = 0. (23)
γ ³ ´
T −1 T −1 T T −1 T T
− F Σ f + F Σ σρνk2 + K3νρ σ Σ f + K3νρ ρν k2 = 0
(γ − 1)
k2(T ) = 0 . (24)
K3(T ) = 0. (25)
The optimal feedback controller is calculated by using the value function conjecture
(22) and, plugging it in (20), we obtain
∗ Σ−1(t) ³ T ¡ ¢´
u (·) = F (t)x(t) + f (t) + σ(t)ρ(t)ν (t) K3(t)x(t) + k2(t) . (26)
1−γ
In order to compute the optimal controller, we need to calculate the solutions of (24)
and (25). This results in solving 12 m2 + 23 m ODEs, where m is the dimension of the
vector x(t).
In the case, that the all the parameters are time-invariant and if the following two
conditions are met:
h γ γ i
T T −1 T T T 1
( νρ σ Σ F − A) , (νν − νρ ρν ) 2 is controllable (27)
γ−1 γ−1
h γ 1 γ i
T −1 T T −1
( F Σ F )2 , ( νρ σ Σ F − A) is observable , (28)
γ−1 γ−1
the Riccati equation (25) possesses a positive-definite and finite solution for T → ∞,
γ
see [?]. If the matrix (K3νν T + AT − γ−1 (Σ−1σρν + K3νρT ρν T )) is invertible and
(25) possesses a positive definite finite solution, then (24) possesses a finite solution
for T → ∞.