42
AN EXAMPLE OF QUANT’S TASK IN CROATIAN BANKING INDUSTRY Marin Karaga

Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Embed Size (px)

Citation preview

Page 1: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

AN EXAMPLE OF QUANT’S TASK IN CROATIAN BANKING INDUSTRY

Marin Karaga

Page 2: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Introduction...

A person has all of hers/his available money invested in one equity (stock)

At the same time, she/he needs certain amount of money (for spending, other investments etc.)

What can this person do in order to get the money?

Page 3: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

First option...

First option is to close the position in equity (sell the equity) and use the proceeds from that transaction

Money is obtained in simple and relatively quick way

However, there is no longer the position in equity, so the person is no longer in a position to profit from potential increase of equity price

Page 4: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Second option...

Person strongly believes that the equity price will rise in the near future

What to do? Person needs the money and yet is reluctant to sell the position in equity

Second option could solve this problem: ask the bank for an equity margin loan!

What is equity margin loan?

Page 5: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Margin loan

Equity margin loan is a business transaction between bank and its client in which client deposits certain amount of equity in the bank as collateral and receives the loan.If the client doesn’t meet hers/his obligations on a loan (i.e. doesn’t repay the loan) bank has the right to sell the collateral and use the proceeds from that transaction to cover its loss from the loan.

Page 6: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Second option...

Person strongly believes that equity margin loan is the best solution and approaches the bank with hers/his equity and asks for a equity margin loan.

What are the main questions for the bank?

What amount of loan can we issue to the client for a given amount of equity which is deposited as a collateral by the client?

What are the risks associated with this loan?

Page 7: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Risks...

In every moment during the life of loan, bank has to be able to quickly sell the collateral and receive enough money from that transaction to cover its loss, should the client default on a loan (if the loan isn’t fully repaid)

So, there are two main sources of risks associated with the equity...

Page 8: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Risks...

1. Uncertainty about movements of equity priceEquity price could fall significantly and bank might not be able to receive enough money from closure of equity position...

2. Uncertainty about equity liquidityThe more time it takes you to close the position in equity, the more time its price has to fall below acceptable levels...

Page 9: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Risks...

How to quantify these risks?

A task for bank’s quants!

What we need to do?We need to quantify equity price risk and somehow take liquidity of equity into account.

Page 10: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

St - equity price at the end of day t

Let’s look at the ratio

Let’s assume that for every t, these ratios are independent and identically distributed random variables with following distribution

t

t

