Sunday Weekly #32

SUNDAY WEEKLY #32

Hello EveryFinions !

 

Did you hear about the Facebook outage this week? The whole world came to a standstill, No? Well, not really 😉 Life went on. We gathered en masse on Twitter instead. Twitter's twitter handle tweeted, "hello literally everyone". Pretty clever. Life existed before Facebook, life will exist after Facebook.

 

But it certainly was a slight nuisance not being able to communicate. Now imagine a massive power outage instead? Or an outage of cooking gas? Would that only be a slight nuisance? A massive inconvenience? Perhaps a matter of life and death for some? It could just happen this winter owing to the major energy crisis we are witnessing across the world today. Are we getting ready?

IN THIS WEEK'S NEWSLETTER

  • News in brief
  • In less than 200 words - The looming energy crisis

  • Game : Price is right
  • Cover Story - When Vipul Mathur buys HUL stocks, you buy it too
  • In case you missed it - The idiosyncracies that keep us poor
  • Soundbites, In crypto news, Thought for the day
  • Read/Watch/Listen

NEWS IN BRIEF

  • Natural gas prices dropped by 15% this week following Russia’s conditional assurance to Europe that it will pump more. Natural gas prices have been on an uptrend following severe shortages in Europe and hit their highest level recently since August 2008!

  • Softbank backed Oyo filed for $1.1 Bn IPO in India earlier this week. The company’s filing said that it is spread across 35 countries and had over 157,000 storefronts. Total income for the year ended March 2021 fell 69% and its losses to income ratio was nearly 1 (meaning the business made a loss of Rs.1 on every Rs.1 in sales). Pretty frightening! Oh, but it is a $1.9 Trillion opportunity, alright!

  • After over 3 decades of development and testing, the world’s first Malaria vaccine for young children is here! The WHO recommended the widespread deployment of the vaccine in sub-Saharan Africa. The vaccine was developed by the British pharmaceutical major Glaxosmithkline. WHO director Dr.Tedros said, “I longed for the day that we would have an effective vaccine against this ancient and terrible disease. Today is that day. A historic day.” India’s Bharat Biotech will be making that vaccine from 2028.

  • The RBI, in a further push on digital transactions, increased the limit on IMPS transfers to Rs.5 Lakhs from Rs.2 Lakhs. In addition, the central bank also proposed to introduce a framework for retail digital payments in offline mode across the country.

IN LESS THAN 200 WORDS

The looming energy crisis

You may not have noticed, although it is just about everywhere in the news, there is an energy crisis in the works and it is apparently going to hit us very, very hard this winter. There is a shortage of everything from natural gas to coal. Not trying to get you to panic, but just look at the LNG price chart below in Asia. We have never seen prices as high as these!

This shortage of LNG for electricity production has sent countries looking for substitutes, especially coal. And consequently, the price of coal is going up too . This chart below shows the price of coal traded in Hong Kong exchange. Pretty bleak!

A combination of drop in energy production from renewable sources, an unexpected increase in demand, slow catch up of supply has all led to a massive worldwide shortage of energy. Nikkei Asia reported this week that India nears widespread power crunch on coal shortage. Wall Street journal reported the scramble for natural gas ahead of the winter in Europe. Bloomberg reported that China’s energy crisis is hitting everything from iPhones to milk production. Blackouts in China have already hit over 20 provinces and is slowing down economic revival.

 

This is leading to a rethink in terms of how governments plan a transition from traditional fossil fuel-based energy sources to renewables. More importantly, it is going to have repercussions on the economic recovery front as countries across the world are limping back to normalcy. Price inflation at this stage is a definite given, and not a may-be. Equity markets, bond markets will start pricing these risks in over the coming months. The volatility we witnessed over the last few weeks is probably just the beginning.

 

But even more crucially, how are we going to keep the lights on and stay warm this winter?

GAME: PRICE IS RIGHT

This is the new Mahindra XUV 700 luxury edition AX7. It opened for pre-booking on Thursday this week and within the first 57 minutes of launch, the car received 25,000 bookings – A full 6 months’ worth of production. The company said that this is an “unprecedented milestone in the Indian automotive industry” and it most certainly is given that the XUV700 is the first car in the country to get such an overwhelming response. Your job now, is to guess its price!

