Showing posts with label financial engineering. Show all posts
Showing posts with label financial engineering. Show all posts

Wednesday, December 23, 2015

How to interpret Beta?

How to interpret beta?

sensitivity of the expected excess asset returns, E(Ri) - Rf, to the expected excess market returns, E(Rm) - Rf
so, beta = (E(Ri) - Rf) / (E(Rm) - Rf)

in other words, beta tells u how many times your instrument should return above rfr given the market return above rfr

say the market return = 5%, rfr = 2%, and your stock has a 1.5 beta
beta tells you that your instrument should be getting 6.5% return
if your instrument returns above 6.5%, ALPHA!!  :D
if below, then why are u investing in that instrument rather than the market portfolio?


how to calculate beta?

Cov(Ri, Rm)/Var(Rm)
= (corr(Ri, Rm) * sigma i * sigma m) / (sigma m)^2
= corr(Ri, Rm) * sigma i / sigma m


putting in back to capm
Ri = rfr + beta * (Rm - rfr)
Ri - rfr = corr(Ri, Rm) * sigma i * (Rm-rfr)/sigma m
(Ri -rfr) /sigma i = corr(Ri, Rm) * (Rm-rfr)/sigma m

now we can interpret the corr(Ri, Rm) as
the ratio between sharpe ratio of the instrument and the sharpe ratio of the market


what is variance?
avg squared deviation from mean
= E[(X-E[X])^2]

can also be thought of as the covariance with itself
= Cov(X,X)
= E[(X-E[X])(X-E[X])]

which brings us to the covariance of 2 diff variables
Cov(X,Y)
= E[(X-E[X])(Y-E[Y])]

Sunday, December 14, 2014

how do we valuate a call option?

(post from old site)

1)by establishing a hedged portfolio (ie a portfolio value will not be affected by the underlying price) and work backward!!
2) risk-neutral valuation

1)
for example, we have 
an underlying with price @t0 = 100
a call option that can be exercised @t1 at 100
what is the call option worth at t0?

hedged portfolio: buy a fraction of the underlying and sell the call
(hedge ratio)*Underlying - c
h*u-c

let's assume @t1, underlying price will either go up by 15 to 115 (u=1.15) or down by 5 to 95 (d=0.95)
if up
underlying is worth 115
call option is worth 15
if down
underlying is worth 95
call option is worth 0

h=? if we want the portfolio to have the same value no matter the underlying goes up or down?

h*100*1.15-15 = h*100*.95-0
h = (15-0)/[100(1.15-0.95)]
h= 15/20 = 0.75

=> it means that if we establish our portfolio at t0 by buying 0.75 share of the underlying and selling the call option @t0, then
@t1, our portfolio will be worth 71.25 regardless of the underlying price going up or down
up = 0.75*100*1.15 -15 = 71.25
down = 0.75*100 *0.95 = 71.25

ok, so what does the above have anything to do with the call price at t0?
since the hedged portfolio will be worth $71.25 @t1 without RISK (ie, no matter the price going up or down), the portfolio has to earn risk less rate due to no arb pricing

say the risk-free rate is 5% and t1-t0 = 1 year, we discount the hedged portfolio value at t1 with the risk-free rate
hedged portfolio value @t0 = 71.25/1.05 ~= 67.857
solve for c
67.857 = h*u-c
= 0.75*100 -c
c = 7.143

in general, h = (cu - cd)/S(u-d)
= (call value if up - call value if down)/Share price@t0(underlying price up change - underlying price down change)

in the example h= (15-0)/[100(1.15-0.95)]

note that the call price is independent of the likelihood of the underlying going up or down!!!!!!!! (that's quite counter intuitive if u think about it!)

2) risk-neutral approach
continuing with the above example, we assumed that risk-free rate=5% and the underlying/Share we use will either go up by 15% or down by 5% from t0 to t1

so what is the implied probability of it going up and going down?
=> ALL ASSETS should be expected make risk-free return in a risk neutral world. if not, arb opportunities exist.
so the Share should make 5% too =>
5% = 15%(prob of going up) + -5%(prob of going down)
= 0.15(p)+ -0.05(1-p)
p = 50% <- implied prob of going up
1-50% = 50% <- implied prob of going down

going back to the call option, with 50% going up (worth $15) and 50% going down (worth 0), the call option should be worth @t1:
0.5*$15+0.5*0= 7.5
discounting w/ rfr to get call value @t0 => 7.5/1.05 = 7.143

guess what? c is worth the same as with approach 1!! (whew...)


---------------------------------------------------
wait a second! we assumed that the S price will only go from 100 up to 115 or down to 95. that doesn't sound realistic!

u're right. the above simplifies everything with a simple one-step binomial tree. to model the real world, we will have to create multiple-step binomial trees. with the above one step binomial tree, we've got 2 expected values of the S price. As we increase the number of steps (n-> infinity), the binomial distribution would approx to a continuous normal distribution.

