Stats & Stocks, Maths & Markets : Mental MODELS

I was reading the book “A Mathematician Plays the Stock Market” by John Allen Paulos and thought of creating the book summary to share across. Summary of Maths book!!! Its a problem statement, possible solutions and then arriving at the right one. AND then understanding why one solution is preferred over the other. It was not fair to create just summary. That’s why thought of starting new thread. I will not limit just to this book, but bring in examples from my other collections to build Mental MODELS that help us to reflect our investment behaviors.

OK, let us start,

M1: Looser + Looser = Winner???

This is known as Parrondo’s paradox. Consider the example:

Play one of the following game with Rs. 1000 to start with.

Game 1: If the money you have is even number you will win Rs. 101 & If it is odd you will loose Rs. 201

Start of the Game you have 1000, so even no. & you will win 101. Total 1101

Next, 1101 is odd, you will loose 201. You will end up with 900.

So the series is like : 1000, 1101, 900, 1001, 800, 901, 700, 801, 600, …

So this is a loser’s game.

Game 2, You will loose 51 rupee every time you play. Which is a sure shot Loser’s Game.

Now, instead of playing the same Game continuously, play alternative Game each time. Let us play the Game1 first and Game2 next and then repeat.

Start with 1000, (G1, win 101) 1101, (G2 loss 51) 1050, (G1, win 101) 1151, (G2 loss 51) 1100…

So the series becomes: 1000, 1101, 1050, 1151, 1100, 1201, 1150, 1251, 1200, 1301, 1250,….

Now, by playing the game alternatively you are making it a WINNER’S GAME.

But not all the time. Just play the game in reverse order and see what happens. Game2 first and Game 1 next.

Start with 1000, (G2, loss 51) 949, (G1 loss 201) 748, (G2, loss 51) 697, (G1 loss 201) 496…

The much interesting series turnout to be: 1000, 949, 748, 697, 496, 445, 244…

So, It’s not ONLY playing alternative games but also knowing When to play what.

Let us come out of Maths and apply some common sense here. You are sowing a seed. You can do two things with it. Pour water to it OR not to pour any water. Choosing one of them all the time, i.e., pouring water continuously OR keeping the pot dry all the time, both will kill the seed. Now, playing alternatively, pouring water for 10 mins and doing no thing for next 23 Hrs 50 mins every day, you can bring LIFE in the seed. That is the magic.

In investing world I have heard something similar:

What we really like is buying good-sized to very large first-class businesses with first-class management and just sitting there . You don’t have go from flower to flower . You can just sit there and watch them produce more and more every year. Charlie Munger.

Any similar thoughts, quotes, experiences???

8 Likes

Plants can be of different variety and different needs. Some may need constant watering while some trees who have grown so big that they wont need watering at all.
Each company and each sector is different. All are at different life cycle. Can we really take a very long term view about any company, whether its Asian Paints or Tata Motors?
Most mathematicians apply all kinds of mathematical models to investing , forgetting that all businesses are real entities, operated by real human beings who can take wrong business decisions, who can misjudge economic conditions and their decisions can be biased and emotional too. Real business environment cannot be mapped into mathematical models.

6 Likes

The idea of the model is to showcase, how different strategies work in different situations. How two loosing strategies in isolation can become winning strategy in combination. Nothing more. Not all the loosing games can become winning in combination. Not at all. It depends on the situation and the possibility. I am in complete agreement with you except for the last statement. What I have shared is a tiny sample in the number/biological universe. It’s an idea shared with small sample set.

In above example, I have chosen set of three numbers. In Game1, 101 & -201. In Game 2, -51. Just giving the different number, it create different outcomes. As you stated in real life business, each business is different so the numbers differ. Numbers differ, outcome differ, but the idea remains the same.

Now, not only numbers but we can replace the same with words:
101 as Potential Profit
-201 as Potential Loss
-51 as Stop Loss

Infinite applications with common thought.

As per Wikipedia mental model, It’s an explanation of someone’s thought process about how something works in the real world.

This thread is an effort to bring out the ideas through numbers.

3 Likes

I don’t think I have ever come across a member who talked about only math in this forum. Even the members who rely on visual presentations like charts add a bit of business and look at the trade in that context.

