Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the nimble-builder domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/portfol1/public_html/wp/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the restrict-user-access domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/portfol1/public_html/wp/wp-includes/functions.php on line 6121

Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /home1/portfol1/public_html/wp/wp-content/plugins/add-meta-tags/metadata/amt_basic.php on line 118
Uncategorized | Portfolio Yoga - Part 14

Volatility, Nifty and analyzing your system

Trading strategies are like seasons. When the season is in full swing, the person who follows a strategy that correlates with it feels like a king and the guy who follows a strategy that is antithestis of the that feels like shit. Currently, its a season of Mid and Small caps. Stocks in those pockets have gained substantially, better than what the overall markets have done for themselves.

When the markets are in a range, trend followers wonder where the good old days of smooth trends on rocks went by while mean reverters seem to be like god as they sell at tops and buy at bottoms. And then the season changes and every attempt at catching the top and bottom just goes for a toss. 

I have been in recent times investigating how volatility can affect system returns and while there is no conclusion as such that I am willing to lay upon the table, I hereby present some charts which may hold a clue to what kind of markets the system does best in.

To start off, the 1st chart on the table is one where I have taken the Geometric Mean of the daily range (High – Low) and then calculated the Standard Deviation of the same period

Image

Its no surprise to see 2000, 2008 and 2009 being the top years in terms of both range and deviation from the mean. After all, we saw maximum volatility during these years. What is interesting for me is 2012 wherein Nifty gained 27% while Nifty saw the least amount of moves on a intra-day scale. 

The Weekly Range 

Image

and the Monthly Range

Image

do not show any major difference compared to the daily range (other than percentage change). The way to use the above dataset will be to see if there is any marked difference in system returns in years of high volatility vs. years where volatility was low. Depending upon the average holding period for the system, one can compare and contrast with one of the above charts to try and see what kind of markets appeal to the system and what doesn’t.