Forward Price

(post from old site)

What is Forward Price?
the AGREED price to buy something in the FUTURE.

Why is Forward Price > Spot price?
Intuitively:
say the underlying is worth $100.  if you enter a forward contract to buy that underlying at $100 in 1 year, u will have the freedom to spend/invest that $100 this year (and make interest).  this advantage is priced into the forward price so that's why forward price > spot price. 

Mathematically: 
Arbitrage.
if that's not the case, you'd:
@t=0
enter into the forward contract
short sell the underlying at spot price
lend the $ from above
@t=1

buy the underlying as per the forward contract at forward price determined t=0
use that underlying to even the short sell
receive the $ + interest  (proceed of this is to use to buy the contract in 1. above)
Say if the forward price = spot price at t=0, you'd execute the above and risk-free profit (interest from lending the $)!!  :D
So forward price has to = spot price (1 + r) so that no arbitrage to happen.

Put call parity

(post from old site)

C = max{S-K,0}
P = max{0,K-S}


C + Kd(0,T) = S + P
@maturity 
If S > K,
S-K + K = S + 0
If K > S,
0 + K = S + K-S

Graphically,
lhs is call curve shift up by K
Rhs is stock curve (45 degree) with left tail shifted up and flattened.

Option Early Exercise

(post from old site)

American call