COVER STORY

When Vipul Mathur buys HUL stocks, you buy it too

Vipul Mathur is the VP at Hindustan Unilever Limited in the Fabric Care division. He has been working for HUL for about 19 years now. An IIT-M & IIM-C graduate, he went straight from B-School to HUL and joined the company as a trainee. And that was 19 years ago. HUL is the only company he has ever worked for and probably knows about far more than any other investment guru/equity analyst/investment strategist. When a man like him buys stocks in HUL, you buy it too. No questions asked. Vipul bought Rs.50 Lakhs worth of HUL shares in an open market purchase 4 weeks back.

 

In a world where there is tremendous fan following for stock pickers and investment strategists, there just aren't enough followers of corporate insiders who are pretty good at timing stock purchases. We develop an algo-trading strategy to exploit the hypothesis that positive alpha can be generated 3-, 6-, and 12- months post large buy transactions by corporate insiders by piggy backing on them.

IN CASE YOU MISSED IT

The idiosyncracies that keep us poor

Renowned British economist John Maynard Keynes introduced the idea of the ‘Beauty Contest’game likening it to investing in the stock market. Here are the rules of the ‘beauty contest’ game.

 

People are shown photographs of 100 people and are asked to choose 6 photographs from the lot. The winner is the person whose selection of photos is the most popular across all contestants. In the words of Keynes himself, “prize is awarded to the competitor whose choice most nearly corresponds to the average preference of the competitors.”

 

So the task, in the minds of the competitors, is not one of choosing the prettiest people. It is not even one of choosing the photos of those faces that other people may find pretty. But it is one of choosing those photos that other people think will be the most popular – This is third-degree anticipation.

 

A lot of stock market investors have reduced the problem of investing to precisely this – Instead of spending their time and energy in finding good businesses, they devote intelligence in unearthing stocks that other people may think are good investment ideas.

 

SOUNDBITES

That's what they said

  • ARK is not a traditional Wall Street asset management firm and we are looking forward to breaking the mold further by relocating to St. Petersburg, a city investing in technology, science, and innovation ,” Cathy Wood in a statement after announcing that her firm will relocate to Florida from New York.

  • Windows 11 marks the start of a new generation of Windows, making it easier for anyone to dream big and turn their ideas into reality. We can’t wait to see what you create. ” – Satya Nadella, Microsoft’s chief on Twitter following the release of the company’s latest OS update.

  • " The new pathways we build together with SEI will offer Indian customers greater convenience and choices within their own neighborhoods. " – Isha Ambani after signing a franchise agreement to launch India’s first 7-Eleven store. Why are they called 7-Eleven anyway? Clue : Something to do with their opening hours 🙂

IN CRYPTO NEWS

  • The newly ‘invented’ Shiba Inu, a cryptocurrency that started just last year was up about 200%+ this week following Elon Musk’s tweet about his dog. Elon’s dog is a Japanese Shibu Inu breed. Bonkers, I know!

  • The US justice department is launching a national cryptocurrency enforcement team to deal with cryptocurrency related crimes and recover illicit proceeds from these crimes. Now that sounds more sensible than an outright ban, doesn’t it? China, you there ?

ANSWER TO PRICE IS RIGHT

Rs.20.29 Lakhs

Is the take home price of the all new Mahindra XUV700 AX7 luxury edition. The newer model will replace the older XUV500 and has received a staggering 260,000 inquiries ever since it was announced. M&M certainly know a thing or two about making SUVs for the Indian market.

THOUGHT FOR THE DAY

A great company isn't a great investment

READ/WATCH/LISTEN

  • A short but interesting read on what happened in Enron, one of the largest accounting and financial fraud in living memory. Investopedia  
  • UK based web only neo-bank, Monzo, withdrew its US banking license application in yet another testimony of why ‘ all that glitters isn’t gold ’. – Financial Times 

Share with friends and family

 

From the writer in me, to the reader in you  

 

Follow us on instagram here .

 

© EveryFin.in, 2021, All rights reserved. You are receiving this e-mail because you subscribed to the weekly Sunday newsletter at everyfin.in. To unsubscribe, click here

 

