optimization 101 - northfield information services · 2019. 2. 26. · simple number. slide 13 ......

31
Optimization 101 Steven Dyer February Online Workshop 15 February 2018

Upload: others

Post on 16-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Optimization 101

Steven DyerFebruary Online Workshop15 February 2018

Page 2: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 2www.northinfo.com

Goals

• Provide a short introduction to the concept of portfolio optimization• Describe the Northfield methodology of optimization• Use almost no math and any math will be easy and any hard math you

can ignore• Have some fun.

Page 3: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 3www.northinfo.com

Efficient frontier

Return

Risk

Page 4: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 4www.northinfo.com

Efficient frontier

Return

Risk

For any level of return, the least amount of risk

Page 5: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 5www.northinfo.com

Efficient frontier

Return

Risk

For any level of risk, the most amount of return

Page 6: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 6www.northinfo.com

Efficient frontier

Return

Risk

Minimum variance portfolio

Page 7: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 7www.northinfo.com

Efficient frontier

Return

Risk

Your portfolio

Page 8: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 8www.northinfo.com

Efficient frontier

Return

Risk

Cost to trade

Page 9: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 9www.northinfo.com

Efficient frontier

Return

Risk

(The efficient frontier will have a different size and shape depending on your universe!)

Page 10: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 10www.northinfo.com

Efficient frontier

Return

Risk

(The efficient frontier will have a different size and shape depending on your universe!)

Page 11: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 11www.northinfo.com

• Investor objective is to maximize risk- adjusted returns net of costs:

Utility = Return – Risk – Costs

– Most commercial portfolio optimizers uses the objective function described in Levy and Markowitz (1979)

– Portfolio return variance is the proper measure of risk because the difference between the arithmetic average rate of return and the geometric average rate of return is proportional to the variance (see Messmore, 1995)

Optimization Objective Function

Page 12: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 12www.northinfo.com

Utility = Return – Factor Risk – – Costs –

Optimization Objective Function

Market Bet

Sector Bet

Region Bet

Mkt Cap Bet

Currency Bet

Market: +6%

FB: BuyGOOGL: HoldTWTR: Sell

TSLA: -2% ± 11%

Bid/Ask spread

Commissions

Liquidity costs

Long-term?Short-term?Time until long-term?

Gain? Loss?

Wash sale?

All of these terms are in the same units of %/year, so we can make direct comparisonsbetween risk, return, and costs. All of this sums up to a simple number.

Page 13: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 13www.northinfo.com

Objective Function Explained

• U = α – (σs2 / RAPs) – (σu

2 / RAPu) - ((C + T) * A)

α = the “certainty equivalent” expected portfolio return σs

2 = portfolio variance risk due to common factors (correlation across securities) σu

2 = portfolio variance risk due to stock specific risks RAP = risk tolerance C = transaction costs for the optimization T = capital gain taxes for the optimization A = amortization constant

Note that this is a convex function and the various scalars transform all terms into certainty equivalent expected return units

Return Risk Component Implementation Cost

Factor Risk Stock Specific Risk

Page 14: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 14www.northinfo.com

Efficient frontier – Risk Acceptance Parameter

Return

Risk

The slope of this line is your RAP. It is just where you are on the efficient frontier. Each RAP value has one point of tangency.

Risk Tolerance in Optimizations: http://www.northinfo.com/documents/736.pdf

Page 15: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 15www.northinfo.com

An Optimization in Steps

• Our goal is to adjust the security weights to maximize the objective function, given your input settings.

• Northfield uses a Pairwise Swap Gradient method. This means:

– Buy a little of the best asset, sell a little of the worst asset.

– Repeat until you can’t trade any more or make any more improvements.

Page 16: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 16www.northinfo.com

An Optimization in Steps• Buy the Bank of America for risk, sell Berkshire for taxes:

(This lot of Berkshire Hathaway turns long term in 2 weeks)

Page 17: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 17www.northinfo.com

An Optimization in Steps• Buy the Bank of America for risk, sell Berkshire for taxes:

(This lot of Berkshire Hathaway turns long term in 2 weeks)

Marginal Utility

Marginal Transaction Costs

(incl. Taxes)

Marginal Quadratic Penalties

Marginal Risk

Marginal Alpha

Page 18: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 18www.northinfo.com

An Optimization in StepsThis method produces intuitive, tractable optimization paths that closely mimic a trader’s methodology.

Page 19: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 19www.northinfo.com

An Optimization in StepsThis method produces intuitive, tractable optimization paths that closely mimic a trader’s methodology.

Trades with the most impact on the portfolio happen first.

Page 20: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 20www.northinfo.com

An Optimization in StepsThis method produces intuitive, tractable optimization paths that closely mimic a trader’s methodology.

Trades with the most impact on the portfolio happen first.

Makes understanding the magnitude of costs of certain constraints obvious

Page 21: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 21www.northinfo.com

Constraint Basics• Any optimization can be run with a variety of three classes of

constraints

• Linear combinations of security weights– Position limits– Industry and sector limits– Factor Exposure or Penalty File Variables

• Cardinality Constraints– Maximum number of assets– Minimum trade sizes– Rounding to round lots

• Stopping Criteria– Turnover limits– Maximum realized capital gains

Page 22: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 22www.northinfo.com

Constraint Basics• Any optimization can be run with a variety of three classes of

constraints

• Linear combinations of security weights– Position limits– Industry and sector limits– Factor Exposure or Penalty File Variables

• Cardinality Constraints– Maximum number of assets– Minimum trade sizes– Rounding to round lots

• Stopping Criteria– Turnover limits– Maximum realized capital gains

Applied duringoptimization

Applied afteroptimization

Page 23: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 23www.northinfo.com

An Optimization in Steps• Buy the best asset, sell the worst asset. Skip any trade that would

violate a constraint.

Marginal Utility

Marginal Alpha

Marginal RiskMarginal

Transaction Costs (incl. Taxes)

Marginal Quadratic Penalties

Page 24: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 24www.northinfo.com

An Optimization in Steps• Violations of cardinality constraints are checked when maximum

objective is achieved– Solutions to most cardinality constraints are approximations that hold well only when

dealing in small quantities. Use only when actually needed. – If there are any violations of cardinality constraints that can be fixed, the optimizer will

adjust the security weights to fix them

Page 25: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 25www.northinfo.com

An Optimization in StepsThis method produces intuitive, tractable optimization paths that closely mimic a trader’s methodology.

Solving for Maximum Assets

Page 26: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 26www.northinfo.com

An Optimization in Steps• You’re done when marginal utility of the best and worst positions are

equal to within a selected tolerance

Page 27: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 27www.northinfo.com

Your portfolio

Return

Risk

Page 28: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 28www.northinfo.com

Your portfolio

Return

Risk

Page 29: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 29www.northinfo.com

Your portfolio

Return

Risk

Page 30: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 30www.northinfo.com

Your portfolio

Return

Risk

Page 31: Optimization 101 - Northfield Information Services · 2019. 2. 26. · simple number. Slide 13 ... α= the “certainty equivalent” expected portfolio return σ s 2 = portfolio

Slide 31www.northinfo.com

Further explorations

Dan diBartolomeo. Portfolio Construction: Optimizer Advantages, Hazards, and Tips

http://www.northinfo.com/documents/565.pdf

Anyone: [email protected]

New discussions: [email protected]

Current clients: [email protected]