So if you can give an example, a stock, whichever situation it is in now, falling, range bound, uptrend, and apply this perspective and explain, I guess it will be more helpful.

Thanks @ChaitanyaC for bringing this up. The beauty of Model is in its application. Let us see how this model is applied to solve a classic case in investing.

  1. The nightmare situation for Technical analyst, who believe price is everything, is the pump & dump companies. Where chart looks perfect, very nice breakout, entry point & excellent growth. The trouble starts when such companies start falling. It’s free fall with absolutely no buyers. Getting stuck with such companies is loosing most of the Investments.

  2. On the other horizon, for Fundamental analyst, big challenge is the waiting period. With the feeling of, I know company is good, very big Margin of Safety, excellent opportunity, Buys the stock. Now, price doesn’t move. It just hovers around and never tries to catch MY expected value. How long shall I wait? Big investor with in depth knowledge about the company can wait, but a normal investor with limited knowledge, how long to hold on???

Can we club them and solve problems for each other??? Technical investors can spend some time with checking the fundamentals of the company and greatly reduce the chances of getting in to pump& dump companies. Fundamental analysts can build the watch-list of great opportunities but enter the stock ONLY when the momentum starts (breakout point of tech’s), so unproductive Waiting period is minimized. (This is just one solution. But the techno-funda analysis is getting quite popular addressing many such situations. The books by William O’Neil & Mark Minervini gives a good insight. Our own most popular thread ‘Hitesh portfolio’ @hitesh2710 filled with great insights on techno-funda analysis.)

The idea once again is to bring two trouble-sum situations, club them with varying possibilities and create win-win situation.

5 Likes

M2: Fooled by Average

We are used to average things out for the ease of calculation. Let us see, how our calculations go for a toss in continuous stock market kind of games.

Imagine you have a special strategy, where each month either you make 60% profit OR 40% loss with equal probability. You play this game continually for five years (60 months). If you start with 100000, how will it turn out at the end of five year? Choose an option:

a. Will make BIG money
b. Will be a moderate winner
c. Will loose money

(If you are not a math person, you can continue reading overlooking at calculations, you will get the zest of story. Otherwise, solving before reading further will be a great value addition to one self)

Approach 1:

So, with the out come of +60% half the time & other half the time -40%, average gain per month is +10% (i. e. ½ x [(60%)+(-40%)])

If I make 10% every month, the amount will be:

End of 1st month : 1,00,000 x (1+.1)^1 = 1,10,000
End of 2nd month : 1,00,000 x (1+.1)^2 = 1,21,000
End of 3rd month : 1,00,000 x (1+.1)^3 = 1,33,100
End of 4th month : 1,00,000 x (1+.1)^4 = 1,46,410

End of 5yrs : 1,00,000 x (1+.1)^60 = 3,04,48,163

Woo!!! My 1Lac has turned into 3 Cr 4.5 Lacs at the end of the 5th year.

Approach 2:

Let us not take averaging, but calculate the values month by month:

End of 1st month:
1L will be 1.6L (1Lx1.6) or 60,000 (1Lx .6) (equal probability of 60% gain or 40% loss)

End of 2nd month:
If, 1.6L it will be 2.56L (1L x 1.6 x1.6) or 96,000 (1Lx1.6x.6)
If, 60,000 it will be 96,000(1Lx.6x1.6) or 36,000(1Lx.6x.6)

End of 3rd month:
If, 2.56L it will be 4.096L(1Lx1.6^3) or 1,53,600(1Lx1.6^2x.6)
If, 96,000 it will be 1,53,600(1Lx1.6^2x.6) or 57,600(1Lx1.6x.6^2)
If, 36,000 it will be 57,600(1Lx1.6x.6^2) or 21,600(1Lx.6^3)

OK, its complex tree for 60 months. I will take a short cut path of winning for 30 months and loosing for 30 months. Half the time out of 60 months, I am going to make 60% gain & other 30 months I am going to loose 40%. Using the formula, I will have: 1L*(1.6^30)x(.6^30), i. e., 29,385. This is the most likely outcome!!!

OOOPS!!! My 1Lac has turned roughly less than 30K at the end of 5th year. I HAVE LOST more than 70% WITH 60% GAIN/40% LOSS STRATEGY.

Which approach is correct?.

