Understanding Stock Market Returns

Earlier today I had a short conversation on Twitter with financial markets guru Deepak Mohoni, one of whose claims to fame is that he coined the word “Sensex”. I was asking him of the rationale behind the markets going up 2% today and he said there was none.

While I’ve always “got it” that small movements in the stock market are basically noise, and even included in my lectures that it is futile to fine a “reason” behind every market behaviour (the worst being of the sort of “markets up 0.1% on global cues”), I had always considered a 2% intra-day move as a fairly significant move, and one that was unlikely to be “noise”.

In this context, Mohoni’s comment was fairly interesting. And then I realised that maybe I shouldn’t be looking at it as a 2% move (which is already one level superior to “Nifty up 162 points”), but put it in context of historical market returns. In other words, to understand whether this is indeed a spectacular move in the market, I should set it against earlier market moves of the same order of magnitude.

This is where it stops being a science and starts becoming an art. The first thing I did was to check the likelihood of a 2% upward move in the market this calendar year (a convenient look-back period). There has only been one such move this year – when the markets went up 2.6% on the 15th of January.

Then I looked back a longer period, all the way back to 2007. Suddenly, it seems like the likelihood of a 2% upward move in this time period is almost 8%! And from that perspective this move is no longer spectacular.

So maybe we should describe stock market moves as some kind of a probability, using a percentile? Something like “today’s stock market move was a top 1%ile  event” or “today’s market move was between 55th and 60th percentile, going by this year’s data”?

The problem there, however, is that market behaviour is different at different points in time. For example, check out how the volatility of the Nifty (as defined by a 100-day trailing standard deviation) has varied in the last few years:

Niftysd

As you can see, markets nowadays are very different from markets in 2009, or even in 2013-14. A 2% move today might be spectacular, but the same move in 2013-14 may not have been! So comparing absolute returns is also not a right metric – it needs to be set in context of how markets are behaving. A good way to do that is to normalise returns by 100-day trailing volatility (defined by standard deviation) (I know we are assuming normality here).

The 100-day trailing SD as of today is 0.96%, so today’s 2% move, which initially appears spectacular is actually a “2 sigma event”. In January 2009, on the other hand, where volatility was about 3.3% , today’s move would have been a 0.6 sigma event!

Based on this, I’m coming up with a hierarchy for sophistication in dealing with market movements.

  1. Absolute movement : “Sensex up 300 points today”.
  2. Returns: “Sensex up 2% today”
  3. Percentile score of absolute return: “Sensex up 3%. It’s a 99 %ile movement”
  4. Percentile score of relative return: “Sensex up 2-sigma. Never moved 2-sigma in last 100 days”

What do you think?

Where Uncertainty is the killer: Jakarta Traffic Edition

So I’m currently in Jakarta. I got here on Friday evening, though we decamped to Yogyakarta for the weekend, and saw Prambanan and Borobudur. The wife is doing her mid-MBA internship at a company here, and since it had been a while since I’d met her, I came to visit her.

And since it had been 73 whole days since the last time we’d met, she decided to surprise me by receiving me at the airport. Except that she waited three and a half hours at the airport for me. An hour and quarter of that can be blamed on my flight from Kuala Lumpur to Jakarta being late. The rest of the time she spent waiting can be attributed to Jakarta’s traffic. No, really.

Yesterday evening, as soon as we got back from Yogyakarta, we went to visit a friend. Since this is Jakarta, notorious for its traffic, we landed up at his house straight from the airport. To everyone’s surprise, we took just forty minutes to get there, landing up much earlier than expected in the process.

So I’ve described two situations above which involved getting to one’s destination much ahead of schedule, and attributed both of them to Jakarta’s notorious traffic. And I’m serious about that. I might be extrapolating based on two data points (taking into the prior that Jakarta’s traffic is notorious), but I think I have the diagnosis.

The problem with Jakarta’s traffic is its volatility. Slow-moving and “bad” traffic can be okay if it can be predictable. For example, if it takes between an hour and half to hour and three-quarters most of the time to get to a place, one can easily plan for the uncertainty without the risk of having to wait it out for too long. Jakarta’s problem is that its traffic is extremely volatile, and the amount of time taken to go from one place to the other has a massive variance.

