Friday, July 11

MACD - One of the best indicators - but not used?


The debate between whether one should use technical indicators or resort to fundamental analysis of the company in arriving at the decision of investing or not investing has a long history. However, sometimes these indicators can work very well - IF USED INTELLIGENTLY.

One of the good indicators that I have come across is the MACD - Or the moving average convergence-Divergence. I don't say that it is the go-to indicator for making your decisions - but what I like about it is -

1. The signals it gives are more reliable then others.
2. The signals - beyond the crossovers - are often leading indicators and can enable you to buy the security/sell it at its lowest/highest.

Let us take an example to make my point clear. I am not trying to focus too much opn how the indicator is calculated - rather on what it says and how should one interpret it.

I'll take the example of Suzlon - A stock that has rallied tremendously in the past 1 year, Reaching an all time high of Rs. 35 before starting its descent. The question we need to answer is - for someone who bought the stock at, say 25 bucks, could have predict the down-turn at 35 and sold at that point.

The price history of the stock is shown below -


We can clearly see the surge in prices in a matter of a few months. An investor, looking at the stock in Jan-Feb would have been able to buy the stock at Rs. 10. Now let us look at the MACD overlayed on this. 



What is a cross-over - 

The MACD is a simple difference of a 12 day and 26 day Moving average. A negative value (below the neutral line) means that the selling activity is present and the prices are going down at a faster rate. A sell signal. However, if you were to rely on this, you would have sold the stock at 24.5 Rs. -Almost 10 busks below its peak. Not so good then. 

The signal line cross over does a much better job as it measures the MACD relative to its own 9 day Moving average. MACD line below the 9 day EMA (White line in the graph) is again a sell signal. However, based on that signal, the value would still have been about 5.5 Rs below the peak. Can we do better?

Let us now also consider the histogram. What it tells us is simply the gap between the MACD and its 9 day moving average. What does that signify? Rising bars in the histogram means that the MACD is moving faster than its average (upwards) and is a strong buy signal. 

Once you see a rising MACD and a falling histogram - it means that the 9 Day EMA is catching up and sooner or later there will be a reversal. I have highlighted the this in the next diagram. 



This time if your are vigilant, you could have sold it for around 32-33 Rs. An improvement of almost 3 Rs./Share. Of course one could combine this with another great indicator like RSI. The overheating is clearly seen before it reaches its peak telling us that it is over-brought. It is actually hard to miss this one! Most of the guys would hve realized this down-trend by the time it touched 32-33. But that is not the case! 



The trading volume actually did not pick up until the value fell to Rs. 30. People were waiting with baited breathe - seen in the abysmally low volumes near the peak - meaning that they would have been continuously monitoring the stock. Had they used MACD - They would have done better! :)

Kidding aside - Some people have this notion that technical indicators are never reliable. However, if you base stuff on solid math they can assist you if not govern your decision making. 

Cheers

Wednesday, June 11

Oh Jesus! to Ohh! Jesus?

It's been a while since I wrote something here. What have I been upto? Basically some books, some gaming and some "consulting-investing" in the stock market besides the "Internship".

The internship was not much and I would rather not talk about it. I would rather talk about a recent book I read.

The Book - 

I usually choose the books I read carefully. Management education significantly increases your opportunity costs of spending time in not preparing PPT's but reading books. This time though - I decided to take a leap of faith and decided to judge a book by its cover. The book was - The Last Templar by Raymond Khoury.

Warning - Spoilers ahead.

For those who have not heard the term "Templars" , let me elaborate. If you know about them and would like to know about the book experience, you can skip the next  paragraph.

When I thought of Templars I imagined assassins who were hired by the holy church to protect them and their secrets. But this was partly true. They were trained fighters who were supposed to protect the people who travelled to Jerusalem for pilgrimage. The more interesting thing about them is how they were wiped out after they grew extremely wealthy and powerful - partly because they become too rich and powerful and more interestingly because they knew some big secret about the church - something that could change the way people looked at Christainity, the Church and even Jesus.

Christainity has had a bloody and mixed past. Spreading your relegion and letting people decide whether or not they should embrace it is one thing. The church took it to an extreme - any person who either refused to follow them or did something that was unrelegious was punished severely. Punished how? Well no points for guessing - Crucified. Sometimes upside down. Ouch!

So what would happen if somehow, one day, Jesus himself came down and said -

"Chaps! Whatever has been written in the Bible - you guys are taking it too seriously. I was a simple guy, a carpenter. I am no Son of God and neither did I come back from the dead. Like all men, I too liked a Lady and one day got her pregnant. The Pope is no holier than you guys and this whole christainity is too hyped. I never intended it to end up this way!"

