Category Archives: Finance

Implied odds behind lay betting

In a precedent post,  I introduced the concept of back and lay bets on a given event, for example the fact that it will rain on a given day.  We also said that we are given some odds $o$, which express how much we can earn if we guess the right outcome between the event happening ($E$) or not ($\bar{E}$).

game-1556219_640

Usually, people betting are very familiar with the “common” back bet and the odds $o$, which generate a net cash flow of $x (o-1)$ when we guess right and $-x$ when we guess wrong on an invested amount of $x$. However, I always found lay bets less intuitive and I prefer to see them as betting on the event not to happen.  This post about seeing a lay bet on $E$ as a back bet on $\bar{E}$, for example backing that it will not rain on a given day. The difference is explained in the table below:

$E$ $\bar{E}$
Laying $E$ $-x(o-1)$ $x$
Backing $\bar{E}$ $-y$ $y(\bar{o}-1)$

We see a new term $\bar{0}$ appearing, which are the odds of backing the event not to happen. Because both lines actually imply betting on the same thing (the event not to happen), the cash flows in case of $E$ or $\bar{E}$ must be the same. Therefore, we get the following system of equations:

$$\begin{align}
-x(o-1) &= -y\\
x &= y (\bar{o}-1)
\end{align}$$

The fist equation tell us that $y=x(o-1)$ and we can substitute in the second equation to solve for $\bar{o}$:
$$\begin{align}
x &= y (\bar{o}-1)\\
x &= x(o-1) (\bar{o}-1)\\
\frac{x}{x(o-1)} &= \bar{o}-1\\
\bar{o} &= 1+\frac{1}{o-1}\\
\bar{o} &= \frac{o}{o-1}\\
\end{align}$$

Now, we can take bets on the event not to happen much more intuitively. Let’s go back to our example and let’s say that the odds of the bet on having rain today is $o = 5$. If we want to bet on the fact that it will not rain today, we need to place a lay bet, but what are our odds $\bar{o}$? Using the formula we derived above, we can easily compute them:

$$\bar{o} = \frac{o}{o-1} = \frac{5}{5-1} = 1.25 $$

Let’s say that we are happy with those odds, and we’d like to place a bet of $y=2$ at $\bar{o}=1.25$. Well, if we look at your system of equation, we see that $x = y (\bar{o}-1)$, so we need to bet:

$$x = y (\bar{o}-1) = 2 (1.25-1)=0.5$$

Let’s check:

$E$ $\bar{E}$
Laying $E$ $-x(o-1) = -0.5 (5-1) = -2$ $x = 0.5$

This is correct! An easy way of computing $x$ is to keep in mind that $x = y (\bar{o}-1)$ is simply the amount you expect to win by betting on the event not to happen.

An introduction to Risk Parity

Hello everyone!

In this post, I’d like to start talking again about asset allocation and in particular to introduce you to a relatively new concept in
the field: risk parity. Don’t get me wrong, this approach has been around for quite a while now — I think the first to create a product around this concept were Bridgewater in the 90s — but it is a philosophy which I believe is still not taught frequently enough in finance classes and hence is still widely unknown.

ipad-407799_1920

Motivation

I first started to pay attention to risk parity about 5 years ago. In the classic Modern Portfolio Theory (MPT thereafter), the optimization problem has two inputs:

  • the covariance matrix of the assets available
  • an expected return for each asset considered

Both are difficult to estimate, but researchers tend to agree that estimating covariances is easier than estimating returns.

Nevertheless, a lot of asset managers came up with expected future returns based on “their experience” or on “their view of the market” — there is no real mathematical framework available. This causes a real issue because it has been shown that the mean-variance optimization problem (the one behind MPT) is really sensitive to the expected returns inputs: changing slightly the expected return figures can result in a big optimal allocation change. Therefore, estimating wrong expected returns makes manager select potentially pretty sub-optimal portfolios.

new-brighton-1239724_1280

Estimating the covariance matrix is not an easy task either. However, there exist frameworks on which managers can rely and estimates they are usually not too far of the reality  (risk tends to be more stable than returns).