In Approach 1, If my pay off instead of +60% & -40%, is 20% & 0% OR +80% & -60%, I will still get the same answer!!! Don’t get fooled by average! The calculations are for the strategy that makes every moth 10% profit.

Also, Approach 1 works well in discreet games. If you invest 1L at the start of every month and take out 1.6L or 60K at the end of month. Again fresh investment of 1L at the start of next month. The calculation is fine with that approach.

Just cross check with other pay offs with approach 2:

Pay Offs Calculation After 5 Yrs
+20% & 0% 1Lx(1.2^30)x(1^30) 2,37,37,631
+40% & -20% 1Lx(1.4^30)x(.8^30) 29,95,992
+60% & -40% 1Lx(1.6^30)x(.6^30) 29,385
+80% & -60% 1Lx(1.8^30)x(.4^30) 5.24
+100% & -80% 1Lx(2^30)x(.2^30) 0.00

If our strategy looses -60% or -80% half the time, for sure, we will end up with almost nothing.

2 Likes

Unless it is a Medallion fund https://ofdollarsanddata.com/medallion-fund/

Thanks for bringing up Medallion Fund, Founded in 1988 by mathematician Jim Simons. Maths, Stats & lot of Algos that run this fund. $1 invested in the Medallion Fund from 1988-2021 would have grown to almost $42,000 (net of fees). Short summary of the book describing him at Multi-Disciplinary Reading - Book Reviews

In my next model, I will try to cover how pay-off management changes whole picture. Thanks.

2 Likes

M3: Making sense of Stop Loss

In earlier model M2, we saw the outcome for different payoffs like 40% & -20%, 60% & -40%, etc. With built in human behavior (specifically as discussed in prospect theory), whenever we see profits, we prefer to cash in. And with looses we hold on and think market will revert and reduce the loss. Suppose, we start taking profits whenever we see gain of 25% & allow the looses to run, this is what happens:

Pay Offs Calculation Take out profit @25% Gain & allow losses to run
+20% & 0% 1Lx(1.2^30)x(1^30) 2,37,37,631
+25% & -20% 1Lx(1.25^30)x(.8^30) 1,00,000
+25% & -40% 1Lx(1.25^30)x(.6^30) 17.85
+25% & -60% 1Lx(1.25^30)x(.4^30) 0.00
+25% & -80% 1Lx(1.25^30)x(.2^30) 0.00

If we keep cutting profits and allow LOSSES to run, will loose most of what we have.

With exactly opposite strategy, where you go against your own instinct. Cut your losses early and let the profits run, let us see what happens (Following example is with Cut all your losses at 15% ):

Pay Offs Calculation Cut losses @ 15% & let profits run
+20% & 0% 1Lx(1.2^30)x(1^30) 2,37,37,631
+40% & -15% 1Lx(1.4^30)x(.85^30) 1,84,67,531
+60% & -15% 1Lx(1.6^30)x(.85^30) 101,43,01,928
+80% & -15% 1Lx(1.8^30)x(.85^30) 3473,30,50,240
+100% & -15% 1Lx(2^30)x(.85^30) 81934,65,72,581

For Technical analysts, STOP-LOSS is key, this model tries to explain the importance of it with Numbers.

3 Likes

Investing is all together different ball game which requires vision and ability to take risk in present scenario. I would like to mention case study of Nokia, Kodak who despite having good team chose to look the other way around to technological intervention. So, as a investor, one should be looking at prospects and later on, maths/logic would justify your decision.

I agree. In the world of multi-disciplinary thinking (which is a MUST for good investing process) , Maths/Stats is just ONE angle. But I believe, its important angle. Many of the concepts are difficult to discuss just with stories & real life examples. Assumed numbers and scenarios can bring the concept a life.

M4: The Scam

Assume, on Sunday, you receive a stock market prediction news letter whose summary says Nifty50 will be UP Next week. Probably you will ignore it. But by Friday Nift50 actually moves Up. Next Sunday, again you receive prediction that says Nifty50 will be UP Next week. It happens by Friday. You are confused. Third week, Fourth week, you continue to receive the predictions (sometime UP & sometime Down) and Market follows the prediction magic. Fifth & Sixth week you are tempted to play based on newsletter prediction. At the end of Sixth week after six successful predictions, newsletter requests for subscription payment. Will you subscribe???

