Wednesday, December 03, 2014

I live in a world where each passing day my medical bills keep increasing, sometimes due to bad life choices and sometimes due to corporate avarice. I pay our annual insurance bill out of my salary, and keep my fingers crossed that nobody in the family falls sick. Also I know how difficult it is to get insurance claims sometimes - claims denied, claims not paid on time, coverage not applicable to our elderly parents who need it the most. Lately I have also realized that the coverage offered by our company doesn't seem enough so I have been mulling over a "top-up" medical insurance.

So after mulling over it some, I had an epiphany that would allow me to sleep more peacefully and yet will take care of the medical needs of my family in the years to come.

What industry benefits when we fall sick? Pharmaceuticals. What industry benefits when we want to stay healthy? Pharmaceuticals. What industry benefits when we want to become fitter? Pharmaceuticals. So the epiphany I had was why should I not buy some pharma stocks and gain from their gain? The question that came back is how profitable would it be? Will it compare favorably with getting medical insurance? Is it possible to beat the insurance coverage provided by the health policies. Well, as it turns out, its not easy but it can be done - not in the short term but definitely in the long term.

I am not that well versed with financial statements and all the "research" tools adopted by my friends who work in core finance. But I do have the common sense to look around and find out which are some of the decent pharmaceutical companies. Also my family has some connection with pharma industry. Based this amateur knowledge I went looking for pharmaceutical companies and picked up two randomly - Cipla and Sun Pharma - and ran some numbers.

I first take the stock price of these companies every year for the last 10 years on Nov 25. I then buy stocks worth 10000 every year. Here's what I found. For an investment of 1,00,000 over the period of last 10 years, Cipla is currently worth 2,71,000. That's a 11% return compounded annually over a decade. That's probably the medical cover provided by my group life insurance. If by some chance I had instead picked up Sun Pharma the current value would have been 6,87,000. That's a 21.5% return over the last decade. And certainly more than any medical cover given by any group health cover.

On the other hand if I had disregarded medicine and was more of a believer in general health and fitness, I should've recognized Horlicks, Eno, Iodex, and others. For the company is called GlaxoSmithKline and the same 1,00,000 over the past decade would have returned me 7,14,000. An even nicer 21.8% annually. And all these are excluding any dividends. Plus these are long term gains so I don't pay any taxes.

Now here's the zinger. This is money just in a decade. Over 4 decades out compound like crazy. No medical insurance policy will ever match it. It becomes ever more important because as we grow old insurance becomes costlier. After a certain age I may actually find it difficult to get insurance. But this investment can become much more than that. And if I keep healthy this money is mine to keep - a money back policy.

Friday, October 24, 2014

Over the years I have tried to learn as much about capital markets as possible. It's a fascinating industry that lubricates the wheels of industry and economy. Without the modern capital markets quite a few of our beloved innovations would have been challenged. I maintain that our capital markets, as they are, are necessary (but maybe a little lopsided with respect to rewards to those employed - that's for another post)

Lesson one (or maybe Lesson Zero) - Asset Vs. Liability

Every investor has to first learn the hard factual difference between an asset and a liability. I have very painfully over the years understood this and got to a stage where the incremental liabilities have been reduced. Well, I never had loans or credit card debts but I was engaged in activities that cost me money instead of creating wealth. One such is the bike I own - a Royal Enfield Thunderbird 500. No doubt its a great machine and lots of fun to drive, but its maintenance is akin to owning an elephant as a pet - impressive when you ride, but otherwise keeps draining your resources. The last time I had a flat tyre, my laziness took over and I got it repaired only after 3 weeks - 3 weeks of no expenses. Otherwise every other month, the bike goes to the service center and costs me money in repairs - small trickle but endless nevertheless. As with all liabilities, it brings no tangible value to me. And the intangible joy element - I should have stuck to my old Pulsar, since I am more of a traveler than a motorcyle enthusiast - so long as the two wheels move my soul, I am at bliss.

Lesson two - See things for what they really are.

Investing is not rocket science. If you have common sense, you can become a very good investor yourself. As your investments grow, your knowledge grows and you become even better. But for this to happen, one must first accept and overcome one's blind spots. As a layman, one must begin to see everything in front of them for what it truly represents. Coming back to my acquisition, the TB 500, I massively failed to realize of what it truly portends. I understand bikes. I understand the passion that a "Bullet"/ "Royal Enfield" invokes in millions in India. I have been meaning to own one since ages. Back in 2012 when I test drove the new Thunderbird 500, I fell in love with the modern machine - the ease of handling, the power of the engine, the stability of the ride. This was beginning of a new era for Eicher Motors. With that one machine they unlocked the potential of the brand. As an enthusiast myself, I instinctively understood the thousands of dreams it was going to fulfill. What I completely missed is what it would do to the balance sheet and profit & loss number of the company. As Peter Lynch says in his book "One Up On Wall Street", I need not be brilliant to launch my portfolio into an orbit. I simply need to keep my mind open. With the launch of the modern bike, the only way for the revenue numbers of the Eicher Motor Company to go was up.

The magnitude of the mistake