Which leads to massive planning problems. So on Friday evening, the wife’s colleague told her to leave for the airport at 7 pm to receive me (I was scheduled to land at 10:45 pm). The driver said they were being too conservative, and suggested they leave for the airport at 8, expecting to reach by 10:30. As it happened, she reached the airport at 8:45, even before my flight was scheduled to take off from KL! And she had to endure a long wait anyways. And then my flight got further delayed.

That the variance of traffic can be so high means that people stop planning for the worst case (or 95% confidence case), since that results in a lot of time being wasted at the destination (like for my wife on Friday). And so they plan for a more optimistic case (say average case), and they end up being late. And blame the traffic. And the traffic becomes notorious!

So the culprit is not the absolute amount of time it takes (which is anyway high, since Jakarta is a massive sprawling city), but the uncertainty, which plays havoc with people’s planning and messes with their minds. Yet another case of randomness being the culprit!

And with Jakarta being such a massive city and personal automobile (two or four wheeled) being the transport of choice, the traffic network here is rather “complex” (complex as in complex systems), and that automatically leads to wild variability. Not sure what (apart from massive rapid public transport investment) can be done to ease this.

Pakistan, Swiss Franc and the costs of suppressing volatility

Back in 2008, during the CDO/MBS/Lehman/… induced financial crisis (and also a time of domestic political crisis in Pakistan since Musharraf had just resigned),  Pakistan set a funny rule – they ruled that stock prices could not fall below a particular limit. So there was no trading, since the crisis meant that no one wanted to buy shares at prevailing prices. And then after a long time the ban got lifted. And shares promptly fell. Check out the graph of the MSCI Index for Pakistan from that time here (from FT):

Check out the late 2008 period when shares were virtually flat. And then the fall after that

Sometime back, Switzerland decided that its Franc was appreciating too much and put a ceiling on its price by pegging it to the Euro. The Franc can be worth no more than five-sixth of a Euro, they decreed. And the Franc stayed flat, close to the limit. And then in a sudden move yesterday, following instability in the Eurozone which meant the Euro has been getting considerably weaker, the Swiss National Bank decided that continuing to maintain the peg was costly. And they pulled the plug on the peg (couldn’t resist the alliteration). The graph is here, snapped off Yahoo Finance (took screenshot since I couldn’t figure out how to embed it):

This graph shows the number of Euros per Swiss Franc. There was a floor of 1.2 till 14/1/15 which was suddenly removed on 15/1/15

I chose the 5-day chart since on any longer horizon yesterday’s drop was hardly visible. With time, once we have a longer time scale available, we will see that this graph will again start looking like the Pakistan graph.

Thanks to the sudden appreciation in the CHF,  there has been bloodbath in the markets. Some FX traders have gone down. Alpari has declared itself insolvent. Global Brokers NZ is closing down. US-based FX trader FXCM is in trouble. And there could be lots of trouble in Poland where people took home loans denominated in CHF (this might sound heartless but such utter stupidity – like taking a home loan in a foreign currency – deserves to be punished).

The broader point I’m trying to make here is a paraphrasing of the old adage “still waters run deep”. When something seems unusually quiet, either held in place unnaturally or even if there is no apparent force holding it in place unnaturally, it is usually a sign that when the floodgates open much will get washed away (apologies for the surfeit of metaphor in this paragraph). When you suppress “local volatility”, the suppressed entropy builds, and when there comes a time that it can be suppressed no more, it acts with such force that there will be much damage.

As Nassim Nicholas Taleb argues in the black swan (link to my paraphrasing of his argument), countries with short-term political instability such as Italy or India or Japan are much less likely to face any major political instability. On the other hand, countries like China, he argues, where small instability has been artificially held down, when instability hits, it will hit in a way that it will hurt real bad.

I’ll end this post with a page from Taleb’s first book Dynamic Hedging, which he tweeted earlier today (I haven’t read it but want to read it but haven’t been able to procure it). Read and enjoy:

 

Studs, fighters and spikes

In a blog post yesterday I talked about the marriage and dating markets and how people with spikes which can be evaluated either highly positively or highly negatively were more likely to get dates, while in the arranged marriage market, you were better off being a solid CMP (common minimum program).

The question is how this applies for jobs. Are you better off being a solid performer or if you are someone who has a quirky CV, with some features that can either be heavily positively or heavily negatively by some people. How will the market evaluate you, and which of them is more likely for finding you a job?