Here is the sample Scam. The newsletter publisher sends out 64,000 newsletters (emails/whatsapp/…), with prediction of Nift50 going UP in 32,000 letters and DOWN in other 32,000 letters. No matter what happens next week, his prediction is correct to 32,000 recipients. To ONLY these recipients he sends the next set of prediction, where 16,000 recipients get the prediction of Nift50 moving UP next week and other 16,000 the Down. Irrespective of what happens, 16,000 have received the correct prediction for two consecutive weeks. Out of that group, 8000 will receive Nifty50 UP prediction for the third week and Others Nifty50 Down prediction. This continues for Six weeks and their will be 1000 recipients with straight correct predictions for SIX weeks. If subscription fee is Rs 10K and even half of them adopt to the subscription, he ends up with half a Crore.

1 Like

I had already posted this query on another post.
But couldnt help posting it here again as this topic related maths and stats is more relevant to my query…

I have a very basic query regarding the CAGR returns shown by mutual funds or stock returns shown on screener by different stocks.
Normally an Investor

  1. Invest at different points of time in mutual funds and shares. May be when he gets a salary or some profits or some bonus at any point of time whenever he gets money.
  2. He holds such investments for different time periods , depending on his personal reasons and needs,
  3. He can withdraw partially or fully at different time periods , may be regularly or even irregularly as and when reuired.

now when we see CAGR returns of mutual funds or CAGR returns of stocks on screener , these returns doesnot incorporate such inflows and outflows of funds.
Even XIRR returns of mutual funds may be pertinent to their own purchase and redemption of cashflow of that particular AMC. Their XIRR will also not reflect the XIRR return of individual investors with his own cash inflow and ouflow.
So when an Investor at year end or at particular time period sits and calculate his own XIRR, taking into consideration his own cash inflow and outflow…Then how can he compare his individual XIRR with that of any Fund’s CAGR or XIRR? or how it is comparable to particular stock CAGR?
And if these things are not comparable then how an investor can reach a conclusion whether he is doing better or worse compared to particular funds?
because if such comparison is not practically possible then there is no way to know whether such hardwork of picking stocks and such study is really worthwhile or not from Returns point of view. ( I am not talking of knowledge gained and happiness derived from such research activities).
i am clearly talking from point of view of returns and comparing it with other alternative arrangements to know if we are doing better job than them…so we can keep doing it

1 Like

You have brought up an important point.

The returns can be calculated in two ways (i.e)
Time-weighted (TWRR) and
Money-weighted rates of return (MWRR)

"The main difference between TWRR and MWRR are the effects of cash flow. As we discussed earlier, TWRR does not take cash flow into consideration, while MWRR does take cash flow into consideration when calculating your rate of return. "

Source : Comparing Time-Weighted Versus Money-Weighted Rates of Return | CIBC

Book reco : Investment Performance Measurement: 105 (Frank J. Fabozzi Series)

Hope this is of help !

3 Likes

Thanks @Mudit.Kushalvardhan for bringing this excellent question. I am reading this on other thread as well. There are statistical calculations and I think @Navin_J & @ChaitanyaC have covered possible solutions & pointers on number crunching, I agree with them.

But, your point around : “i am clearly talking from point of view of returns and comparing it with other alternative arrangements to know if we are doing better job than them…so we can keep doing it” is very difficult one.

There was an interesting observation from @Chandragupta where he says: “Note that even the performances of two fund managers may not be exactly comparable” I would like to emphasize on this point more not because of individual capability/skill but because of the nature of markets.

For me personally, making X% more than Nifty50 is a satisfying performance & X% less than Nift50 is a learning factor and even this may not be right process. I think, this is because of unknown luck factor. Shortly, I would like to present next model skill vs luck around this scenario.

2 Likes

M5: Skill vs Luck

Two friends, A & B, with equal capability, starts the investment journey together with exact same amount. End of every week/month/year they crosscheck their accumulated gain/loss till date, that decides the winner & looser (???). In the journey of making money, what do you think, will they move together or most of the time one will dominate other? Note that, they have equal capability.

Try it out yourself, Toss the coin and if Head, A gets a point else B. Accumulated point decides the winner after every toss.