So the mistake I committed - The stock price of Eicher Motors rose from Rs. 2258 (Oct 1, 2012 when TB 500 was launched) to Rs. 11890 (today) - that's 5.26 times. Rs. 35,000 invested in the company stock at that time would have allowed me to buy the motorcycle today without any additional expense, a mere two years later. And if I had been wise enough to have actually invested the whole amount I spent in actually buying the bike at Rs. 178,000, I today would have had a cool Rs. 936,000 and could have bought the new 'Cafe Racer' with money to spare. Instead all I have now is a liability that sucks money out of my poor incomes.

There are several mistakes I have made with money, but this one rankles quite a lot. Happy Deepavali folks!

Tuesday, May 01, 2012

I recently was given to work with an existing Amazon EC2 AMI without having the benefit of the previous key-pair. Additionally when the AMI was created the Set Password was not enabled. This led to the problem that even though the AMI could be used to launch a Windows EC2 instance, we could not login.

To surmount this, we need to make use of an Ubuntu linux instance launched on Amazon EC2. Following steps help in recovering the password.

Launch a Windows instance from the given AMI. Use your own or newly created Key-Pair.

Stop the instance and detach the volume which contains the root partition. This is usually /dev/sda1. The root partition contains the setting for Set Password. (C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml)

Launch a micro Ubuntu server instance. We do not need a larger instance since it is a simple operation.

Attach the volume detached in step 2 to the Ubuntu instance under /dev/xvdf.

Login into the Ubuntu instance via ssh or whichever way you do.

Create a mount point sudo mkdir /opt/tempm/

Use fdisk to check the correct volume to mount sudo fdisk -l This will list two volumes - /dev/xvdf1 and /dev/xvdf2. Of these xvdf1 is the boot partition, and xvdf2 is the one containing the requisite file.

Mount the Windows NTFS volume onto this directory using: sudo mount -t ntfs-3g /dev/xvdf2 /opt/tempm/ Take care to include the "2" in xvdf2 otherwise you will get errors.

In this file, change the tag from "Disabled" to "Enabled". Save and exit.

Unmount the volume sudo umount /opt/tempm/

Detach the volume from the ubuntu instance and reattach to the Windows instance. When attaching to the Windows instance take care to use the right mount point - "/dev/sda1". Otherwise the disk will not be treated as a boot partition.

Start your windows instance and use "Get Windows Admin Password" to recover the password using your new key-pair.

Note: Obviously if the "Set Password" had been set correctly while creating the AMI, this problem should not have arisen. Please let me know otherwise in the comments section.

Thursday, March 29, 2012

I have been mucking around with Cassandra to see how big data works. I am mainly a Java programmer and needed a client to use in Eclipse to connect to Cassandra. In comes Hector. There is the Cassandra tutorial. I am essentially still on the Ant system (will learn Maven someday for sure). Now it requires that I have the correct libraries in the classpath to run the examples.

List of libraries required to run the examples using Cassandra 1.0.8 and Hector 1.0.6:

apache-cassandra-thrift-1.0.8

commons-lang-2.4

guava-r09

hector-core-1.0.3

libthrift-0.6

slf4j-api-1.6.1

uuid-3.2.0

This isn't exhaustive. One could possibly include all the libraries in the Hector-core. Some of the jars can be found under cassandra/lib folder. Additionally, the Hector project now tracks the Cassandra versioning system. So look for an upgrade to 1.0.8 sometime soon.

This post is intended more as a collection of sources than a tutorial. Hopefully will update this into a full blown "how to" guide.

Monday, August 23, 2010

It had been a long time since I had read fiction at any length having being busy with work and myriad such excuses. So when I had made up my mind that enough is enough, I went around, asked and looked for a good read. Given the history of my reading habits, I knew nothing short of great would get me interested. And then I found Stieg Larsson of The Millenium Trilogy fame and his lead protagonist Lisbeth Salander.

At the very outset I will admit that I have been bowled over completely by the contemporary and adult storyline, that involves themes like hacking, espionage, secret service, sex, activist journalism, and a potpourri of themes without losing the actual thread of the story.

Lisbeth Salander is one awe-inspiring woman, inherently moral and very much the sociopath in the everyday sense of the word. But she's much like John Nash, in that they share the common belief that if I can think, I can do pretty much everything. Remember that John Nash defeated schizophrenia by thinking and analyzing. Lisbeth Salander destroys the secret behind the all powerful sapo, the most clandestine of operations in the Swedish secret service. While some reviewers frown upon the use of violence by her as illegal, I like the fact that an individual is able to defend her own space when the system has not only ditched her, but also has systematically exploited her for its own needs and ends. Her individualism stands out almost in an Ayn Rand way - remorseless and unrelenting. And it is probably the same when she bonds with people she likes and respects - complete and without inhibition.

The other main character is that of Mikael Blomkvist, an investigative journalist who lives to make that next expose that will bring down the most corrupt, whether it be humongous corporations or secret within sapo. He also lives to make love to strong women. And he does both with nuance and flair, treating them like the art that they really are.

The book left me flipping pages as fast as I my eyes could travel and my brain could process. Besides the storyline of murder, mystery and intrigue, the book trio also paints such beautiful colors and bleak shades of gray of the Swedish people, culture and countryside, that by the end you feel that you know it all. And did I add that all topics are dealt in such detail so as to leave the layman spellbound and the connoisseur impressed.