The reason to compare in my opinion would be to figure out whether bad periods in the past (system) were due to some factor that can be in hindsight seen as a problem area for the system (you may actually have to break-down the above chart on monthly scale since its unlike systems to under-perform for years unless the logic itself is hugely faulty.

For example, check this Equity Plot (Plot starts in Jan 2012 and is upto 15/04/2014)

Image

The system had a excellent run in the initial few months (Jan – Feb 2012 being a runaway bull market) and then more or less settled down until it had one fiery run (this taking place from late July 2013 to Early October 2013). In this period, it was not a run-away market, but one where you could see huge swings (Wide Range Bars being many in the months of August and September). The system seemed to be able to take advantage of the volatility. But once the volatility ended, even though markets have climbed steadily higher from that point onwards, the system has returned zero returns indicating that the system got caught with low volatile periods and lost money (more or less – Since October 15, Nifty is up by around 800 points while the system in the same time has actually lost around 400 points) . 

Good systems (which have sustained profitable periods) are tough if not impossible to create. Markets being dynamic, no matter what one does, markets always seem to be able to get the better of us. Its hence important that one constantly revises his views and strategies while at the same time keeping in mind the fact that even the best systems can have a long period of draw-down due to unfavorable market conditions. As they say, do not throw the baby with the bathwater.

 

 

Throwing Spaghetti Against The Wall

This post has been driven by a deep discussion I had with Nooresh Merani today and hence the credit for the idea would remain with him 🙂

While study after study has shown that retail investors are unable to match the performance of the Index let alone beat it, it has not stopped a army of advisors and technocrats from coming up with new ideas, ways and thoughts on how to select stocks and become retire rich. 

There is a very famous quote by legendary trader Jesse Livermore which goes as such 

“It never was my thinking that made the big money for me. It always was my sitting. Got that? My sitting tight!”

Sitting tight is the easy thing to do when you have no real money at risk, but once you have put money, can we sit tight and hope while the stocks we have bought are moving all around. I am jumping the first step, so let me go back.

How do we create a portfolio?

A portfolio is a set of stocks we buy that we hope shall perform in the long run. But since we are provided both a price and a opportunity to trade the stocks day in and day out, its just a matter of time before we let go all the wonderful stocks we had picked (by way of Luck or Skill) while adding or at the least holding onto stocks that are touching the nadir. 

The discussion I had with Nooresh was about whether a Random portfolio (contructed purely out of chance) can beat Index returns if one just invested and sat tight. 

While we hope that every stock we buy ends up being a multi-bagger in the long run, its very rare for us to not just buy a few stocks that eventually end as multi baggers but actually hold them.

The test I did was simple. I took a 10 year time frame (long enough I presume for a long term investor). I used April 1, 2004 as the starting date. The date had the additional advantage of markets being near a short term top (in hind-sight) since after NDA lost the elections, markets took a steep dive and hence for at the very least 6 months from entry, we were underwater.

The biggest problem in conducting these types of tests is that finding historical data is tough since delisted / merged stocks are moved trimming the database of that day considerably. Since I maintain a database where delisted stocks aren’t deleted, it made it a bit easy for me to work on the approach I had decided upon.

I took the Bhavcopy of NSE of 1st April 2004. On that day, 750 stocks were traded and I removed 250 using the filter of removing any stock that had closed below 25 on the previous day (Idea is to remove penny stocks).

I then used Random function in Excel to randomize the 500 that remained. I then selected 3 sets of 25 stocks each from them (1 set each before refreshing and randomizing the set of names again – and hence a couple of stocks do repeat).

I then used the Opening prices of these stocks as per my database (where its adjusted for Bonus / Splits but not for Dividends) so as to get the current average price of acquisition. All acquisitions were assumed to be equally weighted (same money invested in each stock)

So, how did the three perform compared to Nifty. Well, here you go

Image

Every Random Portfolio beat the CNX Nifty. Is it Luck? Maybe to an extent, but what drives a diversified portfolio is if you can get caught with a few multibaggers. Regarless of how badly a few others do, since the exposure to each stock is 4%, not much of damage can happen while the ones that click big shall make more than what they lost (worse case, you lose 100% in a stock. If one stock moves 400%, it makes up for the loss of 3 of them).

I am not suggesting that you need to buy stocks randomly, buying good stocks is said to make a lot of money, but unfortunately we come to know of good stocks only after they have bolted off the stable (hindsight).

Food for thought?

File if you need to download (Link)

 

Nifty Percent Return as of 11th April from 2000 to 2014

Nifty Percent Return as of 11th April from 2000 to 2014

A simple return chart measuring how Nifty has performed since January 1 of the year to 11th April.

Update for Nifty

In my last post on Nifty, I said that a swing trading system I use seemed to suggest a move to 6850 and that has been achieved. The question hence comes as to what next. On one hand, the mind being bullish, its tough to stay neutral and seek out whether there exists an opportunity for markets to fall. After all, I myself am a proponent of “Prediction is Impossible”, so it will be ironical if I start predicting where Nifty may go next.

Yesterday, Krishnakumar came out with his medium term target of 11000 on Nifty and while its easy to say that the target is too high, markets themselves have no memory of the past and forget 11000, even 16000 shall get achieved (its just a matter of time).

Coming back to Nifty, at 6850, are the markets over-heated. While on the short-term charts, many oscillators are indeed over-bought, on longer terms charts, there is still way to go before things become really overheated. For example, lets take RSI on the Monthly charts. As of now, its at 66 levels and 70 is considered to be the level above which markets are seen as over-bought. 

But overbought doesn’t mean a sell. Those who have read John Haydens on this aspect would known that its actually a stronger buy above 60. And this is the first time RSI on the monthly charts has closed above 60 since 2010. During the runaway bull market during 2003 – 2007, RSI on monthly only once slid below the 60 mark (when Nifty fell due to NDA loosing the election and worse, Left having a hand in the power). 

Markets follow a strong rally with a real long side-ways correction making the trader forget there had been one hell of a rally earlier and once could soon unleash once again. In fact, we become so used to this side-ways markets that when the real big one comes, we rarely are bullish since we cannot distinguish between this rally and the multiple previous ones that failed.

The 2003 – 2007 rally was not the first multi-year rally to occur in the Indian markets either. The biggest rally (if we are to take into account Sensex back-adjusted) happened between 1988 and 1992 when Sensex leapfrogged from sub 500 levels to 4500 level at the peak. Of course, after this we had a pretty long period without the high getting broken substantially. While the first break came in late 1999 / 2000, the bust of the .com in US meant that we had to wait for another 3 years before the older levels were broken once and for all.

After the peak in 2008, this is the first time we have closed above those peaks and hence its time to reflect as to whether this rally is similar to 2000 or 2003/07 for there in lies the question of whether Nifty will tough 11000 or 30000 (5x).

Unlike US, where there is ample amount of data on everything that has anything to do with markets, data is severely limited in India (unless you are prepared to shell out the big bucks and get yourself the best of the data feeds where you have access to a bit more data).

One way fundamentalists asses a stock is by looking at the Price Earnings Ratio. I have myself in my past Nifty posts used the same and here I post it updated till date

Image

Markets have broken the previous high and currently is above its high of 2012 (Nifty high of 2012 was 6415 just for sake of comparison). 

Markets top out on back of Euphoria and I see none. In fact, yesterday when the markets were rallying strongly, all brokers I know of had more sell orders than buy. While the same size is indeed small, the fact that retail are selling out of the rally just doesn’t fit into the theory of markets being in a bubble phase which shall get burst anytime soon.

Lets for a moment move out of Nifty chart and look at broader index charts. First comes the CNX Mid Cap

Image

Forget about breaking 2008 / 2011 highs, this Index is just testing its 2013 highs as of now. Lets now head to the CNX Small Cap Index

Image

Similar is the story out here as well. Its not yet testing the 2011 lows (which unlike Mid Cap Index is pretty far off from the 2008 highs).

And finally the CNX 500 Index

Image 

Story is a bit better but nowhere as good as CNX Nifty with its 2008 peak still being un-tested.

The reason for the wide difference (and this despite all these Indices being managed pretty efficiently by removing weak / dud stocks and inducting strong stocks) is due to the fact that this rally has been led by select sectors which were not the main drivers in 2008. Take Auto for instance. CNX Auto Index topped out in 2008 at near 2400 levels. Currently CNX Auto stands at 5950. CNX Pharma / CNX IT among too have a similar story to tell.

Once upon a time, Reliance was for the markets, what Tendulkar was for the Indian Cricket Team. Relaince moved the markets either way – a sort of bell weather. But today, no one cares about whether Reliance is up a percent or down since other stocks and sectors have firmly taken control of the Index.

For every fall and every rise, the public wants reason and the financial / media pundits are happy to oblige. Well before the 2008 bubble burst, small rises and falls were explained by Baltic Index, Japanese Yen among others. And right at that point of time, they seemed to be so correlated, that it made you wonder why you had not observed the same earlier. But while you were watching the statics that led the last rally / fall, markets and media had moved onto the next.

The US markets are on a free-fall as I write this (Dow down 200+ points). This even as today’s data point which was Jobless claims which came in lowest since 2007, theoretically a strongly bullish number, but wait, markets is focusing on something else for now and this hence takes a backseat. What the public evidently forgets is that Dow hasn’t seen a negative year since 2008. Even a 100 point fall would not do such a trend much harm.

According to the old adage, one should not lose sight of the forest for the trees. The markets is the forest that is made up of individual moves (trees). Its very easy to loose focus just at the moment you need to be totally focused. It comes down basically to the fact of what is your objective in the markets. Everyone is here for the money, but very few actually end up taking any part of it. Wealth Creation is the objective of most, but all I have seen is story after story of wealth destruction. 

A friend of mine was repenting that the Mutual fund he sold off after holding for 3 long years (and getting back the sum invested) had seen its NAV move up by 10% right after he sold the damm thing. When expectations are high and instead we see a disappointment, its easy to miss the larger picture of this not being a time to sell but a time to maybe add to the investment.

A person who invests today with the 11000 target in mind will most likely end up in a loss, not because Nifty will not move to 11K, it will, but because, he is not prepared for the pain that may come in between the time. If markets were to drop from here by say 350 points (a 5% fall), more people will throw in the towel than what the number who expect to do that today.

A guy who buys Nifty today IMO has to be prepared to withstand (if he is a long term investor and not wanting to look at the daily moves), a pain threshold of at the very least 25% (average draw-down from year high). Even then, if 11K is indeed reached, its still a good risk reward set up (reward being 60% above current price).

And before I conclude, here is another chart which again seems to suggest that we aren’t in the topping out process as of now. This chart is a plot of the % of stocks trading above the 200 day EMA. To ensure that it doesn’t suffer from survivor-ship bias, I have used a database which has both running stocks and delisted stocks.

Image

Between the first time it hit >70 numbers in 2009 till it finally made its high in 2011, Nifty appreciated by 40% and nope, it did not come without its fair share of drama :). And we had a negative divergence in his indicator to boot.