Trial 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Toss H T T H T H H H T T H H T H T T
Points A 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0
Cum. Points-A 1 1 1 2 2 3 4 5 5 5 6 7 7 8 8 8
Points B 0 1 1 0 1 0 0 0 1 1 0 0 1 0 1 1
Cum. Points-B 0 1 2 2 3 3 3 3 4 5 5 5 6 6 7 8
Winner A - B - B - A A A - A A A A A -

Try the whole process yourself with a much bigger sample and see how things move over a period of time. In this sample: Out of 16 Trials, A wins 9 times compared to B’s 2 wins (5 times they are equal).

Though both have equal probability to win each toss, over a period played sequentially, One getting the upper hand over the other is quite high. Doesn’t this kick in our emotions??? Doesn’t Jealousy, Ego, Frustrations starts playing in mind?

Have we not faced the same by comparing our portfolio with others? Why others, with Index funds? Are they comparable???

Do you think Capability alone decides Winners? Is it Skill v/s Luck OR Skill & Luck that is deciding our faith in investment Journey?

5 Likes

Nice example. It shows how those who get a head start early on continue to remain ahead over a long period of time. The initial advantage then compounds over a period of time and widens the gap between the leader and others. This has been brilliantly described in Malcolm Gladwell’s ‘The Outliers’. And the initial success may just be Luck. The concept of Luck Vs Skill has been beautifully covered in ‘The Success Equation’ by Michael Mauboussin. All of this, worth reading – to understand how the world works.

4 Likes

The sequence of hits and misses matters a lot, not just the probability of success over the evaluation period. This is where chaos theory ties in beautifully to probability.

Consider 2 VC funds that each make 10 investments -
Fund 1 gets the first 4 bets right, the next 5 wrong and the last one right
Fund 2 gets 4 of its first 5 bets wrong but makes up for the probability later

In theory they should both end up with similar 10 year track records. But in practice fund 1 will have an easier time attracting better deal pipeline, more attention and gets committed capital from LP’s on time. This enables them to bet on the best deals in their pipeline

Fund 2 will have a tough time getting good deal flow, it may so happen that LP’s may lose faith before they allocate the fully committed amount. The fund might miss out on investing into a great opportunity for this reason.

Emotionally too it is much easier to keep the faith if you’ve had a good start. Look at the world of tennis - those who end up winning their first grand slam within their first 2 finals usually goes onto win many more grand slams. Those who get beaten in 3-4 finals before they win their first slam usually end up with less than 5 slams in their career, given the same level of talent.

8 Likes

Thanks @zygo23554, for highlighting the sequence in the process.

I also think, the game of the stock market is quite different from gambling or even sports. In these discreet games, there is a start and stop. Limited number of people gather together, with set the rules, play the game. Decide the winners and losers. Start and End is fixed. Player is a significant part of the game.

On the contrary, stock market is a continuous process. Game is ON all the time. Though we cannot play few hours, but for sure the information, demand & supply dynamics are active all the time and impact the price next day morning. So, there is no start and stop for the game. Markets where there before our birth and bring in visibly endless game. Player can only choose his time to enter & exit. So, Each player chooses his own time-frame. Any one player is NOT a significant part of the game as well. With lot of moving parts, Luck takes its share significantly making comparison between funds a question-mark.

1 Like

If M5 simulation, were replaced by 5% of one’s current portfolio, the players reactions will be different. 5% representing one stock selection, there by 20 stocks of a diversified portfolio. The simulation may not be carried out in real-life after a couple of rounds. Also if the same player is asked to repeat the situation at the age of, say 20s, versus age of 50s, the outcome will be different. Risk Tolerance v Risk Capacity is different.

Prospect theory plays a major role. Big investors are able to take outlandish positions, based on their wealth in hand.

Unfortunately stats with smaller-numbers does not correlate with laws-of-larger-numbers. Frequency based statistics are useful for ‘regular’ playing field, like heights of humans etc. Irrational fields require probabilistic calculations based on Bayes’ theorem and self-updating models.


For another question of ‘what to compare performance (XIRR) against?’; there is nothing definitive in one view.
Real_Return = Nominal_Return - Inflation is perhaps a satisfactory measure. If R_R > Average Market Returns (Nifty 500, not 50), then one can be happy.