What I tried to look for 5 years ago, was an asset allocation method which was independent from the expected returns, as I found them very difficult to estimate accurately. Risk Parity is a perfect example of such method.

How does it work?

I will try to explain to concept without getting into equations. For those who are interested in the maths, please have a look at Thierry Roncalli’s presentation and paper to start with.

The basic idea is to have a portfolio where risk is diversified as much as possible — ideally perfectly diversified. The remaining challenge is to define how to quantify diversification; defining risk is somewhat arbitrary as you could choose different risk measures (volatility, expected shortfall etc) depending on your preference as an asset manager.

Quantifying diversification

Let’s assume that we are considering the simplest risk measure, volatility. Once the covariance matrix of all considered assets has been determined, one can then compute the volatility of a portfolio given the weights of each asset. Furthermore, one can also compute how much each asset contributes to the total volatility (i.e. total risk) of the portfolio. In risk parity the goal is to have each asset contributing equally to the total risk.

Let’s consider a portfolio with two assets $A$ and $B$ with 50% of weight for each asset (so-called equally-weighted portfolio) and let’s assume the total volatility is 8%. By computing the contribution and assuming $A$ is more volatile than $B$, then you could see that $A$ contributes by 6% and $B$ by 2% only (numbers here are arbitrary and taken for the sake of the example).

ew

According to our diversification measure, the portfolio is not very well balanced as it is much more exposed to $A$.

Finding risk-parity

In his paper, Roncalli shows how one can implement an optimization method to find the portfolio where both $A$ and $B$ would equally contribute to the portfolio’s total volatility. Since I want to keep this post fairly non-technical I voluntarily want to skip the details of the methodology. Let’s assume we are provided with an optimizer which gives us the risk-parity portfolio. It would look like something with 70% weight on $B$ and 30% on $A$ and which would result in a total volatility of about 3%.

erc

This time, our portfolio is optimally balanced as it is equally exposed to both assets from a risk point of view. Note that the total volatility of the risk-parity portfolio cannot be chosen, it is purely a result of the optimization.

There is much more to say on the properties of risk-parity, and I will write more about this in later posts.

Exchange Sports Betting: how to close your bets?

Good evening,

It’s been a very long time since I last posted something on this blog because I have been very busy at work but I thought I will try to be more active from now on.

Today, I’d like to share some basic maths about exchange sports betting, and actually we could generalize this to exchange betting in general.

Exchange betting has emerged over the last decade on the internet. Companies such as Betfair act as intermediary between individuals (or actors) willing to bet on a specific event.

From a general point of view, actors bet on an event $E$ to happen or not to happen.

  • When you want to bet on the fact that $E$ does happen, we say that you back $E$
  • When you want to bet on the fact that $E$ does not happen (denoted $\bar{E}$), we say that you lay $E$.

I chose to discuss exchange betting in this post because you have the opportunity to directly bet both on $E$ and $\bar{E}$. When you bet against a bookmaker, usually he will allow you only on an event to happen. For example, on a football game between Team A and Team B, the bookmaker will allow you to bet on Team A to win, Draw or Team B to win, but he will not let you bet directly on Team A not to win. This does not mean that you cannot recreate this bet synthetically, but I wanted to keep things as simple as possible on this post.

Let’s keep the example of the football game, and let’s say that the event of Team A to win is denoted by $A$. When you place a bet, you do it at given odds, which we will denote by $o$. For example, let’s say that $o=2$. Here I am using the European convention, which means that if you bet an initial amount $x$ on $A$,

  • If $A$ happens, the payoff is $x \cdot (o-1)=x \cdot (2-1)=x$.
  • If $A$ does not happen, the payoff is $-x$.

Now let’s say that the odds do not change and that you lay an initial amount of $x$ on $A$:

  • If $A$ happens, the payoff is $-x \cdot (o-1)=-x$.
  • If $A$ does not happen, the payoff is $x$.

Let’s draw a table to see what happens now in both situations, using generic odds $o$:

$A$ happens $A$ does not happen
Back $x$ at $o$  $x(o-1)$ $-x$
Lay $x$ at $o$  $-x(o-1)$ $x$
Net payoff  $0$ $0$