An FBI agent and a beautiful (like they always are) archeaologist hunt for that ultimate truth that could change the world and shatter the way we look are relegion. So far so good!

What I liked & disliked about the book - 

1. Practical - Even though the author is dealing with something that is thousands of year old, he has done a great job at putting things in the current context. Mass killings, Discrediting Science and forcing people into accepting a faith is something that has always been associated with relegion. Even today, we see people who just do not want the world to advance because it is somehow unholy. I mean, who would have thought that Jesus would have issues with Test Tube Babies. He would have a much bigger issue with countries killing in the name of relegion and people attacking each other because they have different beleifs. 

2. Critical - The author has used the storyline, although weak, to really analyze the things that are wrong with the world today. How we know so less about what we believe in. He has made logical arguments, coupled them with verifiable facts to make you think about whether what you believe in is really the truth or merely a (mis)interpretation of some mortal. Now, that would really piss off many!

The book has a weak story line. Basically, the author tried to do a backward induction. He knew the end - an awesome end I must say - and then worked backwards. This meant, a story with a lot of twists and turns - a bit too much to digest at times. The result - A bollywoond story with "firnag characters" who travel around the world in search of the truth - while a love story runs parallely. A story with too many coincidences loses its charm after a point. This book suffers from that. 

Ultimate verdict. If you are super-free and really interested in knowing about relegion - do go ahead and read the book. Some parts are good where an over-informed crazy history professor reveals some unsettling truths. 



Wednesday, November 20

Philosophy on Love

Why this topic?

It's interesting because we never really think what love is - it's just that intangible "thing" that surrounds us in many forms - love for our parents, love for our lover or love for an object.iT  It is relevant because at some point in our lives we are all touched by it in some form or the other. 

So what IS love?

If we look at the dictionary meaning of love (Yes a Wiki page exists!), we see that it is a form of emotion which leads to a strong attraction or sense of personal attachment in form of kindness, compassion etc. The problem is that although this "definition" tries to objectify love too much - and we know that Love is the last thing that can be objectified. 

Worse still, I personally would be interested in understanding why we love in the first place. Is it some means to an end (I know this might belittle the concept of love for some of us), but one needs to think that their might be some selfishness, albeit of benign nature. in loving someone. It is easier to see this mild selfishness when one talks about Love for good food.. or Love for Beer.. So do we use the term too rashly? Is loving someone the same as loving someone? Do we objectify the "person" we love too? I hope not. 

Philosophers have an answer?

Just like I think about this weird topic at times, many philosophers scratched their beards (almost all of them come with one) while thinking about this four letter word. 

So one of the first ones to "define" love was this bearded old guy, better known to us by the name Plato. He simply said - 

"Love is our search for our alter ago, that part of us that will make us whole again. Love is a remedy for an ancient wound inflicted on us by the gods, who divided us in two as a punishment for our arrogance. Since those primordial times, each of us is only half of himself or herself, searching relentlessly for completion"

Colorful definition. If we ignore the "Gods punished us part" the definition makes a lot of sense. Come to think of it - we often say that we found our better half when we (think) have found love. 

Socrates, yet another bearded guy modified this definition a bit and said that love is not just yearning for completion but yearning for goodness and completion. When we love something, we are really seeking to possess the goodness which is in it. Not temporarily of course, but permanently hopefully. The one interesting aspect of the definition is the search for good - but then are we not always in search of something good - throughout our lives? However, is it not also true that we often fail to find the other half that is the object of their love, the one which motivates their striving - something which they want to possess perpetually

But the irony is that even if one half knows and finds it - the other half may not be competent in realizing the same. That should not be confused with "One sided love" because I think that the fineness of the argument lies in the intensity of love form both sides. Imbalances lead to misunderstanding - never allowing either sides to achieve that completeness.

Love or desire? 

Few people recognize it, for in the confusion of  their lives human beings know that they have desires, but they do not know what will satisfy them. When hungry,  we eat, thinking that food is the object of our desire. But  once we have eaten, we desire other things, and so on, till death (hopefully) puts an end to it. This incapacity leads nowhere and people seldom find love on this path. 

Path to successful love - the bottom-line!

Here I have tried to highlight the key points that lead to true love. It feels weird to put down "bullet points on love" but I'll still do it. 



I'll end it here.. I am a little confused myself. This Love seems like an untamed devil - almost impossible to define and "feel".




Thursday, October 10

More random stuff !


What is Chaos?

