## Dimensional analysis in stochastic finance

Yesterday I was reading through Ole Peters’s lecture notes on ergodicity, a topic that I got interested in thanks to my extensive use of Utility Theory in my work nowadays. And I had a revelation – that in standard stochastic finance, mean returns and standard deviation of returns don’t have the same dimensions. Instead, it’s mean returns and the variance of returns that have the same dimensions.

While this might sound counterintuitive, it is not hard to see if you think about it analytically. We will start with what is possibly the most basic equation in stochastic finance, which is the lognormal random walk model of stock prices.

$dS = \mu S dt + \sigma S dW$

This can be rewritten as

$\frac{dS}{S} = \mu dt + \sigma dW$

Now, let us look at dimensions. The LHS divides change in stock price by stock price, and is hence dimensionless. So the RHS needs to be dimensionless as well if the equation is to make sense.

It is easy to see that the first term on the RHS is dimensionless – $\mu$, the average returns or the drift, is defined as “returns per unit time”. So a stock that returns, on average, 10% in a year returns 20% in two years. So returns has dimensions $t^{-1}$, and multiplying it with $dt$ which has the unit of time renders it dimensionless.

That leaves us with the last term. $dW$ is the Wiener Process, and is defined such that $dW^2 = dt$. This implies that $dW$ has the dimensions $\sqrt{t}$. This means that the equation is meaningful if and only if $\sigma$ has dimensions $t^{-\frac{1}{2}}$, which is the same as saying that $\sigma^2$ has dimensions $\frac{1}{t}$, which is the same as the dimensions of the mean returns.

It is not hard to convince yourself that it makes intuitive sense as well. The basic assumption of a random walk is that the variance grows linearly with time (another way of seeing this is that when you add two uncorrelated random variables, their variances add up to give the variance of the sum). From this again, variance has the units of inverse time – the same as the mean.

Finally, speaking of dimensional analysis and Ole Peters, check out his proof of the Pythagoras Theorem using dimensional analysis.

Isn’t it beautiful?

PS: Speaking of dimensional analysis, check out my recent post on stocks and flows and financial ratios.

## A one in billion trillion event

It seems like capital markets quants have given up on the lognormal model for good, for nobody described Facebook’s stock price drop last Thursday as a “one in a billion trillion event”. For that is the approximate probability of it happening, if we were to assume a lognormal model of the market.

Without loss of generality, we will use 90 days trailing data to calculate the mean and volatility of stock returns. As of last Thursday (the day of the fall), the daily mean returns for FB was 0.204%, or an annualised return of 51.5% (as you can see, very impressive!). The daily volatility in the stock (using a 90-day lookback period again) was 1.98%, or an annualised volatility of 31.4% . While it is a tad on the higher side, it is okay considering the annual return of 51.5%.

Now, traditional quantitative finance models have all used a lognormal distribution to represent stock prices, which implies that the distribution of stock price returns is normal. Under such an assumption, the likelihood of a 18.9% drop in the value of Facebook (which is what we saw on Thursday) is very small indeed.

In fact, to be precise, when the stock is returning 0.204% per day with a vol of 1.98% per day, the an 18.9% drop is a 9.7 sigma event. In other words, if the distribution of returns were to be normal, Thursday’s drop is 9 sigmas away from normal. Remember that most quality control systems (admittedly in industrial settings, where faults are indeed governed by a nearly normal distribution) are set for a six sigma limit.

Another way to look at Thursday’s 9.7 sigma event is that again under the normal distribution, the likelihood of seeing this kind of a fall in a day is $math ~10^{-21}$. Or one in a billion trillion. In terms of the number of trading days required for such a fall to arrive at random, it is of the order of a billion billion years, which is an order of magnitude higher than the age of the universe!

In fact, when the 1987 stock market crash (black monday) happened, this was the defence the quants gave for losing their banks’ money – that it was an incredibly improbable event. Now, my reading of the papers nowadays is sketchy, and I mostly consume news via twitter, but I haven’t heard a single such defence from quants who lost money in the Facebook crash. In fact, I haven’t come across too many stories of people who lost money in the crash.

Maybe it’s the power of diversification, and maybe indexing, because of which Facebook is now only a small portion of people’s portfolios. A 20% drop in a stock that is even 10% of your portfolio erodes your wealth by 2%, which is tolerable. What possibly caused traders to jump out of windows on Black Monday was that it was a secular drop in the US market then.

Or maybe it’s that the lessons learnt from Black Monday have been internalised, and included in models 30 years hence (remember that concepts such as volatility smiles and skews, and stochastic volatility, were introduced in the wake of the 1987 crash).

That a 20% drop in one of the five biggest stocks in the United States didn’t make for “human stories” or stories about “one in a billion billion event” is itself a story! Or maybe my reading of the papers is heavily biased!

PostScript