As expected, if you back and lay $A$ for the same odds $o$, then your payoff will be $0$ in both cases.

Let’s now consider a case where the odds change in time. Originally, you back $A$ at $o_1$, and then the odds change to $o_2$. What I would like to show on this post is that you can again guarantee a similar payoff in both cases ($A$ happens or not) by laying some amount $y$ on $A$ at $o_2$.

Let’s draw the table again:

$A$ happens $A$ does not happen
Back $x$ at $o_1$  $x(o_1-1)$ $-x$
Lay $y$ at $o_2$  $-y(o_2-1)$ $y$
Net payoff $x(o_1-1)-y(o_2-1)$ $y-x$

Now, we want the net payoff to be equal in both cases:

$$x(o_1-1)-y(o_2-1) = y-x$$

$$x(o_1-1) + x = y +  y(o_2-1)$$

$$x(o_1-1+1) = y(o_2-1+1)$$

$$x o_1 = y o_2$$

$$y = x \frac{o_1}{ o_2}$$

By solving this equation, we know that if we bet $y = x \frac{o_1}{ o_2}$, we will have the same payoff in both cases. We can also compute the value of this payoff:

$$\text{Payoff} = y-x = x \frac{o_1}{ o_2} – x = x \left(\frac{o_1}{ o_2} – 1 \right)$$

So we see here that if $\frac{o_1}{ o_2} – 1 > 0$, we will have a positive payoff in any case. In particular, if $\frac{o_1}{ o_2}>1$, we make money, if $\frac{o_1}{ o_2} < 1$, we lose money, and if $\frac{o_1}{ o_2}=1$, we make $0$ (which is the case $o_1=o_2=o$ we saw previously).

In conclusion, we make profit if and only if $o_2<o_1$. This makes a lot of sense; let’s say $o_1=3$ and $o_2=2$, the odds became lower because the market acknowledged that  $A$ is more likely to happen because it’s now willing to pay less if $A$ happens than before. This means that you were right, and hence that you have made money.

Now, how does it work if you want to take the opposite position originally, namely you lay an initial amount $x$ on $A$  at $o_1$, and then the odds change to $o_2$. How can you close the position by backing $A$ with an amount $y$?

$A$ happens $A$ does not happen
Lay $x$ at $o_1$  $-x(o_1-1)$ $x$
Back $y$ at $o_2$  $y(o_2-1)$ $-y
Net payoff $y(o_2-1)-x(o_1-1)$ $x-y$

We then need:

$$y(o_2-1)-x(o_1-1)=x-y$$

$$y + y(o_2-1)=x + x(o_1-1)$$

$$y o_2 = x o_1 $$

$$y = x \frac{o_1}{o_2} $$

Then, the payoff is:

$$\text{Payoff} = x-y = x – x \frac{o_1}{o_2}  = x \left( 1 – \frac{o_1}{o_2} \right)  $$

In this case, we see that we make a positive payoff if $\frac{o_1}{o_2} < 1$, that is, if $o_1 < o_2$. Again, this makes sense intuitively; if you lay $A$ at $o_1=2$ and then $o_2 = 3$,  then the market believes that $A$ is now less likely to happen than before, which means that you were originally right to lay $A$ and hence deserve a payoff.

Let’s do a final sanity check on what we just said. First, we know that odds can take any value in $[1, \infty]$. When $o=1$, then $E$ will happen with probability $1$. When $o = \infty$, then $E$ will never happen (probability is $0$).

Assume you had a bet at $o_1$ and then $o_2 = 1$, which means that $E$ will happen. Then, if you backed $E$ you can get a payoff of $x \left( \frac{o_1}{1} – 1 \right) = x (o_1 -1 )$. If you laid $E$, then the payoff is $x \left( 1 – \frac{o_1}{1} \right) = -x (o_1 – 1)$. These match the payoff we defined orginally for back and lay bets on $E$.

Assume now $o_2 = \infty$, then if you backed $E$ the payoff is $x ( 0-1) = -x$ and if you laid $E$ the payoff is $x (1-0)=x$. This also matches the original definition and we have shown here that the approach above is sound.