SS 1ln

)N(0, ~ln 21

t

t

SS

Page 11: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk (EWMA)

Exponentially Weighted Moving Average

Estimate volatility of random variable by looking at its observations (realizations) in the past

How it works?

Let’s define random variable r and assume the following

)N(0, ~ 2rr

Page 12: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

Let’s look at N past observations of this random variable

Possible estimate of variance (or its square root – standard deviation, volatility)

Nrrrr ...,,,, 321

N

ttr r

N 1

22 1

Page 13: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

We treat each squared observation equally, they all have the same contribution toward the estimate of variance

Can we improve this reasoning?

N

ttr r

N 1

22 1

N1

Page 14: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

Yesterday’s equity price is more indicative for tomorrow’s equity price that the price from, for example, 9 months ago is

So, let’s assign different weights to observations of our random variable, putting more weight on more recent observations

Page 15: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

Let’s choose the value of factor w, 0 < w < 1, and use it to transform the series

to

where we set

Nrrrr ...,,,, 321

N

N

rF

wr

Fw

rFw

rFw 1

3

2

2

1

1

0

...,,,,

ww

wFNN

i

i

11

1

1

Page 16: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

We have changed the weight assigned to i-th observation

Let’s see how the series of weights depends on the choice of factor w

N1

1

1

1

1

11

i

NN

k

k

i

www

w

w

Page 17: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

EWMA

One can understand why factor w is commonly called decay factor

0,000

0,002

0,004

0,006

0,008

0,010

0,012

0,014

0,016

0,018

1 21 41 61 81 101 121 141 161 181 201 221 241

N=250

1/N w=0,995 w=0,990 w=0,985

Page 18: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk (cont.)

Using the same formula for variance estimation, now applied to the EWMA weighted series, we get

If we apply this to our ratio we get

N

ttr r

N 1

22 1

t

t

SS 1ln

N

tt

tNr rw

ww

1

212

11

N

t t

ttN S

Sw

ww

1

2

11 ln11

Page 19: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

Let X be a random variable,

Let’s define random variable Z,

Obviously,

Hence, for some α, 0 < α < 1, we have

where represents cumulative distribution function of random variable that has standard normal distribution

),N( ~ 2X

X

Z

)1,0N( ~Z

ZP (.)

Page 20: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

We have 1ZP

1XP

1XP

1XP

Page 21: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

If we apply the previous formula to our random variable

we get

What this actually tells us?

)N(0, ~ln 21

t

t

SS

11ln

t

t

SS

P

Page 22: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

11ln

t

t

SS

P

11 exp

t

t

SS

P

11 exp11

t

t

SS

P

11 exp1

t

tt

SSS

P

11 exp

t

t

SS

P

Page 23: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk

- equity price decrease over one day horizon

For α close to zero, we can say that there is only percent chance that the equity price over one day horizon will fall by more than

percent

Now we have some measure of equity risk that comes from the uncertainty about movements of its price

t

tt

SSS 1

11 exp1

t

tt

SSS

P

1exp1100

100

Page 24: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk + liquidity

Let’s assume that it takes us H days to close the position in equity

Since it takes us H days to close the position so we are exposed to movements of equity price for H days

Using previous notation, we need to examine following random variable

What is its distribution?

t

Ht

SS ln

Page 25: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk + liquidity

Since for each t we have and they are

all independent, we have the following

t

t

Ht

Ht

Ht

Ht

t

t

t

t

Ht

Ht

Ht

Ht

t

Ht

SS

SS

SS

SS

SS

SS

SS

SS

1

2

1

1

1

1

2

2

1

1

lnlnln

lnln

)N(0, ~ln 21

t

t

SS

Page 26: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk + liquidity

that is, we have

),H0N( ~ln 2

t

Ht

SS

1

0

21

0

1

1

2

1

1

ln

lnlnlnln

H

i

H

i it

it

t

t

Ht

Ht

Ht

Ht

t

Ht

SS

Var

SS

SS

SS

VarSS

Var

Page 27: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk + liquidity

Applying the same procedure as before, we get

and finally

All that remains is to figure out how to determine variable H

H

SS

Pt

Ht 1ln

H

SSS

Pt

Htt 1exp1

Page 28: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity liquidity

There are numerous ways to estimate equity liquidity

We’ll again look at the past observations of equity liquidity and try to estimate how long it would take us to close our position in collateral

The main factor determining how many days it could take us to close the position is, obviously, the size of position

Let’s denote the size of equity position with C (expressed as market value of equity position; number of equities we have times its current market price)

Page 29: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity liquidity

Let’s now look at the daily volumes that were traded with this equity on the equity market during last M days(daily volume – size of trades with equity during one day, market value of position that exchanged hands that day)

Let’s denote the following:

VM – volume that was traded during the first day (the oldest day) in our M day long history

VM-1 – volume that was traded during the second day (second oldest day) in our M day long history

etc.

Page 30: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity liquidity

Now, let’s see how many days we would have needed in order to close the equity position if we had started to close it on day M

After first day we have of our position left, after second day we have of our position left, etc.

Let’s define TM

MVC 1 MM VVC

0:min

11

J

kkMM VCNJT

Page 31: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity liquidity

TM is the number of days we would have needed in order to close the equity position if we started to close it on day M

In a similar way we can define TM-1

as number of days we would have needed in order to close the equity position if we started to close it on day M-1

0:min

11

J

kkMM VCNJT

0:min

11)1(1

J

kkMM VCNJT

Page 32: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity liquidity

If we continue with these definitions, we will get the series of numbers

all representing number of days we would have needed in order to close our position if we started to close it on certain days in the past

We need to determine our variable H based on the previous series of numbers, let’s be conservative and set

,,, 21 MMM TTT

,,,max 21 MMM TTTH

Page 33: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Equity price risk + liquidity risk

Now we have everything we need:

- estimate of equity price volatility

H - estimate of equity liquidity

Combined measure of risk

H

SSS

Pt

Htt 1exp1

Page 34: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Practical use

Remember what our question was:What amount of loan can the bank issue to its client for a given amount of equity which is deposited as a collateral by the client?

Let’s assume that the bank wants that in 99% of cases value of collateral doesn’t fall below the value of the loan during the selling of collateral

Expressed in language of our model: α = 0,01 Next, let’s assume that the bank finds

appropriate to set the decay factor w to be equal to 0,99

Page 35: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Practical use – loan approval

Let C denote the initial value of position in equity

Bank calculates H and Then bank looks at the following

01,001,0exp1 1

H

SSS

Pt

Htt

01,001,0exp 1

H

SS

Pt

Ht

01,001,0exp 1

HSSP tHt

Page 36: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Practical use – loan approval

In 99% cases,

In other words, in 99% of cases, during the selling of collateral, price of collateral won’t fall below

where is the value of collateral at the start of closure of equity position

01,001,0exp 1

HSSP tHt

HSS tHt 01,0exp 1

HSt 01,0exp 1

tS

Page 37: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Practical use – loan approval

So, the bank sets the value of loan

We have solved our problem! Important note: once the loan has been issued, L

is constant and C varies, so the client is obliged to maintain appropriate size of collateral – above relation has to be true during the entire life of loan

HCL 01,0exp 1

“haircut”

HCCL 01,0exp1ly,equivalent 1

Page 38: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Examples

C = HRK 10 million Using the data from last 250 days (1 year) we

get (α = 0,01, w = 0,99):

HT: = 0,0127 (1,27%), H = 19

INGRA: = 0,0339 (3,39%), H = 82

%92,8701,0exp 1

H 000.792.8HRKL

%92,4801,0exp 1

H 000.892.4HRKL

%08,51%92,48%100haircut

%08,12%92,87%100haircut

Page 39: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Summary

We have seen:

“Real life” case from Croatian banking industry

Identified risks associated with margin loan Used EWMA to model equity volatility Enhanced EWMA results in order to take

equity liquidity risk into account Transformed analytical result into

straightforward figure (haircut) that can be quoted to potential clients

Two examples of haircut calculation

Page 40: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Final remarks

Every model is nothing more than just a model Check the model assumptions, try to improve

it, confirm its results by comparing them with the results form different models etc.

In “historical” model one needs to constantly update the underlying historical data in order to feed the model with the most recent information

Compare the actual losses with the level of losses predicted by the model – test the soundness of model

Page 41: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Questions

Page 42: Marin Karaga. Introduction... A person has all of hers/his available money invested in one equity (stock) At the same time, she/he needs certain amount

Thank you for your attention!