Even after the spectacular drop, the Facebook stock at the time of this update is trading at 168.25, a level last seen exactly 3 months ago – on 26th April, following the last quarter results of Facebook. That barely 3 months’ worth of earnings have been wiped out by such a massive crash suggests that the only people to have lost from the crash are traders who wrote out of the money puts.

## Direct listing

So it seems like Swedish music streaming company Spotify is going to do a “direct listing” on the markets. Here is Felix Salmon on why that’s a good move for the company. And in this newsletter, Matt Levine (a former Equity Capital Markets banker) talks about why it’s not.

In a traditional IPO, a company raises money from the “public” in exchange for fresh shares. A few existing shareholders usually cash out at the time of the IPO (offering their shares in addition to the new ones that the company is issuing), but IPOs are primarily a capital raising exercise for the company.

Now, pricing an IPO is tricky business since the company hasn’t been traded yet, and so a company has to enlist investment bankers who, using their experience and investor relations, will “price” the IPO and take care of distributing the fresh stock to new investors. Bankers also typically “underwrite” the IPO, by guaranteeing to buy at the IPO price in case investor demand is low (this almost never happens – pricing is done keeping in mind what investors are willing to pay). I’ve written several posts on this blog on IPO pricing, and here’s the latest (with links to all previous posts on the topic).

In a “direct listing”, no new shares of the company are issued, the stock gets listed on an exchange. It is up to existing shareholders (including employees) to sell stock in order to create action on the exchange. In that sense, it is not a capital raising exercise, but more of an opportunity for shareholders to cash out.

The problem with direct listing is that it can take a while for the market to price the company. When there is an IPO, and shares are allotted to investors, a large number of these allottees want to trade the stock on the day it is listed, and that creates activity in the stock, and an opportunity for the market to express its opinion on the value of the company.

In case of a direct listing, since it’s only a bunch of insiders who have stock to sell, trading volumes in the first few days might be low, and it takes time for the real value to get discovered. There is also a chance that the stock might be highly volatile until this price is discovered (all an IPO does is to compress this time rather significantly).

One reason why Spotify is doing a direct listing is because it doesn’t need new capital – only an avenue to let existing shareholders cash out. The other reason is that the company recently raised capital, and there appears to be a consensus that the valuation at which it was raised – \$13 billion – is fair.

Since the company raised capital only recently, the price at which this round of capital was raised will be anchored in the minds of investors, both existing and prospective. Existing shareholders will expect to cash out their shares at a price that leads to this valuation, and new investors will use this valuation as an anchor to place their initial bids. As a result, it is unlikely that the volatility in the stock in initial days of trading will be as high as analysts expect.

In one sense, by announcing it will go public soon after raising its last round of private investment, what Spotify has done is to decouple its capital raising process from the going public process, but keeping them close enough that the price anchor effects are not lost. If things go well (stock volatility is low in initial days), the company might just be setting a trend!

## Sweetshop optimisation on festival days

As I mentioned in my earlier post, while Varamahalakshmi Vrata is considered rather minor in my family, it is a rather big deal in my wife’s house. So I headed to a nearby sweetshop called Mane hOLige to fetch sweets for today’s lunch.

Now, this is not a generic sweetshop. As the name suggests, the shop specialises in making hOLige, also known as obbaTT, which is a kind of sweet stuffed flatbread popular in Karnataka and surrounding areas. And as the menu above suggests, this shop makes hOLige (I’ll use that word since the shop uses it, though I’m normally use to calling it “obbaTT”).

I had been to the shop last Sunday to pick up hOLige for a family gettogether, and since I asked for the rather esoteric “50-50 hOLige”, I had to wait for about 30 minutes before it was freshly made and handed over (Sunday also happened to be yet another minor festival called “naagar panchami”).

Perhaps learning from that experience, when heightened demands led to long wait times for customers, the sweetshop decided to modify its operations a little bit today, which I’m impressed enough to blog about.

Now, as the subtitle on the board above says, the shop specialises in “hot live hOLige”. They are presumably not taking VC funding, else I’d imagine they’d call it “on demand hOLige”. You place an order, and the hOLige is made “to order” and then handed to you (either in a paper plate or in an aluminium foil bag, if you’re taking it away). There is one large griddle on which the hOliges are panfried, and I presume the capacity of that griddle has been determined by keeping in mind the average “live” demand.

On a day like Sunday (naagar panchami), though, their calculations all went awry, in the wake of high demand. A serious backlog built up, leading to a crowded shopfront and irate customers (their normal rate of sale doesn’t warrant the setting up of a formal queue). With a bigger festival on today (as I mentioned earlier, Varamahalakshmi Vrata is big enough to be a school holiday. Naagar panchami doesn’t even merit that), the supply chain would get even more messed up if they had not changed their operations for the day.