Please keep in mind that all the above assumes there is no transaction costs to take into account, which is not exactly correct and which I will address in a later post, but the idea is there.

That’s all for now, hope you enjoyed that and I’ll be back with more.

CFA Level III: Implementation Shortfall

Good evening,

A quick post tonight to discuss a topic of Trading, Rebalancing and Monitoring part of the Level III curriculum called Implementation Shortfall. The reason why I chose to do this is because it took me some time to overcome the naming conventions of the CFA institute, which are, with all due respect, very counterintuitive in my opinion.

The idea is very simple: you would like to be able to measure the quality of the execution of a trade compared to an ideal execution.

From what I’ve seen in mock exams and exercises, they always give you a little story like the following one:

  • At some point, the investment manager decides to buy 10 Manchester United stocks, which trades at 20.
  • This is called the benchmark price (BP), for some reason.
  • Then (usually the following day), a limit order is placed in the market, say at 19.95 and is not executed at all. The market closes on that day at 20.10. Too bad.
  • You pay 0.05 per share of commission.
  • The following day, the order is revised at like 20.15 and 8 stocks (i.e not the whole 10) are filled at that price, and the market closes at 20.20.

What happens there? Well, assume you are able to magically implement your trading ideas instantly at no cost: this is called the paper portfolio. What is your profit at the end of the story?

  • You buy 10 shares at 20 for 200.
  • At the end of the story, your stocks are worth 20.20 each, which gives you a total of 202.
  • You earned 202 – 200 = 2

In the real world, it did not work out that way:

  • You bought 8 stocks at 20.15 for 161.2
  • You pay 0.4 in commission
  • At the end of the story, your stocks are worth 20.20 each, which gives 161.6
  • You earned 161.6 – 161.2 – 0.4 = 0

The implementation shortfall is defined as follows:

$$\frac{\text{paper portfolio gain}-\text{real portfolio gain}}{\text{paper portfolio investment}}=\frac{2}{200}=1.0\%$$

This means that 1.0% of the potential investment was lost (or, more precisely, not won)  in the implementation, due to different frictions.

The CFA Institute then provides a way to split this difference in different components.

First the explicit costs, which consists in all the obvious transaction costs that are expressed in the trade:

$$\frac{\text{commission}}{\text{paper portfolio investment}}=\frac{0.4}{200}=0.2\%$$

That’s fine. But then comes the bizarre naming conventions.

Some extra costs come from the fact between the moment when the investment manager decides to buy the stock and the day when the order is partially filled, the market moved.

The slippage or delay costs is the difference between the benchmark price and the closing price, the day before the execution day (which is called, poorly the decision price, I don’t understand why) divided by the benchmark price, times the percentage of the order that was filled. In order case we have:

$$\frac{20.10-20.00}{20} \cdot \frac{8}{10}=0.4\%$$

It is the portfolio of the implementation shortfall that was lost because of the delay between the time the manager saw the opportunity and the day the trade was partially executed.

Then, the realized loss is the difference between the execution price and the closing price the previous day (so-called decision price), divided by the benchmark price times the percentage of the order that was filled:

$$\frac{20.15-20.10}{20} \cdot \frac{8}{10}=0.2\%$$

This is what was lost during the execution day.

Finally the missed trade opportunity cost is the difference between the price at the end of the story and the benchmark price divided by the benchmark price time the proportion of the order that was not filled:

$$\frac{20.20-20.00}{20} \cdot \frac{2}{10}=0.2\%$$

This is what was lost by not being executed.

If you sum all the components, you get 0.2% + 0.4% + 0.2% + 0.2% = 1.0%, the total implementation shortfall.

So you are able to see that, in this example, the main component of the implementation shortfall is the delay between the trade idea and the trade execution day. The limit order at 19.95 was too ambitious and resulted in a loss.

Notice also that all the examples I saw are examples where the market goes in the trade direction (i.e. market goes up after a buy decision). It could be possible that the market goes adversely, which would result in a negative implementation shortfall… i.e a gain.

That’s all for today.

I’ll be back soon with more.