Disclaimer : All content published on this newsletter or on any other post on everyfin.in are meant to be for information & education purposes only. It is not intended to be investment advice or a solicitation to buy or sell securities. Please do your own due diligence or consult with your financial advisor before making any investment decision. While the information published on everyfin.in and the newsletters are obtained from reliable sources, neither the author, the publisher nor any of their affiliates guarantee the accuracy or completeness of any such information.

When Vipul Mathur buys HUL stocks, you buy it too

Vipul Mathur is the VP at Hindustan Unilever Limited in the Fabric Care division. He has been working for HUL for about 19 years now. An IIT-M & IIM-C graduate, he went straight from B-School to HUL and joined the company as a trainee. And that was 19 years ago. HUL is the only company he has ever worked for and probably knows about far more than any other investment guru/equity analyst/investment strategist. When a man like him buys stocks in HUL, you buy it too. No questions asked. Vipul bought Rs.50 Lakhs worth of HUL shares in an open market purchase 3 weeks back.

The pervasiveness of insider trading

Bloomberg carried an article this week on the pervasiveness of insider trading. The report captures a sense that markets in the real world are biased in favour of the corporate elite class. For instance, Sneha Patel, the CEO at Greenwich Lifesciences Inc., made five purchases of her company’s stocks and has earned an average return of 488% on them. Four of those trades preceded the announcement of promising results from a cancer drug trial, the details of which were apparently published on their website beforehand.

Their report also reveals a large fan-following of such successful corporate insider stock traders in the US. In India however, a lot of fan-following is restricted to people like Dolly Khanna or Rakesh Jhunjhunwala. It is rather unclear to me why there isn’t a fan following for Vikram Somany (who bought stocks in Cera Sanitaryware, where he is the MD and Exec Chairman, on 13 occasions and earned an average excess return of 112% over the BSE midcap index after 1 year) or V P Nandakumar (who bought stocks in Manappuram Finance, where he is the CEO, on 25 occasions and made positive excess returns over the midcap index on 16 occasions. He earned an average excess of 92% over the index, 1 year after purchase). My premise is not that these trades are motivated by their access to non-public material information, which would be illegal. But it is that these executives know much more about their businesses than anybody else. And if they are ready and willing to fork out money from their personal savings to buy a meaningful quantity of stocks in the open market, it is a very clear message about the strength of the business. The phrase ‘a big meaningful quantity’ is quite important because some just buy small token amounts to signal their confidence to the market. And you shouldn’t take their word for it. A big meaningful purchase on the other hand makes the message crystal clear. And on those occasions, you should take their lead.

Taking cues from insider trading

At EveryFin, we are in the process of developing a quantitative heuristic-based trading algorithm. And one of the signals that our trading model relies on is the vast repository of insider trading information from BSE/NSE. We did an analysis recently to show you how significant these returns are over 3-, 6-, and 12-months periods.

First, we collected all insider trading information for the top 500 stocks listed in BSE over the last 15 years. Then, we separated the insider purchases into 4 quartiles for each firm. For instance, if promoters have made 4 purchases of 100, 75, 50, and 25 stocks respectively of a particular stock, these trades will get categorised as Top, Lower Top, Uppter Bottom, and Bottom quartiles. We tracked the returns post their purchase date over the next 3-, 6-, and 12-months period to see if the excess returns are statistically significant. We also checked how different the returns are across the four quartiles. The results are below.

Here is a chart showing the average excess return over the midcap index following purchases by insiders.

Stunningly, ALL excess return figures over ALL quartiles over ALL time periods are positive. And at 90% confidence levels, they are more than 0%! That is evidence enough, statistically speaking to believe in the hypothesis that trades following insider trades are expected to deliver positive excess returns. Average excess returns were a full 30% 12 months after purchase in the top quartile of all purchases – in other words, the biggest purchases returned the highest excess returns over the first one-year period.

Median excess returns were also positive and significant. Look at this chart below.

Here is a look at the distribution of excess returns over the three time horizons we examined.