For quite some time I have held stead fast my belief that the time is not yet ripe for a rally of the kind we saw in 2003 or 2009 and have in an earlier post pointed out the same as well. One of my reasoning was that I felt that Modi was unlikely to become the next Prime Minister and markets will be dissapointed and be range-bound for the coming 2 – 3 years before we can see a massive rally.

But a look at the news as well as the odds supposedly offered for a Modi win seems to suggest that I am quite off the target in that prediction (though only the results can finally prove me right or wrong). The big question that needs an answer is, how shall the markets behave if Modi becomes a PM (since its more or less certain that markets will not take kindly to Modi not becoming a PM). Both in 2004 and 2009, markets surprised the expectations held by majority and this time shouldn’t be too different either. The only difference has been in the way markets have behaved in the months going into elections. While in the last two occasions, markets were more or less side-ways till the breakdown / breakout took place, this time, markets have already run up quite far and regardless of whether we fall from here or rise, we shall not see as much of a surprise as 2004 and 2009 was.

And now for bit of heresy 😉

Based on some statistical calculations, this is a note prepared for myself to see if Prediction is possible

Very High Probability (close to 100%) of Nifty falling 12% from its peak during 2014

50% Probability of Nifty falling 24% from its peak during 2014

11% Probability of Nifty falling 36% from its peak during 2014