Cheers,

Jeremie

CFA Level III: Interest Rate Parity

Hello everyone,

Today I’m gonna talk about some economic concepts that were mentioned at least since Level II and that are quite useful in the whole curriculum and in finance in general when it comes to dealing with currency management.

Covered Interest Rate Parity

The idea is quite simple, we will compute the forward exchange rate between two currencies using an arbitrage argument, say EUR and USD. The spot exchange rate is denoted $S_{\text{EUR}/\text{USD}}$: it corresponds to the number of euros you get today for 1 US dollar. Furthermore, the risk-free rate in USD is denoted $R_{\text{USD}}$ and the risk-free rate in EUR is denoted $R_{\text{EUR}}$. The question is, after some time $T$, how many euros will I get for 1 US dollar? This rate is called the forward rate and is denoted $F_{\text{EUR}/\text{USD}}$.

Well, you can price that quite easily using an arbitrage argument! The idea is simple:

  • I’m going to borrow today $\frac{1}{1+R_\text{USD}}$ USD which means that at time $T$, I will have to pay back 1 USD.
  • Then I’m going to convert what I just borrowed in EUR, which gives me $S_{\text{EUR}/\text{USD}} \cdot \frac{1}{1+R_\text{USD}}$ euros
  • I then invest this at the risk-free rate in EUR, and I get at time $T$ $(1+R_\text{EUR}) S_{\text{EUR}/\text{USD}} \cdot \frac{1}{1+R_\text{USD}}$ euros

What I wrote above means that:

$$F_{\text{EUR}/\text{USD}}= S_{\text{EUR}/\text{USD}} \cdot \frac{1+R_\text{EUR}}{1+R_\text{USD}}$$

That’s as simple as it sounds, we have determined the forward price of US dollars in euros at time $T$.

A very easy way of remembering the formula above is noticing that the rate in the numerator and in the denominator are from the same currency as is shown in the rate label: EUR/USD.

Also, recall from this post that in this case (EUR/USD), the US dollar is the asset being priced in euros; the US dollar is an asset like anything else.

Finally, we understand from the formula above that:

$$R_\text{EUR} > R_\text{USD}  \implies F_{\text{EUR}/\text{USD}}> S_{\text{EUR}/\text{USD}}$$

This is very useful because you very often have to say what currency is trading at premium or at discount in another currency. First I used to always get that wrong. In fact, it’s very easy.  The currency being traded is the one in the denominator of the label, here USD. Then, if the forward price is higher (lower) than the spot price, it is of course trading at premium (discount).

So, if we say that the USD is trading at premium in EUR, it means that we can have more EUR in the forward market than in the spot market for 1 USD.

Uncovered interest rate parity

This is in a sense an extension of the covered interest rate parity we just discussed which says that:

$$\mathbb{E}({S_{\text{EUR}/\text{USD}}}_T)= {S_{\text{EUR}/\text{USD}}}_0 \cdot \frac{1+R_\text{EUR}}{1+R_\text{USD}}$$

Notice that here the implication is different than previously, because we say that we expect that the spot rate at time $T$ will be equal to the forward price at today. This comes to says that the currency that has the higher (lower) interest rate is expected to depreciate (appreciate):

$$R_\text{EUR} > R_\text{USD}  \implies \mathbb{E}({S_{\text{EUR}/\text{USD}}}_T)> {S_{\text{EUR}/\text{USD}}}_0$$

Indeed, a higher spot rate in the future means that you would get more euros for the same amount of US dollars which means that the euro has depreciated!

A lot of traders disagree with that statement, and this comes to a very famous trading strategy called the carry trade. The idea is really simple as well: these traders do not think that the currency with the higher interest rate will depreciate. They hence short the currency with lower interest rate and invest in the currency with higher interest rate. In the curriculum, they say that this strategy tends to work most of the time, generating positive income. However, they say that, when for some reason, the interest rate goes in the expected direction, they tend to do so very violently and that it can lead to very large losses.

That’s it for today, I hope this little post will help you in mastering this concept, which is key to a lot of different topics at different levels of the CFA curriculum.

Cheers,

Jeremie