All the three charts overlayed here are decidedly non-normal. The skewness and excess kurtosis factors for the 12-month excess return are 5 and 49 respectively! They are positively skewed with a very long tail on the right. And that is good! This box plot below shows the same trend.

Negative returns are of course bounded by -100% at the bottom. But look at the number of excess returns that are far about the 3X standard deviation mark! Many of the purchases by corporate insiders have extremely handsomely rewarded them over 6 and 12 months past purchase date. The highest goes up to 8X in 12 months!

The probability of making a positive excess return over the index 12 months after a corporate insider makes a big buy transaction (falling in the top quartile) is a stunning 71%!

Making a buck or two - Piggy backing corporate insider traders

How do we use this information to make a buck or two? Well, we can evaluate all insider trading information and buy as soon as we observe a big trade. The expected excess returns over the next 12 months are close to 30%.

But which companies do we go after? All the 500? That’d be a lot of work. It can be without the right technological intervention and that is what we have fixed at EveryFin. Our automated trading system checks for insider transactions and runs this analysis regularly to suggest possible trades. For instance, our current (September 2021 Vintage) insider trading portfolio recommends the following stocks. The company names except HUL have been crossed-out to resist your temptations 😉 We are still in early days.

There is more – some insiders are more successful at trading their companies’ stocks than others are. For instance, The Yamuna Syndicate, Prakash M Patil, Summit Securities Ltd., and Comprehensive Investment & Finance Company Pvt Ltd are examples of promoters who have an excellent track record of timing their stock purchases. And our trading model knows that when one of these insiders buys their stocks, we should sit down and listen to them far more than some others. As a matter of fact, our system has identified 38 corporate insiders like these who it tracks regularly. Our belief is that a stock portfolio built on the foundations of this principle, adequately weighted by the investor’s prior record, is bound to produce positive alpha. Our backtest results are positive and the model is currently live trading. We will post results in a few months’ time! Till then, stay tuned!

Other articles on algo-trading you may be interested in:

Using artificial intelligence in portfolio allocation

A simple application of statistical arbitrage – Mean reversion strategy

Disclosure: I hold stock positions in some of the companies discussed in this post and hence my views may be biased. No part of this article should be considered investment advice. Please do your own due diligence or consult your financial advisor before making an investment.

The idiosyncrasies that keep us poor

Renowned British economist John Maynard Keynes introduced the idea of the ‘Beauty Contest’game likening it to investing in the stock market. Here are the rules of the ‘beauty contest’ game.

 People are shown photographs of 100 people and are asked to choose 6 photographs from the lot. The winner is the person whose selection of photos is the most popular across all contestants. In the words of Keynes himself, “prize is awarded to the competitor whose choice most nearly corresponds to the average preference of the competitors.”

So the task, in the minds of the competitors, is not one of choosing the prettiest people. It is not even one of choosing the photos of those faces that other people may find pretty. But it is one of choosing those photos that other people think will be the most popular – This is third-degree anticipation.

A lot of stock market investors have reduced the problem of investing to precisely this – Instead of spending their time and energy in finding good businesses, they devote intelligence in unearthing stocks that other people may think are good investment ideas. In some cases, this may work! If we’d picked up Gamestop before the massive rally, we would have made a lot of money. The downside though is that such investors lack the conviction to hold these stocks for the long term – which is when money is really made.

Setting that aside, can we really anticipate the average public opinion about stocks? Is this even possible?

Consider a variant of the game played in lab experiments. Say, 100 people are invited to a lab and asked to choose a number between 0 and 100. The winner is the person whose selection is closest to one-half of the average of all numbers submitted. Now, I am sure you figured it out that there is no point submitting a number over 50. And you’d be quite right – if everybody chose 100, the average would be 100 and the winning number would be 50 (one-half of 100).

 Now, what if other people are just as intelligent as you are? They will all end up choosing 50. If that happens, then the average of all choices will be 50 and the winning number will be 25 (one-half of 50).

 Now, what if everybody realised this and chose 25? The winning number will be 12.5! You see where I am going with this…

 If you recursively moved down, you will realise that the correct answer to this problem is for everyone to choose 0. The average pick will be 0 and one half of 0, the winning number, is also 0.

 In an empirical study with a setting just like this, you’d expect that people will all choose 0. The answer however is far from it! In a lab study, the average pick was 40! And what does that prove? – that there are limitations to rational thinking. The average public opinion does not always have to be rational. And therein lies the problem of trying to anticipate what popular opinion is about a stock. It may not be rational. In the long term, the market does not reward irrationality. It rewards good businesses.

 So, stop reading this, and go pick some good businesses to invest in 🙂