The answer lies in whether the job that you are applying for is predominantly stud or fighter (apologies to those to whom I mentioned I was retiring this framework – I find it way too useful to ditch). If it is a predominantly fighter job – one that requires a steady output and little creativity or volatility, you are better off having a solid CV – being a consistent 3 rather than having lots of 5s and 1s in your rating chart. When the job is inherently fighter, what they are looking for is consistent output, and what they don’t look for is the occasional 1 – a situation where you are likely to underperform for whatever reason. Fighter jobs don’t necessarily care for the occasional spike in the CV – for there is no use of being extraordinary for such jobs. Thus, you are better off being a consistent 3.

If it is a stud job, though, one where you are likely to show some occasional creativity, you are more likely to get hired if you have a few 5s and a few 1s rather than if you have all 3s. If the job requires creativity and volatility, what the employer wants to know is that you are occasionally capable of delivering a 5 – which is what they are essentially hiring you for. Knowing that people who are good at stud jobs have the occasional off day, employers of stud jobs are okay with someone with a few 1s, as long as they have 5s.

So whether you should be looking for a stud or a fighter job depends on what kind of a professional career that you’ve had so far – if you’ve had a volatile career with a few spikes and a few troughs, you are much better off applying for stud jobs. If you’ve been a steady consistent performer you are better suited for a fighter job!

Of course you need to remember that this ranking as a function of your volatility is valid only if you were to hold your “average rating” constant!

Why being on time is a wonderful thing

This post is NOT about Indigo airlines, though I do fly them fairly frequently (approximately once a month). It is about the general culture of timeliness, and how it can help all of us save time and money.

If you and I decide to meet at say, 1 pm tomorrow, what time are you likely to turn up? There are two factors to consider here – you don’t want to be too late since that will create a bad impression in my mind, and you wouldn’t want that. You don’t want to turn up too early, either, for you don’t want to end up waiting for me. So when you plan your travel to the place we are meeting, you will first estimate what time I’m likely to show up and then plan to turn up such that you’ll maximize the probability of turning up between the time I’m expected to show up and five minutes earlier.

Notice how this can change depending upon the culture of timeliness. If you and I know each other, and I know that you are a punctual person and vice versa, we will both make an attempt to time our travel so that we maximize our probability of being there before 1 pm (the appointed time). What if I think that you are perennially late? The problem here is that I need to not only shift the “mean” of when I want to get to the place, but the variance also changes!

Notice that in case I know you are habitually late, I’m unlikely to know precisely when you’re going to arrive. Say I estimate based on our past record that you might turn up any time between ten and twenty minutes after the appointed time. How will I now plan to arrive so that I arrive between five and zero minutes of the time when I expect you to arrive? My travel time to get to the place already creates one level of uncertainty and to that I need to add another level of uncertainty in terms of when you are expected to arrive! Thus, these two sources of variation end up adding up and I will either be late (in case I’m okay wtih that) or end up spending more time just waiting for you!

Essentially, because I know that I cannot precisely determine when you are likely to get there, I assume a variance of when you are likely to get there, and that variance will add to the variance of my travel time and thus I’ll have to give myself a larger buffer so that I need to be on time while not waiting for too long!

This is similar to what people in quantitative finance call “market price of risk”. Let me illustrate that again using travel time as an example. In case 1, travel time from my office to yours has a mean of 40 minutes and a variance of 10 minutes (let us assume it is normally distributed). In case 2, travel time from my office to yours has a mean of 40 minutes (same as above) but a variance of only 5 minutes. Let us assume I want to be on time for the meeting at least 97.5% of the time. What time should I leave in each case?

In the first case, the one sided 97.5% confidence interval for my travel time is 40 + 2 * 10 = 60 minutes, or I expect to take no more than 60 minutes 97.5% of the time. In the second case, however, it is only 50 (40  + 2 * 5) minutes! In the first case, if I want to ensure a 97.5% chance of being on time for our 1 pm meeting, I’ll need to leave my office at 12 noon, while in the second case I can leave a full ten minutes later!

You need to notice here is that in both cases, the average travel time is the same. The only thing that has changed is the variance. In the first case, because the variance of the travel time is larger, I need to leave earlier! Leaving ten minutes earlier is essentially the price I have to pay because of the larger variance!

Similarly, when there is a variance in my estimate of when you will arrive for the meeting, it adds to the variance of my travel time, and the total variance I need to consider for when I need to leave goes up! In other words, simply because there is a variance in when you will arrive for the meeting,  i will have to leave earlier to compensate for your variance!

What if we had a culture of being on time? Then, I would know that with a very high probability you would be there on time for the meeting, and that would reduce my overall variance, and make it easier for me to also be on time for the meeting!