So, for starters, they decided to cut variety. Rather than offer the 20 different kinds of hOLige they normally offer, they decided to react to the higher demand by restricting choice to two varieties (coconut and dal, the the most popular, and “normal” varieties of hOLige). This meant that demand for each variety got aggregated, and reduced volatility, which meant that…

They could maintain inventory. In the wake of the festival, and consequent high demand, today, they dispensed with the “hot, live” part of their description, and started making the hOLiges to stock (they basically figured out that availability and quick turnaround time were more important than the ‘live’ part today).

And the way they managed the stock was also intelligent. As I had mentioned earlier, some customers prefer to eat the hOLige on the footpath in front of the store, while others (a large majority) prefer to take it away. The store basically decided that it was important to serve fresh hot hOLige to those that were consuming it right there, but there was no such compulsion for the takeaway – after all the hOLige would cool down by the time the latter customers went home.

And so, as I handed over my token and waited (there was still a small wait), I saw people who had asked for hOLige on a plate getting it straight off the griddle. Mine was put into two aluminium foil bags somewhere in the back of the store – presumably stock they’d made earlier that morning.

Rather simple stuff overall, I know, but I’m impressed enough with the ops for it to merit mention on this blog!

Oh, and the hOLige was excellent today, as usual I must say! (my personal favourite there is 50-50 hOLige, if you want to know)

## Brexit

My facebook feed nowadays is so full of Brexit that I’m tempted to add my own commentary to it. The way I look at it is in terms of option valuation.

While the UK economy hasn’t been doing badly over the last five years (steady strictly positive growth), this growth hasn’t been uniform and a significant proportion of the population has felt left out.

Now, Brexit can have a negative impact on two counts – first, it can have a direct adverse impact on the UK’s GDP (and also Europe’s GDP). Secondly, it can have an adverse impact by increasing uncertainty.

Uncertainty is in general bad for business, and for the economy as a whole. It implies that people can plan less, which they compensate for by means of building in more slacks and buffers. And these slacks and buffers  will take away resources that could’ve been otherwise used for growth, thus affecting growth more adversely.

While the expected value from volatility is likely to be negative, what volatility does is to shake things up. For someone who is currently “out of the money” (doing badly as things stand), though, volatility gives a chance to get “in the money”. There is an equal chance of going deeper out of the money, of course, but the small chance that volatility can bring them out of water (apologies for mixing metaphors) can make volatility appealing.

So the thing with the UK is that a large section of the population has considered itself to be “out of the money” in the last few years, and sees no respite from the existing slow and steady growth. From this background, volatility is a good thing, and anything that can shake things up deserves its chance!

And hence Brexit. It might lower overall GDP, and bring in volatility, but people hope that the mix of fortunes that stem from this volatility will affect them positively (and the negative effects go to someone else). From this perspective, the vote for Brexit is a vote of optimism, with voters in favour of Leave voting for the best possible outcome for themselves from the resulting mess.

In other words, each voter in the UK seems to have optimised for private best case, and hence voted for Brexit. Collectively, it might seem to be an irrational decision, but once you break it down it’s as rational as it gets!

## VC Funding, Ratchets and Optionality

A bug (some call it a “feature”) of taking money from VCs is that it comes in with short optionality. VCs try to protect their investments by introducing “ratchets” which protect them against the reduction in valuation of the investee in later rounds.

As you might expect, valuation guru Aswath Damodaran has a nice post out on how to value these ratchets, and how to figure out a company’s “true valuation” after accounting for the ratchets.

A few months back, I’d mentioned only half in jest that I want to get into the business of advising startups on optionality and helping them value investment offers rationally after pricing in the ratchets, so that their “true valuation” gets maximised.

In a conversation yesterday, however, I figured that this wouldn’t be a great business, and startups wouldn’t want to hire someone like me for valuing the optionality in VC investments. In fact, they wouldn’t want to hire anyone for valuing this optionality.

There are two reasons for this. Firstly, startups want to show the highest valuation possible, even if it comes embedded with a short put option. A better valuation gives them bigger press, which has some advertising effect for sales, hiring and future valuations. A larger number always has a larger impact than a smaller number.

Then, startup founders tend to be an incredibly optimistic bunch of people, who are especially bullish about their own company. If they don’t believe enough in the possible success of their idea, they wouldn’t be running their company. As a consequence, they tend to overestimate the probability of their success and underestimate the probability of even a small decrease in future valuation. In fact, the probability of them estimating the latter probability at zero is non-zero.

So as the founders see it, the probability of these put options coming into the money is near-zero. It’s almost like they’re playing a Queen of Hearts strategy. The implicit option premium they get as part of their valuation they see as “free money”, and want to grab it. The strikes and structures don’t matter.

I have no advice left to offer them. But I have some advice for you – given that startups hardly care about optionality, make use of it and write yourself a fat put option in the investment you make. But then this is an illiquid market and there is reputation risk of your option expiring in the money. So tough one there!

## 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:

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):

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):

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!