Sunday Weekly #31

Using Artificial Intelligence in portfolio allocation

The term Artificial Intelligence is often misused and abused. What exactly artificial intelligence is, could just as well be a topic of an entire PhD thesis and you’d still not have a conclusion to it. For our purposes, however, let us specify Artificial Intelligence as a machine-driven decision-making system. Now, an important distinction must be made at this point between making decisions and making forecasts.

It might rain tomorrow, is a forecast.

I will take an umbrella to work tomorrow, is a decision.

In finance, time-series-based forecasting models are extensively used to predict stock price returns, option values amongst others. These models are extremely difficult to develop and train because of a major statistical problem called non-stationarity. A data series such as stock returns of an index is often non-stationarity because the mean (return) and standard deviation (of the return) are not constant over a period. This is a rather frustrating problem for model developers because every model successfully developed and launched comes with an unknown expiry date.

Decision-making models however can adapt to the problem of non-stationarity. And one such is the popularly known reinforcement learning or q-learning technique. Reinforcement learning is essentially training an agent to make decisions in different ‘states’ based on the available action-set. The agent is given a reward for making a good decision or a penalty for making a bad decision. As the agent is trained over and over and over on all the possible states confronted with all the available actions, its decision-making ability improves with the acquired memory of the rewards. Much the same way as us humans learn from our mistakes and become wiser as we get older (at least that’s what I am told :)).

We developed a learning algorithm to train our agent, Meeta, and to get her to answer the popular question of how much to invest in stocks. We introduced Meeta in one of our earlier posts. If you haven’t read that, check it out here. Here is what we told her.

  • Equity market returns are centred around 12% (mean) with a standard deviation of 20% and follow the Cauchy Distribution. Note: Don’t worry if you don’t know the properties of Cauchy distribution. The important thing to remember is that we are telling Meeta that on average stock returns are 12% per annum AND 80% of the time, the returns are between -48% and +72% per annum.

  • Fixed deposit returns are 5% per annum.

  • Our goal is to have Rs.100 in X number of years. We will vary the value of X between 1 year and 15 years. Our baseline, the minimum must-have in our account at the end of this period, is Rs.80.

  • Our starting capital is between Rs.1 and Rs.99. We will let this vary as well.

  • Meeta’s job now is to tell us, in each of these ‘states’ denoted by (Amount of capital already available, Number of years available), what % of our wealth should go into stocks.

  • An example question is – Meeta, I have Rs.55 in wealth now. I would like to have Rs.100 in 5 years. If fixed deposits return 5% per annum and if stock returns have a mean of 12% per annum and a standard deviation of 20%, what % of my wealth should I invest in stocks? And what % in fixed deposits?

  • Meeta gives us an answer. We follow that investment strategy through and check how much wealth we have at the end of X years (or 5 years in the above example).

    • If at the end of it, we have Rs.100 or more, we give Meeta +50 points. Good job!

    • If we have between Rs.80 (our baseline) and Rs.100, we give Meeta 0 points.

    • If we have anything less than Rs.80, we penalise her. The penalty starts at -0.125 points for an ending wealth of Rs.79 and goes linearly down to -50 points for a final wealth of Rs.0.

We play this game over and over and over with her to let her figure out what the best strategy is. And the results, are super-interesting.

Meeta, I have 1 year left - Tell me what to do?

Say we tell Meeta that we only have 1 year left to achieve our goal.