Essentially, a culture of being on time can save time for both of us – simply because it eliminates the variability of when we will end up arriving for the meeting, and this saved time is reason enough to build a culture of punctuality.

Yet you have people who schedule back-to-back meetings that invariably cascade and ruin their reputations of being on time, and thus inconvenience themselves and their counterparties!

Stock market volatility spikes

The Indian stock markets have become especially volatile. Figure 1 shows the volatility of the Nifty in the last three years. As usual, we use a trailing 30-day quadratic variation as a measure of volatility. Don’t bother about the units of the y-axis, just look at the relative movement.

Source: Yahoo
Source: Yahoo

Notice that the volatility levels we have seen in the last month or so are unprecedented in the last three years. Let us take a closer look:

Source: Yahoo
Source: Yahoo

This gives us a better picture. Volatility was well under control till mid-August, when it started rising (since we use a 30-day trailing QV, this means that markets started getting choppy in mid-July). The volatility is now at an all-time high.

However, the official volatility index (India VIX) disagrees. According to this, volatility has actually dropped from its all-time high. The VIX also looks significantly choppy.

Source: NSE
Source: NSE

 

Perhaps this indicates some trading opportunity in options?

Rupee and dollar volatility of Nifty

Note: This is not a particularly policy related post; just an interesting chart I want to present here.

Out at capitalmind, Deepak Shenoy writes that measured in US Dollars, the NSE Nifty has actually lost 8% in the last 6 years, a period in which the rupee value of the Nifty has gone up by 36%. This is on account of the depreciation of the Indian Rupee against the US Dollar.

Now, it would be interesting to see the volatility of the index as measured in the two currencies. Does the volatility in the USD/INR exchange rate add to the volatility of the Nifty or does it subtract from it? (note that when you multiply two volatile indices, the resultant can be less volatile than either of the components, if the components move in opposite directions).

As you can see from the following graph, the two volatilities actually add up, meaning the dollar volatility of the Nifty has for most part been much higher than the rupee volatility! And to add that the dollar returns have also been lower than the rupee returns. Makes you wonder why FIIs are still invested in India.

Data source: Oanda and Yahoo Finance
Data source: Oanda and Yahoo Finance

(please disregard the absolute values on the graph. In order to make the graph, I index both nifty and the dollar value of nifty to 100 on the first day of the time series I had and appropriately scaled down both series. The point to notice here is that in most parts the red line (dollar volatility) is above the blue line (rupee volatility). As earlier, I use 30-day quadratic variation as a measure of volatility )

 

Free float and rupee volatility

Following a brief discussion on twitter with @deepakshenoy I’m wondering what’s preventing the RBI from making the rupee fully convertible. The usual argument for full convertibility is that it will make the exchange rates volatile. My argument is that exchange rates are already so volatile that the additional volatility that could stem out of a free float is marginal, and a small price to pay.

The wise men at RBI, though, might argue the precise opposite. They will claim that in terms of already high volatility they wouldn’t want to do anything that might add to volatility, however marginally. This is a constant battle I faced in my last job, of delta improvements. I would frequently argued that when something was already high, making it delta higher was not so bad. I would argue in terms of making systemic changes that would reduce drastically the already high number, rather than focusing on the deltas.

Coming back to the rupee, you can also imagine the wise men talking about some stuff about black money and hawala money and all that. The thing with making the rupee fully convertible would be that hawala would be fully legal now, and the illegal practice would cease to exist. And when something becomes legalized it comes back to the mainstream rather than remaining on the margins, and that is always a good thing.

Then you can expect some strategic affairs experts to bring some national sovereignty and national security argument there. There will be people who will talk about the increase in counterfeit money (since it’ll become easier to “smuggle” rupees into India then), and about how foreign governments might pose a threat to India’s security by manipulating the rupee (who says that threat doesn’t already exist?)!

I don’t know. I don’t find any of these anti-full-convertibility arguments compelling. If we do adopt full convertibility, though, we can at least pay Iran for the oil we get from them, and that might for all you know help tackle inflation. I don’t, however, expect the RBI to act on this.

The Trouble With Analyst Reports

The only time I watch CNBC is in the morning when I’m at the gym. For reasons not known to me, my floor in office lacks televisions (every other floor has them) and the last thing I want to do when I’m home is to watch TV, that too a business channel, hence the reservation for the gym. I don’t recollect what programme I was watching but there were some important looking people (they were in suits) talking and on the screen “Target 1200” flashed (TVs in my gym are muted).

