Portfolios and Optimization

Preview:

DESCRIPTION

Portfolios and Optimization. Andrew Mullhaupt. Maximize profit with risk bound:. In ‘unit risk’ coordinates:. Mean-variance portfolio. Portfolio Selection. THE END. Transaction Costs. Commissions and Fees. Taxes. Slippage -. Slippage. Induced Costs. Expected Costs. - PowerPoint PPT Presentation

Citation preview

Portfolios and Optimization

Andrew Mullhaupt

Portfolio Selection

2 1maxT

T

u C ur u

Maximize profit with risk bound:

1

1maxT

T

Cu CuC r Cu

In ‘unit risk’ coordinates:

2

* 1/ 22T

C rur C r

Mean-variance portfolio

THE END

Transaction Costs

Commissions and Fees

Taxes

Slippage -

Slippage

0Initial portfolio: u

1Final portfolio: u

0Fair market price at time of decision: p

1 :price d transacteActual p

1 0 1 0Slippage: Tu u p p

Trade size

Expe

cted

Co

sts

Proportional Costs

Induced Costs

‘Eating the Book’

Portfolio

Loss

Initial Portfolio

Mean-variance portfolio

Cost relative to Initial Portfolio

Total LossRisk relative to optimal mean-variance portfolio

Optimal Portfolio

Portfolio Selection With Deterministic Costs

Portfolio

Loss

*0 uu

*0 and risk, cost,by determined is Trade uu

Original Portfolio

Mean-variance Portfolio

:enough small is When *0 uu

Original Portfolio

Trading cannot reduce the loss

Mean-variance Portfolio

tradeno of tradeThe

No Trade Regions

* 0Set of portfolio differences where the slopeof the risk is less than slopes of cost at zero trade

u u

Proportional Costs:Always trades to the no-trade region

Independent of induced costs

No Trade Region = Optimality for Proportional Costs

Optimality for Superproportional Costs Contains The No Trade Region

Take the gradient with respect to wOPTSolve for the optimal trade wUse duality to exchange the order of optimization 1

Trick substitution: maxT T

zT w e T w z

OPT

2OPT * 0

T

w ww u u C T w z

2

* 0 0TC w u u T w z

TT w e TT w z1

maxz

minw

The no trade region is a Parallelopiped

2* 0 * 0

12

Tw u u C w u u

linear image of the cube 1z

OPTNo Trade Region: 0 :w

2* 0 0

T

wu u C T w z

Proportional Costs are Incredible!

as

T ww

w

Proportional costs are toooptimistic for large trades,so reasonable costs are :superlinear

Who Says Say’s Law?

• Say’s Law: Supply Creates Demand• In the large? (Supply Side Economics).• In the small? Look for sublinear transaction

costs (‘volume attracts volume’).• Not frequent enough to explain the

expectation but it could be a variance component.

Special case quadratic costs Tw diagwc diagw2d

convexity requires d 0

being on the buy side requires c 0

wzTTw z c 2diagz dw

w u u0 C 2 wzTTw

I 2C 2 diagz d 1u u0 C 2z c

d 0 w u u0 C 2z caka "proportional costs"

"proportional costs" w u u0 C 2z c

max z 112 z cTC 2z c z cTu u0 C 2z c

max z 1 12 z cTC 2z c z cTu u0

min z 112 z cTC 2z c z cTu u0

min |qk | ck12 q

TC 2q qTu u0

w u u0 C 2q

Bound constrained quadratic program:

Quadratic loss with bounded trades:

min |w | 12 w u u0 TC2w u u0

equivalent to

min |w | 12 w

TC2w wTC2u u0

also a bound constrained quadratic program.

minAx b 12 x

TGx dTx

KKT Conditions

Gx AT d 0Ax y b 0

y 0yT 0

# # # #

G AT 0A 0 I0 Y

x y

Gx AT dAx y by

Central path 1n yT

G AT 0A 0 I0 Y

x y

Gx AT dAx y by

00e

Newton direction

Choose step size t 0 such that

Ax t x b t 0

# #

update

Interior point iteration

x, x t x, t

y Ax b # #

...what about ?

G AT 0A 0 I0 Y

x y

Gx AT dAx y by

00e

eliminate y A x

G AT

A Y x

Gx AT d

Y

0e

add ATY 1 times bottom part to the top part:

I ATY 1

0 IG AT

A Y

G ATY 1 A 0 A Y

The top part is the ‘reduced system’

G ATY 1 A x Gx d ATY 1e

G ATY 1 A x Gx d ATY 1e

Y Y e A x y A x

Structure of A and G can provide great computational advantage.

Bound Constraints:

I I

x l

u

A I I

ATY 1 A is diagonal

Any structure for G that accomodates addition of a diagonal matrix

(banded, sparse, low grade, factor, etc.)

I XXT I XI XTX 1XT I XXT XI XTX 1XT XXTXI XTX 1XT

I XXT XI XTXI XTX 1XT

I XXT XXT

II XXT 1 I XI XTX 1XT

Solve D VVT x yD D1/2XD1/2XT x y

D1/2I XXT D1/2x y

x D 1/2 I XI XTX 1XT D 1/2y

Iterated Diagonal Box QP

x zD V

V Ixz

z V x

x D VV x

D VV I

I 0

VD 1 ID 00 I VD 1V

I D 1V0 I

min l x uz V x

f 12 Vz

x 12 x

TDx

Iterated Diagonal Box QP

xk 1 arg minl x u

f 12 Vzk

x 1

2 xDx

zk 1 V xk 1

#

#

stationarity: 0 f 12 Vz j

Djjx j

x j min uj ,max l j , Djj 1 f 12 Vz j

min l x uz V x

f 12 Vz

x 12 x

TDx

Modified Steepest Descent

Alternate between:

Move as far as feasible

1) toward the vertex

2) Toward the minimum along the gradient direction

Postprocessing

Gx d l u 0x l y l 0u x yu 0y l l 0yu u 0

Once we have u and d we can solve for x via x G 1 l u d

Accuracy Comparison

Time Comparison – 5 instances3000x150

Unstructured (ip) 90.8 sec

Matlab Factor (qp) 0.690

Homegrown factor (bq) 0.995

Diagonal Iterate (di) 0.059

Mod. Steepest Descent (ms) 0.128

The unstructured method is too slow to compare for enough instances

Time and Accuracy 150 instances3000x15

Method Time Max Inaccuracy

QP 17.16 0.3525

BQ 8.5 0.1075

MS 0.91 0.0360

DI 0.37 0.1075

Time and Accuracy 150 instances3000x50

Method Time Max Inaccuracy

QP 19.43 0.2356

BQ 18.55 0.0744

MS 2.04 0.0057

DI 0.722 0.0745

Time and Accuracy 150 instances3000x150

Method Time Max Inaccuracy

QP 17.6 0.1347

BQ 33.2 0.0401

MS 3.8 0.0355

DI 1.72 0.0399

Equity Curve

Covariance Distortion Hedgeminw 1

2 u1 u C2u1 u eT|Tu1 u0 | 2 u1

ThhTu1

u min hTu 0uTC2u 1

rTu

u minuT C2 hhT u 1 rTu

minw 12 u1 u C2 hhT u1 u eT|Tu1 u0 |

Question TimeYes, you have questions.

Recommended