Observe the chart on the left side first – That chart shows Meeta’s recommendation of the optimum % allocation to equities for different starting wealth. There are a few very interesting things it is telling us.

  • Number one – You see it flatlining at 0 at the end of the curve? It is Meeta’s way of telling us, that if our starting wealth is over Rs.94, to just get fixed deposits – “you’ll have your 100 bucks and I will have my 50 points”! But I suspect you already knew that!

  • Number two – You see that same curve flatlining at 0 around that Rs.80 mark? That is Meeta saying, “If your starting wealth is around Rs.80, don’t bother with investing in stocks. It is too difficult to get to Rs.100 by the end of the year. No point in taking any risk and going below your baseline. So, stick to fixed deposits”. Interesting, isn’t it?

  • Number three – Notice how the curve ramps up from 0 to 100% at the beginning and stays there? If our starting wealth is anything less than say Rs.50, Meeta says, we should put everything in the stock market. That sounds nuts – If we only have 1 year left, considering anything can happen in the stock market, why put 100% into stocks if our starting wealth is already a measly 50 bucks? That’s because of what is happening on the chart on the right – the reward function for Meeta. Meeta’s reward in points is negative for most values less than Rs.80. Meeta’s desired state is to be at the goal of Rs.100 where she gets the most points. That’s her plan A. She is however OK to take 0 points by getting us to Rs.80 – that is plan B. Bear in mind, at a starting wealth of Rs.76 she is assured of non-negative points because she can tell us to invest it all on fixed deposits and walk away with our baseline of Rs.80. But she is deeply unhappy about being on the lower left-hand side of the curve. Consequently, she is trying to rush to the top right of the curve as quickly as possible. And the only way to get there is to invest aggressively in stocks.

  • If you think about it, this is quite intuitive. We want to have Rs.100 at the end of the year. If not 100, at the very least, Rs.80. Anything else is undesirable. Given that, and a starting wealth of Rs.50, our best chance of getting into one of these regions is to aggressively pump money into the stock market. Kapisch? Moving on.

Meeta, I have 15 years left - Tell me what to do?

Once again, let us focus on what is going on the left chart which is Meeta’s recommendation of the optimum % allocation to equities for different starting wealth. It looks rather curious. Can you decipher the message?

  • There are 3 kinks on the curve. The first one is a drop from 100% allocation to equities to about 40% at a starting wealth of about Rs.30 (that steep drop). This happens because, at a starting wealth of Rs.30, the impact from losing money and going bust (to Rs.0) by putting it all on stocks is too high compared to the opportunity of making money and moving right to higher levels of wealth. Imagine you are climbing a steep mountain. In the early stages, the impact from the fall is going to be small. So, you can be aggressive. But as you climb and get to somewhere near the midpoint, the impact of a fall will be much more. So, you’ll have to be extra careful. That is what is happening here – Meeta becomes more conservative.

  • Curiously, however, it climbs up again. This is because Meeta starts getting greedy looking at the possibility of getting to basecamp 1 (Rs.80) which becomes more and more likely with higher & higher starting wealth.

  • The second kink is the drop from about 50% allocation to close to 0% allocation at a starting wealth of Rs.40. This is straightforward – With a starting wealth of Rs.40, it is quite easy to get to Rs.80 by simply putting it all on fixed deposits and leaving it be for 15 years. Remember, Meeta likes 0 points more than negative points. So, our allocation goes all the way down.

  • The third and final kink, the smallest of it all, is the increase in equity allocation from nearly zero to about 10% at a starting wealth of Rs.45. Can you think about why this is? This is because, with Rs.45 as starting wealth, the probability of getting to Rs.100 by investing some money in equities is higher than the probability of losing money and going below Rs.80. All of Rs.45 invested in fixed deposits for 15 years will get us to Rs.94. So, we only need a little bit extra to get to Rs.100 and Meeta says, “just about 10% into stocks should do the trick”.

Every other scenario

Any other scenario in terms of time frame from 2 years to 14 years is in between these two boundary cases. Here are some of the other charts.

There are other subtleties in this. Here are some questions to ponder about.

  • Notice how the starting wealth at which we go from zero to all-in to stocks keeps increasing as the time frame increases. Why do you think that is?
  • Compare Meeta’s Reward Function when there is 1 year left compared to when there are 15 years left. Notice its transition to a rather smooth curve? What do you think this implies to how she makes decisions?