Based on some past pattern recognition, I realized that the guy in the suit was peddling the said stock (he was a research analyst) and asking people to buy it. According to him, the stock price would reach 1200 (I have no clue what company this is and how much it trades for now). However, there were two important pieces of information he didn’t give me, because of which I’ll probably never take advice from him or someone else of his ilk.

Firstly, he doesn’t tell me when the stock price will reach 1200. For example, if it is 1150 today, and it is expected to reach 1200 in 12 years, I’d probably be better off putting my money in the bank, and watching it grow risk-free. Even if the current price were lower, I would want a date by which the stock is supposed to reach the target price. Good finance implies tenure matching, so I should invest accordingly. If the stock is expected to give good returns in a year, then I should put only that money into it which I would want to invest for around that much time. And so forth.

Then he doesn’t tell me how long it will stay at 1200. I’m not an active investor. I might check prices of stocks that I own maybe once in a week (I currently don’t own any stock). So it’s of no use to me if the price hits 1200 some time during some intraday trade. i would want the price to remain at 1200 or higher for a longer period so that I can get out.

Thirdly and most importantly, he doesn’t tell me anything about volatility. He doesn’t give me any statistics. He doesn’t tell me if 1200 is the expected value of the stock, or the median, or the maximum, or minimum, at whatever point of time (we’ve discussed this time bit before). He doesn’t tell me what are the chances that I’ll get that 1200 that he professes. He doesn’t tell me what I can expect out of the stock if things don’t go well. And as a quant, I refuse to touch anything that doesn’t come attached with a distribution.

Life in general becomes so much better when you realize and recognize volatility (maybe I’ll save that for another discourse). It helps you set your expectations accordingly; it helps you plan for situations you may not have thought of; most importantly it allows you to recognize the value of options (not talking about financial options here; talking of everyday life situations). And so forth.

So that is yet another reason I don’t generally watch business TV. I have absolutely no use for their stock prediction and tips. And I think you too need to take these tips and predictions with a bit of salt. And not spend a fortune buying expensive reports. Just use your head. Use common sense. Recognize volatility. And risk. And you’ll do well.

Volatility of Human Body Weight

Ever since I shed roughly 20 kilos over the course of the second half of last year, I’ve become extremely weight-conscious. Given how quickly I shed so much weight, I’m paranoid that I might gain back so much again as quickly. This means I monitor my weight as closely as I can, limit myself in terms of “sin foods” and check my weight as often as possible, typically whenever I manage to make it to the gym (about twice a week on average).

Having been used to analog scales lifelong (there’s one at home, but it is wrongly calibrated I think), the digital scales (with 7-segment display) that are there at a gym provide me with a bit of a problem. I think they are too precise – they show my weight up to 1 place of decimal (in kilograms), and thinking about it, I think that much detail is unwarranted.

The reason being that I think given the normal cycles, I think the weight of the human body is highly volatile and measuring a volatile commodity at a scale finer than the volatility (when all you are interested in is the long-term average) is fraught with danger and inaccuracy. For example, every time you drink two glasses of water, your weight shoots up by half a kilo. Every time you pee, your weight correspondingly comes down. Every time you eat, up the weight goes, and every time you defecate, down go the scales.

Given this, I find the digital weighing machine at my gym a bit of a pain, but then I’m trying to figure out what the normal volatilty of the human body weight is, so that I can quickly catch on to any upward trend and make amends as soon as I can help it. Over the last couple of months, the machine has shown up various numbers between 73.8 and 75.5 and I have currently made a mental note that I’m not going to panic unless I go past 76.

I wonder if I’m making enough allowances for the volatility of my own body weight, and if I should reset my panic limits. I have other metrics to track my weight also – though my various trousers are all calibrated as “size 34” some have smaller waists than the others, and my algo every morning is to start wearing my pants starting from the smallest available, and go to work in the first one that fits, and when I know that I’m having trouble buttoning up my black chinos, that’s another alarm button.

Yeah sometimes I do think I’m too paranoid about my weight, but again it’s due to the speed at which I reduced that I’m anxious to make sure I don’t go back up at the same rate!

Update

Economist Ajay Shah sends me (and other members of a mailing list we belong to) this wonderful piece he has put together on weight management. Do read. But my question remains – how do you measure your body’s weight volatility?