These are systems which are non-deterministic. However, the interesting bit is that they are often governed by deterministic equations. The sad part is that it is difficult to reverse-engineer this process. So if you look at a random card generator in a casino, you might think that it is completely random. However, the machine uses certain rules (for the inquisitive minds – look up Rule 30 in 2-D cellular Automata) to generate this card. The trick lies in the difficulty of deciphering this process as they are the closest realizations of true randomness. Chaotic systems are also very sensitive to initial outcomes, a small change in the input can lead to massive changes in the way the future values turn out to be.

Why does Chaos matter for the oracles of today?

Now I hope that most of us agree that many things in life are chaotic and this is what makes them interesting. Say you are at some state and want to predict the future – assuming the system is chaotic – the initial error can accumulate and lead to massive difference in the prediction and the future reality. Added to this there might be some Black Swan (See previous post!) awaiting you. I know it is a bit fuzzy and abstract at this point – So let us take an example – Sorry but the math cannot be delayed anymore!
Say we have a function – x (n+1) = 4*x(n)*(1- x(n))

For Slightly different starting values – let’s see how the future values turn out. I made a small graph for some (read just 3) values. The errors in the initial input are less than 1.5% and yet the future prediction can be way off. If we start at 0.75 (highly unlikely) it turns out to be a very stable outcome. Now think of anything that diverges from this as your prediction error and look at your ability to predict. This clearly highlights why prediction systems often fail! Moreover, we seldom know the precise form of the equations and often calibrate it based on past data. Imagine what a 5-10 % error (acceptable by many standards) can do to your predictions! So we need to know whether the things that we predict – markets, weather and book sales are such chaotic systems.

The financial market analysts who “claim to” know the way the market will behave rely on the equations (not developed by them) to do this. Given the present state – the future should be deterministic they say. However, what they fail to realize is that such equations are extremely sensitive to inputs and often ignore (Alas!) the “highly (im) probable but highly consequential” Black swans.

You can't see the future precisely because you don't really know what's causing it. This is the huge problem with us. We almost always justify things and associate a cause to things that were unexpected before they happened. As Taleb says – “We attribute our success to our skills and our failures to all external factors beyond control”.

How do we deal with Chaos? We despise it. In-fact order is substituted with elegance. Remember the time when you saw an elephant shaped cloud? This might be the pinnacle of our ignorance – how we want to simplify things, put them in order for our convenience. The only sad thing is – reality is a zillion miles away! As a result we often see luck being mistaken as skill in many places (think if those intelligent investors).

The problem does not end here –

Till this point I have argued that we are terrible at predicting. It gets even worse when we try to justify our forecasts and fail to learn from history. However the problem bigger problem is – we are always too optimistic about stuff. We tend to over-value a lot of things in the present and this is bound to make us suffer in the future. One important idea made famous by Rob Shiller (Yale) is that of “Irrational exuberance”. How we attach a irrational/sentimental value to things we possess – making them seem more valuable in the present. At the risk of making the discussion less general, lets venture into the field of economics (surprise!).

Sunday, June 2

Updates

Yeah! This one would rather be an update on what has happened in the past 6 months (since my last blog) rather than one of my deep insights as usual. :D

So half an year has already has passed and it has been one of the most uneventful periods. Not that I had many resolutions in mind. You lose weight automatically in a place like Chennai and you don't have money to booze and I guess those are the top two things on many New year resolution lists.

Apart from the few trips I made (2500 km - 4 day - Kerala and Ooty - Road-trip) the last semester was packed with indolence (without the pleasure). Days and days were spent doing things that one is not expected to do in college, taking a philosophical look at life, subverting the usual and boring monotony. I also finally managed to finish Fountainhead (Ayn Rand) which had been on my shelf for the past year with a really frustrated book tag residing in its pages. I had ample time (more than ample I'd say) time to catch up on a few TV series. That is becoming my new idea of adventure - Sad!

As usual, my procrastination let me down once again (as if I was expecting something else) and much of my final year project work was done in the last 2 months (it's an year long work schedule - ideally!). A visibly "pained" (apologies for the lingo) professor asked me to take an extension and said that he has no clue how I should manage my thesis, courses and other things. Sadly, neither did I.

On recent happening - the IPL controversy. Yeah! It's hard to ignore a bunch of losers making a mockery of the game I (used to ?) adore so much. Why Mr. Srinivasan was kept the chairman after having such a stake in CSK? Just like many other Indians feel, it's a mystery to me too. But that is Indian politics (if I may call it that, since more than half of the "managers" are politicians and won't know the difference between a doosra and a yorker) at its best.

Looking forward - Inspired by Mr. Robert frost, I have decided that I would rather go against the natural flow of things, There seems to be some fun left in disturbing the natural order of things. Hopefully it would pay off. Would be finally leaving the southern part of the country where I somehow managed for 5 years. Loved every bit of IIT and despised every bit of Chennai (the weather is to blame)!  :O