Upper Range for Nifty – 7000 (High Probability), 9266 (Low Probability)

Assuming 7000 is reached and we form a peak round about there, we can then see a fall to 6160 (High Probability), 5320 (Medium Probability) or 4480 (Low Probability). Of course, all the above calculations are dependent on the peak we reach and changes as the peak value changes.

Adios for now, shall update my thoughts on Nifty after results are declared on the 16th of May.

 

 

Stock of the day – Indus Ind Bank

Couple of days back, I wrote on CNX PSU Bank Index. While huge problems exist for PSU Banks, I believe that if one looks at it with the sector with a horizon of 5 years or more, this is as good a time to enter as any other. Unlike other indices, with Banks, one has the opportunity to enter with a ETF as well (Kotak PSU Bank ETF).

In the short term though, Private Sector Banks shall continue to show good performance and the stock that came to my sights is Indus Ind which (like almost all the big private sector banks) is breaking out (its all time high is now pretty close by and if markets continue to remain bullish, certain to be broken).

Markets are overheated and a reaction is certain – question though is when? I doubt anyone knows and since risk has to be taken at one point or the other, why not take the risk with the trend than trying to predict the end of the trend.

Image

Stock of the Day – Heritage Foods

With elections taking off in India, Heritage Foods which can be called a “Politically linked Enterprise” has been on a over-drive in recent days. But the recent rise is nothing if one shifts the focus from daily charts to Monthly charts for here you can see a clear cut Pole and Flag pattern. If this pattern is true and the stock finally moves to the target area (Pole length is 220 Rupees and breakout is at 250, you do the calculation 🙂 ), this can be a true multi-bagger identified using long term technical charts.

