Trading with statistical edge

Naman Tejaswi
Coinmonks
Published in
10 min readJul 18, 2021

--

The financial markets for long have been viewed as a random process and consequently a risky advent, by people outside the finance industry. The assumption that a random event has to be risky needs some addressing.

Let us first divide a random process into two different types, firstly say we have an event where we know the exact possible outcomes and then we think of a process where we cannot be 100% sure of the outcome set.

Rolling a dice is a process where we can say with 100% certainty that we know that number that rolls up will be one of 1,2,3,4,5 or 6 on the other hand consider the annual rainfall in California although with past data we can say what amount of rainfall to expect with a certain confidence interval, but we can never say this is the maximum amount of rainfall we will receive this year, at least mathematically. In a nutshell on one side we have a bounded outcome set and on the other side we have an unbounded set. This discussion sets us up for an interesting story.

In Latin folklore around the 2nd century we see the first reference of a black swan, the line of thought was that, all the swans people had seen in their lifetime were white thus they deduce that all the swans that exist in our world are white. However, at the end of 17th century dutch explorers discovered a black swan in western Australia and thus the term black swan event was coined.

The term since then has been used as a metaphor for events which were thought of as impossible or to aptly put inconceivable but they actually occur. From our examples earlier a dice will never have a black swan outcome however the same cannot be said for the rainfall we expect, we cannot say the same. This brings us to yet another fascinating statement, the Murphy law.

Murphy Law states that what ever can happen will happen, if we make enough trials. This to say any event which has a probability greater than zero will eventually, happen if continue our experiment till perpetuity. The adage was originally in a negative connotation to say “Anything that can go wrong, will go wrong”.

We can think of the Murphy law, simply as that if a probability of an event is greater than zero no matter how close to zero the number underscores the fact that event will occur eventually else its probability would have been zero. This generally digresses to a philosophical discussion, that then nothing is impossible but we will for now refrain form it.

A practical example is what happened on the 18 August 1913 in Casino-de-Monte Carlo on a roulette wheel. The ball in the roulette wheel ended up in a black slot for 26 consecutive times, as one would expect gamblers fallacy kicked in and people continually bet on red disregarding that each spin was independent. One could expect 26 blacks in a row with a probability of(18/37)³⁶ or 7.30 * 10-⁹ or 73 times in 10 billion spins of the wheel. This underscores the fact enough simulation and all possible events show up.

Here is a simple function to replicate a fair roulette (with no green) and 10 million simulations of a binary outcome might as well be heads or tails. Go ahead and check for yourself if the theoretical probabilities make sense.

A million spins on a fair roulette

Here we learn our first trading principle, “Do not confuse the improbable and unlikely with the impossible.” We prefer to work with a risk defined system otherwise one of those days not so different from the one in Monte Carlo an inconceivable event in the financial market will bankrupt us. Live to fight/bet another day.

Now we turn our attention to Expected Values, Law of Large numbers and delve deeper into the derivative instruments in the financial market.

Expected value is the probabilistic mathematical outcome of a event for a single instance

Say we have an event X with discrete outcomes O1 and O2, having probabilities P1 and P2 then the expected value of event E will be

E(x)=P1*O1+P2*O2

For instance consider a fair dice with numbers 1 to 6, what is the expected value?

Given our premise that we have a fair dice at hand each number is equally likely to turn up, so

E(x)=1/6[1+2+3+4+5+6] E(x)=3.5

Now on one roll of the dice it is impossible to get 3.5, this where the law of large number plays its it part it states that,

The outcome of the event will converge to its expected value as we repeat the instances of event/experiment.

This means that as we continue rolling the dice many times the mean of our outcomes will approach 3.5.

The crux is, one may flip a coin 10 times and get 8 heads, but if one continues to flip the coin 1000 times it is unlikely he will get 800 heads and the outcomes is more likely to be 50:50 and as we repeat our experiment that is to say observed value will converge to its expected value.

Now in a trading, betting or a casino environment the Expected return or profit will be dependent on 2 parameters, they probability of the event on which you bet happening and the payout or payin(odds) when you win your bet or lose your bet. In case of casino the probability of an even or odd red or black are altered due to the presence of 00 and a green slot.(18 red 18 blacks 1 green in European roulette and not 0 not being considered either even or odd or presence of 00) In case of betting events the payout ratio is skewed and the betting house takes a cut from amount of money collected by all punters and pays out the rest.

The house edge is always present in case of any casino or betting industry this to say if bet an amount of money proportional to outcome probabilities on all events then also you would lose money over many bets. Simply to say the punter has a negative expected value for return and the bookie has a positive expected value for return.

This means over large periods of time the Casino is mathematically guaranteed to end up in profit and the more the plays the more will be the expected profit of the casino. This is what makes up the saying the house always wins in the long run. However we are yet to look at a key condition namely table limits which prevents the casino going out of business.

The casino will never allow large bets on on single play but it would rather allow several smaller bets which sum up to that large bet. The expected value and the Kelly Criteria suggests when and what amount of should one bet.

