Two different books are giving two different solutions.

expected valuemarkov chainsmarkov-processprobabilityprobability theory

So I am solving some probability/finance books and I've gone through two similar problems that conflict in their answers.

Paul Wilmott

The first book is Paul Wilmott's Frequently Asked Questions in Quantitative Finance. This book poses the following question:

Every day a trader either makes 50% with probability 0.6 or loses 50% with probability 0.4. What is the probability the trader will be ahead at the end of a year, 260 trading days? Over what number of days does the trader have the maximum probability of making money?

Solution:

This is a nice one because it is extremely counterintuitive. At first glance it looks like you are going to make money in the long run, but this is not the case.
Let n be the number of days on which you make 50%. After $n$ days your returns, $R_n$ will be:
$$R_n = 1.5^n 0.5^{260−n}$$
So the question can be recast in terms of finding $n$ for which this expression is equal to 1.

He does some math, which you can do as well, that leads to $n=164.04$. So a trader needs to win at least 165 days to make a profit. He then says that the average profit per day is:

$1−e^{0.6 \ln1.5 + 0.4\ln0.5}$ = −3.34%

Which is mathematically wrong, but assuming he just switched the numbers and it should be:

$e^{0.6 \ln1.5 + 0.4\ln0.5} – 1$ = −3.34%

That still doesn't make sense to me. Why are the probabilities in the exponents? I don't get Wilmott's approach here.

*PS: I ignore the second question, just focused on daily average return here.


Mark Joshi

The second book is Mark Joshi's Quant Job Interview Question and Answers which poses this question:

Suppose you have a fair coin. You start off with a dollar, and if you toss an H your position doubles, if you toss a T it halves. What is the expected value of your portfolio if you toss infinitely?

Solution

Let $X$ denote a toss, then:
$$E(X) = \frac{1}{2}*2 + \frac{1}{2}\frac{1}{2} = \frac{5}{4}$$
So for $n$ tosses:
$$R_n = (\frac{5}{4})^n$$
Which tends to infinity as $n$ tends to infinity



Uhm, excuse me what? Who is right here and who is wrong? Why do they use different formula's? Using Wilmott's (second, corrected) formula for Joshi's situation I get the average return per day is:

$$ e^{0.5\ln(2) + 0.5\ln(0.5)} – 1 = 0% $$

I ran a Python simulation of this, simulating $n$ days/tosses/whatever and it seems that the above is not correct. Joshi was right, the portfolio tends to infinity. Wilmott was also right, the portfolio goes to zero when I use his parameters.

Wilmott also explicitly dismisses Joshi's approach saying:

As well as being counterintuitive, this question does give a nice insight into money management and is clearly related to the Kelly criterion. If you see a question like this it is meant to trick you if the expected profit, here 0.6 × 0.5 + 0.4 × (−0.5) = 0.1, is positive with the expected return, here −3.34%, negative.

So what is going on?

Here is the code:

import random
def traderToss(n_tries, p_win, win_ratio, loss_ratio):
    SIM = 10**5 # Number of times to run the simulation
    ret = 0.0
    for _ in range(SIM):
        curr = 1 # Starting portfolio
        for _ in range(n_tries): # number of flips/days/whatever
            if random.random() > p_win:
                curr *= win_ratio # LINE 9
            else:
                curr *= loss_ratio # LINE 11

        ret += curr # LINE 13: add portfolio value after this simulation

    print(ret/SIM) # Print average return value (E[X])

Use: traderToss(260, 0.6, 1.5, 0.5) to test Wilmott's trader scenario.

Use: traderToss(260, 0.5, 2, 0.5) to test Joshi's coin flip scenario.



Thanks to the followup comments from Robert Shore and Steve Kass below, I have figured one part of the issue. Joshi's answer assumes you play once, therefore the returns would be additive and not multiplicative. His question is vague enough, using the word "your portfolio", suggesting we place our returns back in for each consecutive toss. If this were the case, we need the geometric mean not the arithmetic mean, which is the expected value calculation he does.

This is verifiable by changing the python simulation to:

import random
def traderToss():
    SIM = 10**5 # Number of times to run the simulation
    ret = 0.0
    for _ in range(SIM):
       if random.random() > 0.5:
                curr = 2 # Our portfolio becomes 2
            else:
                curr = 0.5 # Our portfolio becomes 0.5

        ret += curr 

    print(ret/SIM) # Print single day return

This yields $\approx 1.25$ as in the book.

However, if returns are multiplicative, therefore we need a different approach, which I assume is Wilmott's formula. This is where I'm stuck. Because I still don't understand the Wilmott formula. Why is the end of day portfolio on average:

$$ R_{day} = r_1^{p_1} * r_2^{p_2} * …. * r_n^{p_n} $$

Where $r_i$, $p_i$ are the portfolio multiplier, probability for each scenario $i$, and there are $n$ possible scenarios. Where does this (generalized) formula come from in probability theory? This isn't a geometric mean. Then what is it?

Best Answer

The difference is that a $50$% loss and a $50$% gain (in either sequence) result in a net loss (AM-GM inequality), whereas halving and doubling (in either sequence) do not result in a net loss. Joshi is presenting (and solving) a different problem, one in which half the time the trader's expected return is $100$%. So there's no a priori reason to expect the same result.

Having said that, Wilmott's answer to the Joshi question is wrong. For $n$ tosses, $R_k=2^k(\frac 12)^{n-k}=2^{2k-n}$, where $k$ is the number of times you toss heads. Wilmott's analysis of Joshi assumes that you are starting afresh each time with a single dollar.

Wilmott's solution to his own problem is correct. If you take ten trials, you expect a return of $1.5^6 \cdot 0.5^4 -1 = \frac{729}{1024}-1 = -\frac{295}{1024}$. Taking the geometric mean gets you $\sqrt[10]{1.5^6 \cdot 0.5^4} -1 = 1.5^{0.6} \cdot 0.5^{0.4}-1$, which is exactly what Wilmott says (just writing it in exponential form).

Related Question