Image 

The case for Draw-downs

The biggest worry for a Systematic Trader is the Draw-down number. Bigger the number, more he worries about his ability to trade the system since it can be  psychologically difficult to maintain composure when a large part of the capital has been temporarily lost. I say temporarily because unless you throw the bath water with the baby, a good system will always see the previous high being re-claimed in due course of time.

Lets face it, you shall face a draw-down no matter which class of asset you put your money in (exception being Fixed Deposit). Equity Mutual Funds / Debt Mutual Funds even Real Estate face a draw-down at one or the other point if one takes in a sufficiently large time frame. 

Many mutual funds for example had a draw-down of more than 30 – 40% when the financial crisis hit the market and this is un-leveraged. Many stocks on the other side hemorrhaged as they lost greater than 50% as the crisis dragged on. So, deep draw-downs are not uncommon no matter what class of investment you choose to make.

The reason for the thought to write about draw-downs came to my mind basically due the exchange of tweets regarding draw-down in Titan during the 2008 financial crisis between Professor Sanjay Bakshi & Debasish Basu (Link). The stock under discussion was Titan which between its high in 2007 and low in 2009 fell by around 62.75%. If a 62% draw-down lasting more than 15 months will not psyche out someone, I doubt anything else can.

Its amazing that while we face draw-downs everywhere, including in life. its only in financial markets that we become paranoid and unable to grasp the longer term picture. Of course, even in life, weak minded people facing a stiff draw-down think of ending the life to end the pain, but for the vast majority, we some how are able to make up for everything and get back to our feet.

Being a very strong believer in systematic based trading, I regularly test ideas that either I develop myself or read about it somewhere else. The one thing that is common in most winning strategies is the huge draw-down. You cannot aim and possibly get 40% return without being ready to risk a draw-down of 60% – 80%. While its easy to talk about Risk to Reward ratio being at least 1:2 if not more, when it comes to draw-down, its always inverse.

One of the questions I am regularly asked is, How can I reduce the draw-down without it affecting the returns in a major way. Unfortunately, markets is all about give and take, you want to reduce draw-downs, you will face reduced returns as well. Just in case if you are wondering as to whether there exists strategies that have a very low draw-down while still having fairly good results, there are.

One is a heavily data-mined strategy which ensures that your historical draw-down is pretty low while compared to the historical returns. Of course, once you start trading that in real time you suddenly see that while the returns remain the same (at best), the draw-down goes completely off scale and unless one has prepared for it, chances of the system bankrupting the user is pretty high.

Second way is if you can game the system. While there is quite a bit of debate on whether HFT’s are gaming the system, I doubt you can have a record like that of Virtu Financial which had just one day of loss (and that too due to human error) while accounting for 1237 days of profit. While Arbitrage is said to be having low risk, this is something of a Zero Risk which is theoretically impossible (free money anyone?) unless they found a way to game the system.

Coming back, I believe that traders are more scared of draw-downs than Investors for two reasons. One, the trader is using leverage which easily balloons up the losses in a short span of time. Investors on the other hand generally have invested in full and would need to pay no more regardless of where the price goes. Getting a call from your broker to arrange for Marked to Market loss every other day can take a toll.

Secondly, a investor can avoid looking at the market for extended period of time during which the price may have come down and then bobbed up while a trader would be stuck to looking at every tick and hence pass through the emotions much quickly. If you are having a position which is under-water and loosing money every day and you hear the talking heads on TV giving out targets which would normally be preposterous, its tough indeed to sit quietly and wait till the things calm down.

Of course, does that doesn’t mean that a Investor is a winner in most situations while a trader is not since we have not accounted for a lot of cognitive biases that affect the way we look at things in life. I for one believe that a trader can compound money much faster than any investor (remember, Leverage is a double edge sword) but that is only if he is able to look at things not in the way its presented but in the way, its impact on the future is. 

To Conclude, a Big Draw-down is not necessarily bad and in the same way a small draw-down may not be necessarily good. Its all relative to something else (all the time) 🙂