Firstly, one should always bet only if the expected value is positive, that is one should be the casino or the bookie not the gambler or punter. The amount on should bet on a single instance is given by the Kelly Criteria which is

K%=(P*R-Q)/R=P-(Q/R) where K is the percentage of available funds one must bet, P is the probability of winning, Q is the probability of losing and R is Reward:Risk ratio or the payout ratio.

If one follows the Kelly criteria it will decrease the absolute value of our bet after each victory and increase the absolute value after each victory as its value is percentage of available money to bet. This results in lognormal probability distribution, that is it will be positive skewed and we expect to make money.

Also do note that even if the chances of winning are 99% and at 1:1 payout the Kelly will never suggest to bet the entirety of your money because the 1% is there for a reason, just like we learnt over multiple events eventually 1% will turn up and Kelly accounts for that.

We have the payoff diagram for the casino with an initial balance of 1000 units for 1 million plays, this is to demonstrate the impact of house edge or having a positive expected value over repeated events with table limits i.e. betting with in accordance to Kelly Criteria. A seemingly small house hedge magnifies over multiple plays and this was for European roulettes which have better odds than American roulettes.

One may change the probability of winning to a probability of profit in a derivative trade and the payout ratio and see the impact of multiple positive expected value trades and decide if they wish to be the punter or the house. Also on closely zooming in the graph you will se that the casino has stretches of losses just like the streak in Monte Carlo but since every loss we reduce our bet we are able to stay in the game longer, this the essence to trading derivatives in financial markets.

Now we will see how can we apply these concepts to trading derivative contracts, I assume the familiarity with the basic terminology of options and first degree greeks and the mechanism a future contract works but if you are not familiar you can simply think of them as bets with probability of winning and payout ratios.

Now our strategy suites well to trades with defined maximum risk and defined maximum reward, which familiar traders may recall are typically debit spreads, iron condors, iron fly etc. Now these are combinations of multiple call and put options which have an individual dynamic probability of profit and consequently the combined strategy has a dynamic probability of profit.

The Probability of an option expiring in the money is represented by the greek delta, delta does not represent the probability of maximum profit and similarly 1-delta does not represent the probability of maximum loss it represents the probability of any amount of profit or loss. The probability density function that is the probability of profit at each point is represented by the implied volatility of the option but to keep things keep simple we will take in the outcomes as binary that is max loss or max profit.

Note Delta is dynamic and the probability of profit of any option changes with changes in the underlying however here for simplicity we will treat it has a point function and a static event.

A brief word on implied volatility, the implied volatility is the value of volatility which based models such as Black Scholes suggest(imply) if we know the other parameters such as time to expiry, strike price, interest rates etc. It has has been historically observed that the implied volatility is greater than the realised volatility a lot of time, in simpler terms this means that options based on the movement that happens in the market are a lot of the times overpriced. This is why the option seller has a theoretical edge if the implied volatility was close to the realised volatility often, then neither the seller nor the buyer would have an edge and if implied volatility starts to fall below the realised volatility then the buyer will have the edge. But since implied volatility is a lot of the time(not always!) higher than the realised volatility, the seller on multiple bets(positive expected value) is expected to beat the buyer(negative expected value) of the option and has a theoretical edge just as the casino expects to win in the long run. The implied volatility of different strikes is make up the normal distribution of probability of profits. Do note that a seller of an option has potentially unlimited risk this means the seller is betting more than all his money where as the buyer is betting a fixed amount albeit with negative expected value in general. This is taken care by creating a hedge that is buying an option at a strike further from the sold strike there by limiting the maximum loss and maximum our strategy risk defined. Now we can follow the Kelly Criteria for position sizing of our trades.

To sum up we must take trades which have a positive expected value that is over multiple events and must size our position in accordance to the Kelly Criteria.

Finally we will demonstrate what we talked about using a potential trade.

Consider the following debit spread:

We short a 15950 Call option and we long a 16050 call option for the weekly expiry on 22 July 2021 of the Nifty instrument which is trading at 15923.

The probability of profit is 66% (Instead of absolute values from delta we take what the platforms tells us since we discussed that the probability density function is for a range of values) and the max profit is 3015 per lot and max loss is 4485. Now we have a positive expected value of our trade which is 465 per lot and then Kelly Criteria suggests that we should bet 15.42% of our trading funds on one instance of this trade that is this will help us position size or select the number of lots to trade.

A Positive Expected Value Trade

Finally, the key takeaway from this reading is, positive expected value is an indication of a good trade, since we are going to trade over our lifetime a positive expected value means we will definitely make profit if we continue to stick to our trades because the law of large number implies that over many trades we will make profit equal to expected value on average.

Please understand that the implied volatility is a lot of the time is larger than than the realised volatility but not always which is to say it is not always that options are overpriced and the term probability of profit just like any event holds true for large simulation of similar trades. Also beware that multiple trades in correlated instruments means the events are dependent events and in that case you may want to reduce your symmetric risk as technically you wont be betting in accordance to Kelly Criteria.

You can find the github repository here

--

--