What does this mean for your investment strategy? Should you go all into equities and forget about fixed deposits? Should you go all into fixed deposits and forget about equities? Well, the answer is – it depends! How badly do you want to get to Rs.100 by the end of your time period? What is your absolute must-have minimum amount? Are you the kind of person who says some wealth is better than nothing? Or are you the kind of risk-taker who wants all or nothing? The answers to these questions decide whether or not you take the recommended allocations from these charts above.

But of one thing you can be sure – The application of reinforcement learning to the problems of traditional finance is an absolutely exciting field. We will cover more of it in future cover stories. Stay tuned!

P.S: The code to run this algorithm is on Github. You can access it here.

P.P.S: To a very large extent, I have hidden the mathematics behind the approach. It requires an understanding of Bellman equation and dynamic programing – none of which are essential to interpret & reflect on the results. If you are keen to know more, drop me a note.

Sunday Weekly #30

A simple application of statistical arbitrage – Mean Reversion Strategy

Statistical arbitrage is a family of trading strategies that exploit arbitrage opportunities to generate alpha. What is arbitrage, you ask? Well, in simplest terms, arbitrage is free money. If you can generate a dollar of profit without risking your own cash nor taking any market risk, that dollar earned is due to arbitrage. Theoretical finance asserts that nobody can make a dollar like that. Practitioners tend to disagree.

A very simple application of statistical arbitrage is the mean reversion strategy. In this application of statistical arbitrage, we adopt a market-neutral trading strategy of going long one stock while going short the other. The equity pair is typically selected based on the correlation of their monthly returns.

For instance, given that HDFC Bank and Kotak Bank are large, private banks with a good financial track record, we would expect that their fundamentals will grow in tandem, and consequently, the return on their stocks will have a high positive correlation.

Given such a pair, any short-term divergence observed in their stock returns can be expected to be quickly corrected. So, if the price of HDFC bank runs up too quickly, then we would expect that it would either correct or that the price of Kotak bank will catch up to it. In such an instance, we go long Kotak bank and short HDFC bank. When we have a sufficiently large portfolio of similar equity pairs, given similar betas (market exposure) of those equity pairs, the trade & portfolio itself is expected to be market neutral (no risk).

Such market-neutral strategies are benchmarked against cash equivalent asset classes (fixed deposits, bonds, and the likes). The accepted hypothesis is that this statistical arbitrage trade based on mean reversion will outperform cash equivalent asset classes over the long term.

So, we set out to test it.

Statistical Arbitrage - An empirical application

We use python for the task, since it is a lot easier to work on large datasets. We first extract daily pricing data for both HDFC and Kotak bank from yfinance Python library. We compute the daily returns data and plot them in a graph, as below. The daily returns of HDFC bank and Kotak bank for the period 2015-2021 are indeed strongly positively correlated as can be seen in the image below.

Monthly returns as plotted below shows the trend even more clearly.

Statistical Arbitrage - RESULTS

A long-only strategy of holding the underperforming stock each month with a starting wealth of Rs.10,000 at the beginning of 2015 results in a portfolio value of Rs.24,450 at the end of the trading period. This strategy does better than the buy and hold strategy for both HDFC bank (ending wealth of Rs.15,097) and Kotak Bank (ending wealth of Rs.13,498).

A long-short market neutral strategy, with the HDFC-Kotak Bank pairs, with a starting wealth of Rs.10,000 and a start date of January 2015 delivers a compounded annual return of 9.1%. This compares well against the return on cash equivalent instruments of about 7.5% during the same period.

Varying the backtest start date from Jan 2015 to Jan 2010, Jan 2011, Jan 2012 and so on offers a different picture. The annual returns from earlier start dates are markedly worse than returns from later start dates. The full data is as below.

Concluding Remarks

Well, the results are a bit mixed looking at the final table above. However, the strategy has delivered positive returns on all start dates when a market-neutral trading strategy of going long one stock and going short the other was adopted. This is good. However, a trading system like this is only a short-term trading strategy is really ill-suited as a long-term money-making machine. We will have to expand our search to other equity pairs like HDFC/Kotak Bank and explore what a portfolio approach to exploiting statistical arbitrage would mean from a short-term trading perspective. And that is precisely what we will do next! Stay tuned.

Sunday Weekly #29