What happens when you exercise?
  • you give up the option (whatever that's worth)
  • realize the cash flow (call: St - K; put: K-St)

What is that european option worth approximately?
  • some upper bound &gt;= option &gt;= some lower bound
  • St &gt;= european call &gt;= max{St - Kd(t,T), 0}
  • Kd(t, T) &gt;= european put &gt;= max{Kd(t, T) - St, 0}

When NOT to exercise?
If we end up with CF lower than the minimum value that a given option is worth, we definitely do NOT wanna exercise.

Minimum value of an American Call
@maturity T, Call_Eu is worth max{S-K, 0}
@anytime t, Call_Eu + Kd(t, T) = St + Put_Eu
So, Call_Eu = max{St + Put_Eu - Kd(t, T), 0}
&gt;=  max{St - Kd(t,T), 0}
Call_A &gt;= Call_Eu since American offers early exercise.
so, Call_A &gt;= max{St - Kd(t,T), 0}
@time t
if we don't exercise, we hold on to something that's worth at least St - Kd(t,T)
if we do, we realize St - K.
since K &gt; Kd(t,T), Call_A &gt;= max{St - Kd(t,T), 0} &gt; max{St - K, 0}
we'd realize a cash flow max{St - K, 0} that's less than what it's worth at the minimum ie max{St - Kd(t,T), 0} if we exercise at any time t.  That's why we don't ever wanna early exercise a call if there's no dividend.

Note that the above applies on stock options only, not future options.
"Remember that the result about it never being optimal to early exercise an American call option on a non-dividend paying stock only applies to ... stocks. A futures contract is not a stock. In fact, as I said in one of the lecture you can think of a futures contract as being a security that is always worth zero but that it pays a (sometimes negative) "dividend" in every period."


Minimum value of American put?
@maturity T, Put_Eu is worth max{K-ST, 0}
@anytime t, Put_Eu = Call_Eu + Kd(t, T) - St
So, Put_Eu = max{Call_Eu + Kd(t, T) - St, 0}
&gt;=  max{Kd(t, T) - St, 0}

Put_A &gt;= Put_Eu since American offers early exercise.
so, Put_A &gt;= max{Kd(t, T) - St, 0}
@time t
if we don't exercise, we hold on to something that's &gt;= Kd(t, T) - St
if we do, we realize  K - St.
since K &gt; Kd(t,T), we'd realize a cash flow that's greater than what it's worth at the minimum if we exercise at any time t.  It means that we cannot eliminate the potential opportunity to exercise.

Merely beating the minimum does NOT mean it's optimal.  Say, if you own an ATM Put that's yet to expire.  If you exercise it, you give up the option and you get nothing for CF.  That option is yet to expired and is certainly worth something and you do not wanna exercise at that point just because it beats the minimum.

So, when do we wanna early exercise?  TBD...

St. Petersburg paradox

(post from old site)

Coin toss game. Pay u 2^n if you get head on the nth toss. How much would u pay to play this game?

U'd probably would like to calculate the expected value of this game...
basically, for each possible outcome, u calculate the outcome multiplied by the associated probability. Then u sum it all up.
50% chance to get head in the first game to give u $2, which gives u an expected value of $1.
within the remaining 50% chance, u have half chance to make $4 in the 2nd game, which gives 0.5/2 *2^2 = 1.
as we continue , nth game would give an expected value of (1/2^n)*2^n =1.
if we sum all possible outcomes, we'll be adding 1 for each possible outcome, which will be infinity.

would u even pay $1k for this game for an expected value of infinity ?

That's quite counter intuitive.

supposedly, the paradox is solved with the introduction of utility function, ie point of diminishing return.

I guess 1 thing to learn is that We should be happy to pay 1k for one game of this rather than playing lottery over and over again...

What?! Option value doesn't depend on the likelihood of the underlying going up or down?

(post from old site)

WHAT?!


yes, I'm saying, @t0, these options are worth the same:
  • Call option with strike price 100, expiring @t1, on underlying A, which is at $100 now
  • Call option with strike price 100, expiring @t1, on underlying B, which is at $100 now
 even though 
  • underlying A has 99% chance of closing at $110 and 1% at $90 on expiry
  • underlying B has 1% chance of closing at $110 and 99% at $90 on expiry
Seriously, wouldn't you wanna put your $ on the call option (A) that has a 99% chance expiring in the $, instead of the one (B) only has 1% chance of expiring in the money?


HOW?!  How are those options worth the same now?!!

2 words:  replicating portfolio

Let's have a portfolio such that it'll replicate the cash flow of the option by investing in the underlying and the cash account, assuming risk free rate = 1%, such that
@t1, the portfolio is worth
  • 110x + 1.01y    when underlying =110
  • 90x + 1.01y    when underlying = 90
So, 
  • 110x + 1.01y = 10   (the option expiring in the $)
  • 90x + 1.01y = 0   (the option expiring out of $)
Solving the equations,
  • x =0.5
  • y = -44.55
meaning
  • long half unit of the underlying, and
  • short (ie borrow) 44.55 in the cash account at risk free rate
With this portfolio, you'll end up with 
  • $10 if the underlying closes at $110 when option expires
  • $0 if the underlying closes at $90 when option expires
exactly replicating the option CF.

So, what's this portfolio worth @t0?
0.5*100-44.55(1) = $5.45

2 things to note:
  1. both options, A &amp; B, are worth $5.45, disregarding the different probability of up move and down move.
  2. if either option is priced higher / lower, you can arbitrage with the replicating portfolio.

=======================================





with all that said, think about it..
underlying A is not really worth 100 @t0, given the prob &amp; prices @t1...
underlying B is not really worth 100 @t0, given the prob &amp; prices @t1...

Early exercise on a dice game

(post from old site)

Rules:
you get to throw a fair die up to 3 times
the number of dollars you're gonna get is determined by the number you get on you last throw
How much would you pay to play this game?

=====================================================
First of all, if the game is free, what would your strategy be?

1st throw -----> 2nd throw -------------------> 3rd throw
              |-> early exercise     |-> early exercise

The above will be the decisions you'd have to make
after first throw, do you 
go for a 2nd throw, or
early exercise (ie taking the $ shown as on your first throw)?
Similarly, do you make the 3rd throw if you have done the 2nd one?


Let's determine the expected value (EV) for only one toss.  easy enough => 3.5.

part A
If my 2nd throw gets me 1, 2, or 3, I'll go for the 3rd throw.  Take the $ (exercise) otherwise.
  
After my 1st throw, it's a bit trickier.  Obviously, I'll go for the 2nd throw if my first throw is 1, 2, or 3, applying the same logic above.  If my first throw is 6, I will not go for the 2nd throw as I would have already achieved the highest payoff possible.

How about if you get 5 on your first toss? intuitively, I'd see my chance of getting a 6 on either 2nd throw or 3rd throw => 1 - p(1 to 5)*p(1 to 5), which essentially gives the chance of NOT (having first throw resulting in 1 TO 5 AND 2nd throw resulting in 1 TO 5)
you only have 11/36 to beat getting 5.  So, if your first toss gives 5, you'd early exercise

How about if you get 4 on your first toss?
similar calculation, you'd have 20/36 to beat getting 4.  In this case, you'd NOT exercise and go for the 2nd throw.

part b
So, that's the strategy.  Now, how much would you pay to play this game?

Again, working backward:
right before 2nd throw, 
50% chance to go for 3rd throw, which will result in EV of 3.5
50% of getting 4, 5, or 6, giving an EV of 5
=> before 2nd throw, the game is worth 4.25 

right before first throw,
66% chance to go for 2nd throw, which gives an EV of 4.25, as shown above
33% chance of getting 5 or 6, giving an EV of 5.5 
=> the game is worth $4.66666666...

So, if the game is offered to you below that price, go for it.  Or you can offer that game above that price (casino!).

One more note, we could have gotten the strategy by calculating the EV alone.  ie, part b alone will be sufficient.  since we get the EV of 2nd throw = $4.25.  If our first throw is above that number, we exercise.  If not, we play on.

How does interest rate affect option price?

(post from old sites)

not as simple as many web sites suggest.

interest rate affects option price in 2 folds:
  1. forward price of the spot stock
    • as interest rate increases, forward price of the stock underlying, aka no arbitrage price of the stock underlying at option expiry, increases, and in turns, increases call value and decreases put value
  2. cost of carrying of the option
    • as interest rate increases, cost of carrying the option increases and in turns, decreases the option value
    • a small amount, as option price is a fraction of the underlying price

FAQ:
how about future underlying?
stock option prices on the spot contract as the underlying.  Spot underlying and the interest rate determines the forward price, aka no arbitrage price of the stock underlying at option expiry.
Future options prices uses the FUTURE contract as the underlying.  Future price is effectively the equivalent of the forward price of the spot underlying and that's why when interest rate changes, the forward of the future doesn't change.  In fact and again, we use future as the underlying, not the forward.

Increase in interest does not drive up the forward price of future, but it should drive up future price because of no arbitrage, right?
Yes, but the change in future price is in fact a change in UNDERLYING price.   Perhaps another way to think of it is that the change in interest rate directly affects the underlying price of future option, but not affect the the future option itself.
As opposed to change in interest rate does not directly affect the underlying of a stock option, aka spot price of stock (economist may beg to differ), but directly affects the option itself as it changes the ATM forward.

How about far month future option?
Future option uses simple offset mode instead of forward price.  Far month future options still use front-month future as the base contract, which is most liquid.  To account for the different in expiry, traders put in offset for different months, which embeds the interest and dividends?

Reference:
Option volatility &amp; pricing by Natenberg

Note:
confirmed using Orc.  push up interest rate, then
  • both index call and put TV go down
  • stock call TV goes up and put TV goes down

CAPM & Efficient frontier "results in error-maximizing investment-irrelevant portfolios"?

(post from old site)

How?  parameter estimation error in expected return and covariance.
Example, with a 2 asset portfolio, let's say you overestimates A1 return by e and underestimates A2 by 2. Your average error is=0, which is pretty good.
With modern portfolio theory, you would invest a lot more in A1 and less in A2 and thus maximizing your error...


Quick review on CAPM, efficient frontier, etc.
In a nutshell, modern portfolio theory with CAPM picks a portfolio of risky assets (efficient frontier) and risk-free asset and maximizes the expected return for any given level of risk (volatility) / minimizes the risk for any given level of expected return.
How to maximize expected return? by investing more in assets with higher expected return.
How to minimize risk? by diversifying among assets have low correlation.


example, if you invest in oil company and airline company, you can minimize your risk due to oil price fluctuation.  While both companies expect to make money, if oil price increases, earning of the oil company is expected to increase and that of the airline company is expected decrease due to higher cost and vice versa.

Value at Risk vs. Conditional value at risk

(post from old site)

VaR
95% VaR is the 95th quantile of loss
Say it's = $1 mil. then it means 95% chance the loss is under $1 mil.
CVaR
Aka expected shortfall or tail conditional expectation
With the above 95% VaR, there is a 5% probability that the loss will be &gt;= 1 mil.
Let's say if we fall into that 5%, what's the loss that we should expect?
Now, that's what CVaR is.
Think about it. 95% VaR is essentially the MINIMUM loss of the portfolio for the 5% worst case scenario.
CVaR will actually tell u the mean (expected) loss for the 5% worst case scenario.

Monty Hall, goats and 3 prisoners

(posts from old site)

Welcome to the game show!  I'm Monty Hall.  As you can see, there are 3 doors in front of you, A, B and C.

You are in for a prize!  Behind one of the doors is $1 mil!  For the other 2 doors, there is a goat behind each.  :D

Now, pick a door!

... Say you pick door A...

Ok, with door B and C, let me open a door with a goat!  (Monty opened door C.)

Now, contestant, let me give you 2 choices.  You may stick with door A or switch door B for $1 mil.

What do you do?





------------------------------------------
There are 3 condemned prisoners, with 2 to be executed and 1 to be pardoned.

Prisoner A begs the warden to tell him which of the other prisoners, B &amp; C, will be executed, arguing that this reveals no information to his own fate, but secretly thinking that it'll increase his odds of being pardoned from 1/3 to 1/2.

what do u think?

PHILOSOPHY in pricing derivatives

(posts from old site)
  1. Specify a model under the Q(theta)-dynamics
    • theta is a vector of parameters, e.g. volatility, drift, etc.
    • Q() is the risk neutral framework
  2. Price all securities at time t by discounting the next period (t+1) risk neutral prices
  3. Calibrate the model by choosing theta so that market prices of appropriate liquid securities agree with model prices of those securities
    • this calibration procedure to market prices will incorporate the factors not specified in the model, e.g. policy risk, market expectation, economic outlook, etc.