Tuesday, November 29, 2016

How does a bank work?

A bank offers a number of  financial services among which, two are primary: It helps people to keep the surplus funds in safe custody and it helps people in need of money to utilise the money for a fee. The utilisation fee is called "interest".  A bank acts as an exchange between the "haves" and "have-nots" (usage not in the traditional sense) - As in modern times (with the traditional usage of the terms), it is the "have-nots" who keep the money and the "haves" who utilise that money - okay, leaving that aside.

Banks have to carry out the daily operations, pay the salaries of employees. Over and above, banks have to make profit to sustain in the business. So, they keep pocketing a portion of money that they get as "interest" from the borrowers and pay the remaining as the interest to the depositors. The depositors are of two types: "I want my money any-time when I ask" and another with: "Keep the money for 1 year, 2 year and give me at the end of the period" - The first category of people are the ones who keep savings account and current account with the bank - and because of the additional privilege of having money any time they need, the interest they get is typically lesser than the people who ask the bank to keep the money for a defined duration of time. Savings bank earn around 4% and there is no interest for the current accounts.  So, effectively there is a trade-off between higher interest versus liquidity. People would be willing to forgo a portion of their interest for the convenience of taking out money any time.  Between a savings bank and current account (the difference of 4% versus 0%), there exists a convenience premium for the current account holders to get money even when there is no balance left in the account (a facility called "over draft")

The Current Accounts / Savings Accounts (CASA) are the "demand liabilities" and the fixed period deposits are the "time liabilities" - Any deposit with a bank is a liability for the bank - it needs to pay back and also there is a continuous cash outgo from bank because of the same.

The borrowers take money from the bank for a fee which is ought to be paid monthly / quarterly or any specific period as agreed with the bank. Here again, the borrowers with whom the bank has enough trust in terms of past history or in terms of quality of the collaterals collected for the loan, get an advantage in terms of lower interest rate.  Borrowers with not so great credit background will have to pay more for the same loan, because the bank is taking an extra risk for which it needs to be compensated in the form of an additional interest.  When I say "high credit quality", it means the  probability with which the loan becomes a non performing asset (regular interest not being paid) is lower.

A bank cannot say to a depositor that 10% of its borrowers defaulted on the loan, so the depositors will get only 90% of the money. Because a bank offers such a protection, there must be a fee (which it gets in the form of interest rate difference between borrowing and lending) So, effectively, the depositors are lending to the borrowers with bank acting as an intermediary and taking the entire risk in the process.

What happens if some loans go bad? If the interest is not being regularly paid, beyond an acceptable limit, say 3 months, banks will treat the loan as non-performing asset (Means, loan is an asset for the bank because it generates the income - and since the interest is not being paid regularly - it is a non-performing asset). Once marked as non-performing asset, banks have to provision for the possible losses from the loan.  So, the provision takes a hit on the profit for the year. As bad loans increase, provisions increase. The sustained hits on profit later translate to a hit on the reserves and surplus, and slowly wiping off the equity capital of the bank, in which case the bank fails.

A bank is as good as its asset quality.

Thursday, November 24, 2016

Primer on NPS

Quick Facts on NPS

NPS - New Pension System (also referred as National Pension System) is a contribution based retirement system promoted by PFRDA (Pension Funds Regulatory and Development Authority)

Tax Treatment:
Similar to PF, there can be contribution by employee and employer
Max contribution: 10% of (Basic + DA)
Employee Contribution: Falls under the limit of Rs 1.5 Lakh per annum - section 80 CCD (1), with other 80C schemes. (similar to how employee contribution of EPF is treated)
Employer contribution: 10% of (Basic + DA) is exempted under Section 80CCD (2) - this is beyond Rs 1.5 Lakh limit (similar to how employer contribution of EPF is treated) - i.e, not treated as income at all.
Additional Rs 50000 per annum (beyond Rs 1.5 Lakh limit) can be availed under Section 80 CCD (1b)

NPS has 7 fund managers to choose from - HDFC Pension Fund, ICICI Prudential Pension Fund, Kotak Pension Fund, LIC Pension Fund, Reliance Capital Pension Fund, SBI Pension Fund, UTI Retirement Solutions.

There are two accounts with NPS - Tier1 and Tier2.  Only Tier1 is eligible for tax benefits for investments.  Tier2 is more like an add-on for investor convenience.  Amount can be moved from Tier2 to Tier1 and not vice versa.

Amount contributed towards NPS gets invested in 3 different schemes - equity, corporate bonds and government securities. Investor can choose to invest in Auto mode or Active mode. Maximum possible contribution in equity scheme under both modes for any age is 50%.  Investor can choose to split the investments in Active mode, whereas in Auto mode the investment contributions get split as per investor age.  Rebalancing according to the target split happens yearly once on the date of birth of the investor.

The scheme details under each of equity, corporate bonds / govt. securties (E C G respectively) of Tier 1 and Tier 2 are available in the individual pension fund site
http://www.reliancepensionfund.com/navs/portfoliodetails.aspx?shortname=portfoliodetails
http://www.sbipensionfunds.com/portfolio-detail-system.html
http://www.hdfcpension.com/about-hdfc-pmc/investment-portfolio-details/

Minimum contribution
Tier1:
Minimum Number of times in a year: Once
Minimum Amount Contributed in a year: Rs 6000
Tier 2:
Once per year, Minimum Rs 250 (subject to a minimum funds available in Tier 2 of Rs 2000)

Fees
Minimum of 0.25% or Rs 20 per contribution (taken at the time of contribution)
0.0275% of funds under management for asset management, custodian and NPS Trust (adjusted in NAV)
Rs 190 per year for account maintenance taken by cancelling units in each of C, E, G

Withdrawal from NPS:
Possible only after age of 60
    A minimum of 40% to be utilized in purchasing annuity
    Maximum 60% can be taken as lump-sum
Premature exit
    Minimum 80% to be utilized in purchasing annuity

Taxation
    40% of withdrawal not taxable (only the available 20% lump-sum in case of premature exit)
    60% taxable - irrespective of lump-sum or annuity. Lumpsum taxable at marginal tax rate as per investor income slab for the year.
    Annuity purchase is not taxable, whereas the monthly payments from the annuity is taxable at appropriate slab.

Deferment of Withdrawal
    Defer annuity for 3 years
    Defer lumpsum withdrawal for 10 years
    Take lumpsum in a staggered manner in 10 installments.
    The entire withdrawal process can be deferred for another 10 years, during which contributions have to be made.

As of now, the following are the annuity providers from whom the annuity can be purchased.
    HDFC Standard Life Insurance Company Limited
    ICICI Prudential Life Insurance Company Limited
    Bajaj Allianz Life Insurance Company Limited
    Reliance Life Insurance Company Limited
    Star Union Dai-ichi Life Insurance Company Limited
    Life Insurance Corporation of India      

More Info:
    https://www.npscra.nsdl.co.in/all-citizens-faq.php
    http://www.hdfcpension.com/national-pension-scheme/nps-account/)

Now, analysis:
Assume a person of 30 yrs age is thinking of investing Rs 50000 (under extra tax exemption limit). He falls under 30% tax bracket.  He has 30 years time frame and two choices to make
   1. Go with NPS
   2. Pay tax and invest the after-tax amount in something similar
 
Let us assume the long term investment return over 30 years is 12% p.a.
 
Option 1:
   50000 * (1.12 ^ 30) = around Rs 15 Lakh
   40% withdrawal is tax free = Rs 6 Lakh
   20% withdrawal is taxed @ 30% = Rs 2.1 Lakh (after tax)
   40% withdrawal is utilized in purchasing annuity.
A quick look at  http://www.sbilife.co.in/sbilife/images/contentimages/AnnuityPlus_bi.htm shows that for a pension plan with refund of capital, the annual return works out to be 6.43% (after adjusting for service tax while purchasing annuity) pre-income-tax and 4.5% post income-tax at 30%   Rs 6 Lakh would give a monthly taxable pension of Rs 3218 and an effective post-tax pension of Rs 2252
 
Assume the person is living till 75 years of age and his hurdle rate is 10%. i.e he can borrow funds at 10%.
   With the post tax cash flows from annuity and his hurdle rate, this works out to be Rs 3.5 Lakh
   With 70 years life expectancy - this number will work out to be around Rs 4 Lakh.
   With 85 years life expectancy - this number will work out to be around Rs 3 Lakh
 
   @12% hurdle rate:
   70 years: 3.46 Lakh
   75 years: 2.94 Lakh
   85 years: 2.47 Lakh
 
   So, the total cash proceeds @ age 60 can vary from  6 + 2.1 + 2.47 = Rs 10.57 Lakh to 6 + 2.1 + 4 = Rs 12.1 Lakh depending on life expectancy and hurdle rate.
 
 
   Option 2:
   35000 * (1.12 ^ 30) = around Rs 10.486 Lakh (Assume 50% equity and 50% is is Corp / Gov bonds)
   50% Equity LTCG is tax free.
   50% C / G LTCH is taxable in indexed fashion. So, 5.243 lakh - 17500 = Rs 5.068 Lakh is LTCG, which is Rs 88250 adjusted for indexation.
   Tax payable @ 30% on Rs 88250 Lakh = Rs 26475
   Net Cashflow at age 60 = Rs 10.486 - Rs 0.26475 lakh = 10.221 lakh
 
There are some questions to be addressed.
1. What happens on the death of NPS investor before 60 years of age?  Will nominee have to pay tax - to what extent?
2. When NPS is deferred for 10 years till age 70 and contributions are made, what happens in the event of death.

40% is taken tax-free. 20% is taxed (Less 6%), 40% is taken as annuity which one never sees it again, except in the form of monthly pension - which is constant all through his life expectancy.  No way to increase or decrease pension.

Even, with current tax benefit, the positive side is around Rs 0.35 Lakh to Rs 1.88 lakh which in current terms with the same long term return (12%) assumed is around Rs 1170 to 6275

All this, assuming the current 30% tax benefit. And after accounting for the 2016 change in tax treatment (that 40% of NPS corpus at age 60 is not taxable).  Otherwise, NPS makes no sense at all.

Still, one loses the independence by locking in the money for long term and locking in by purchasing the annuity for even longer term (possibly)

Take away:
1. Do not purchase beyond 40% of corpus in annuity.
2. While choosing annuity option, go for annuity with corpus refund - otherwise it is too risky if the investor dies very soon after purchasing annuity.
3. Defer it by 10 years, then defer annuity by 3 years

Wednesday, November 23, 2016

Talks at Google: Mohnish Pabrai and Guy Spier

I wrote about reading the book Checklist Manifesto, a few days back.  The author Dr. Atul Gawande talks about his interview with Mohnish Pabrai, a renowned investor.  Mohnish Pabrai says that so many investing ideas pops up every day, which pumps up the adrenaline - but, as you put those ideas through a well prepared checklist, you would sense most ideas are baseless and may not be pursued.  I have heard about Mohnish Pabrai, but have not attempted to dig deeper.  Yesterday I saw one of the google talks where Mohnish Pabrai and Guy Spier (who has written the book "The education of a value investor") speak about their experiences.

On watching the video, I became a fan of Mohnish Pabrai!  What a clarity of thought, and what narrative style he possesses! He talks about his investment in Satyam in 1994 / 95 time frames and how in a span of 5 years, he has made his $10000 to 1 million+ and got back the same in USD, sitting in USA.  That is a 100 bagger for him.  He says when he looked at the financials in 1994, he sensed Satyam was massively undervalued.  The real estate it owned in Hyderabad might have been above the market cap.  On another opportunity, he says, irrespective of high valuation of PeopleSoft when he decided to make money out of that, and having not invested, created a back door entry in the form of selling PeopleSoft consulting / services and made a high margin business out of it, with effectively a negative capital!

He shares his experiences with an industrial psychologist in 1999 / 2000 time frame who provided him with his "owner's manual" and how it helped him in becoming better at his focus areas.  He recommends everyone to have an "owner's manual", by consulting with a trained psychologist! The personal experiences are candid and succinct. He also shared two of his failures where he came out of a stock in 3x or 4x multiples which eventually became more than 20x or 50x

Mohnish and Guy Spier successfully bid for Lunch with Warren Buffet in 2007 and in this video, they talk about the surprising fact from their perspective in that lunch.

This is a 2015 Google talks video.  After more than 1.5 years, it has hit only 28k views!  Strong recommendation to watch.


Tuesday, November 22, 2016

Comparison of MFs - 3 Year CAGR

I proposed how a point in time comparison of CAGR across mutual funds may not give much information.  Yesterday, we saw how the CAGR return distribution of 3 year, 5 year and 7 year in the same fund fared against each other.  Today we take a specific set of 3 funds - no recommendation - the funds have been in operation for a longer period of time.  UTI Equity Fund, Birla Sunlife Frontline Equity Fund, Franklin India Bluechip fund.  For these funds, 3 year lump sum investment CAGR is calculated for 7 years. For investments from Apr 2006 to Apr 2013.  So, the total number of data points would be around 250 * 7 = 1750 individual lumpsum investments.

A cumulative distribution plot is generated for the 3 funds which look like below:




Median return of BSL Frontline is better than UTI Equity which in turn is better than Franklin India Bluechip. And if you look at y=0.25 line (at 25%), we get that 75% of returns are upwards of 9% in UTI Equity and upwards of 8% in the other 2 funds.  Take the y=0.75 line, 25% chances that the returns are around 16% in Franklin India Bluechip and around 20% in the other two funds.

To view in terms of returns, for a 15% or above return, BSL Frontline has a 45% chance (1 - 0.55) and 38% chance with UTI Equity, 33% chance with Franklin India Bluechip.

In general, the curve on the right is better - for the same return you get a better probability. In a real scenario, we would never get these lines running parallel, so you can choose the one on the right most!

Monday, November 21, 2016

Equity is a long term investment

We recently saw that it may not make so much sense taking a single point return (as on a particular date).  Instead of looking at a MF scheme page and assuming it gives a CAGR of 12%, 14% and 13% respectively for 3, 5 and 10 years, how about actually getting a sense of how the return distribution looks like over a large set of data.

Here, I have tried to plot the return distribution for a large cap equity fund.  The data is taken from AMFI website.  The data is available only from 2006. I have taken 7 years data (making up for around 1750 data points) for 3-year lumpsum investment, 5 years data (1250 data points) for 5-year lumpsum, and 3 years data (around 750 data points) for 7-year lumpsum investment.

Here is the graph that we get:
Red, Green and Blue represents the 3 year, 5 year and 7 year return distributions respectively.  Some points to observe: The returns are not negative (no loss of capital) in the 5 year and 7 year investments - but be aware that the data points considered are less and may not even cover one investment cycle or business cycle.  But, the 7 year investment would have had investments made in the high of Jan/Feb 2008 and redeemed in Jan/Feb 2015.  Still, it did give a positive return.  There is 75% chance (observe the horizontal line of y-axis=0.25) that the CAGR is minimum 9% in 3 and 5 year lumpsum and 11% in 7 year lumpsum. Median CAGR is 13%, 12% and 13% respectively, means there is a 50% chance that CAGR is minumum the median amount.

25% chance that the CAGR is minimum 16% in 5 year and 7 year lumpsum investments and a minimum 20% in 3 year lumpsum investment.  Also, see the shapes of the curves.  The 3-yr red curve deviates widely compared to green (5 yr) which deviates more compared to blue (7 yr).  Means, the volatility in terms of observed CAGR increasingly gets reduced as the holding duration increases.

The dataset taken is very minimal but you get the idea. Equity is for long term. Better to hold for a longer term!

In next post, we shall see how we can use this for comparing mutual funds.

Sunday, November 20, 2016

Reading an MF scheme overview page

If you visit any MF scheme page in one of the consolidation websites like morningstar or valueresearchonline, you would see something like this.





So, this page gives a comparative performance of the fund with respect to the benchmark and category in several time buckets - Year To Date, 1 Month, 1 Year, 3 Years, 5 Years and 10 Years.  This also gives the rank of the fund in the category and total number of funds in the category.  For instance, in this example, I have taken a mid cap fund.  The percentage within one year are absolute return percentage and beyond one year are CAGR - Compounded Annual Growth Rate. You would also see the growth of Rs 10000 in the said period of time.

But, please make sure that you are not selecting an MF scheme to invest in, based on this page.  Though this seems to give performance across time periods and across funds, neither is true.

Make a strong point in memory that all the numbers that is quoted in the page are as on one particular day - here it is 18th Nov 2016.  And the growth of 10000 or the percentage numbers are what you would have got if you had invested before 1 yr, 3 yr, 5 yr or 10 years.  So, it is all hindsight information - may or may not become valid in the years to come.  The numbers and ranking will be different if you see the page after a week or month.

And you never know against which funds are you comparing. Some funds may exist in 5 year time period and may not be present in the 10 year time period. i.e it would have commenced between 5 and 10 years ago.

A better benchmarking for a 3 year return would be to get a view of how a 3 year return distribution is across some 3 or 5 years.  To get a 5 year of 3-year return data, you would need data points for 8 years and to get a 5 year distribution of 10-year return data, you need data points for 15 years.

Saturday, November 19, 2016

Checklist Manifesto

Just finished reading the book "Checklist Manifesto" by Dr. Atul Gawande.  The author is a specialized surgeon practising in Brigham's and Women Hospital, Boston.  The book, in essence, elaborates the importance of having a checklist in routine practice, especially in situations where the stakes are higher - like flying an airplane or surgery.  He describes how he got the idea of having a checklist for surgery and how such a checklist is already in practice in several fields - from an artist performance, restaurant chef to aviation.  In aviation, such a checklist has been in practice since 1930s. He takes us through his initial trial of checklist in surgery and how he failed, later how he got the checklist fine tuned and made better taking inspiration from aviation.  Dr. Gawande gives a very detailed note on several case histories in both aviation and in surgery.  The narrative style with which he tells the story is interesting and got me hooked.  Some of the surgeries he described in the initial few chapters - thrilling!

Making an error and forgetting about having made the error is common. Having a checklist helps in accepting that fact and helps in taking precautionary steps the next time.  The examples from investing - Mohnish Pabrai, Guy Spier and categories of investors in the venture capital area depict how having a checklist helped the investor prevent errors and in several occasions making faster investment decisions.

The author takes us through the WHO initative on preventing the avoidable errors, checklist proposal and a test trial run in hospitals in 8 different cities across the world for 3 months and how having a checklist helped reducing surgery related complications and deaths significantly.  The way he looked for the counter evidence once he got the initial reports of the test trials is an antidote to typical confirmation-bias.  He goes and analyses whether the surgeries in trial period is less complicated, whether there is a Hawthorne effect etc.

In the process he meets several people - a restaurateur, a construction site builder / architect, investors, aviation experts.  He gives a complete narrative of a fine dining restaurant with several dishes is managed for an evening dinner for about 150 guests, how a high-storied building is constructed - work alignment and communication being the key, how team work becomes very crucial in surgery and aviation and how the checklists are designed to improve communication and team work.

The author is a surgeon, but the intricacies of account on building construction and aviation, where enough time spent in the book makes us go to the construction site and also fly with the crew and passengers and experience the thud of aircraft crash landing and the chillness of the icy water after one such aircraft landed on the water.

Friday, November 18, 2016

Mutual Fund Portfolio Scanner

Ever wondered what are the constituent stocks in an MF? This public disclosure is available in individual mutual fund websites.  This disclosure also gives information about how many shares of each stocks they hold in a scheme, the market value and weight of each stock in the scheme based on the market value (all, as at the end of previous month). Money control and Morningstar collates for various schemes across mutual funds.  For example, to see the detailed portfolio of Kotak Select Focus Regular Growth in

Morningstar
Moneycontrol

Let us say, you own 5 different mutual funds - may be one ELSS, one balanced, one mid cap, one liquid fund and one multi cap fund. Now, you have different quantum of amounts invested in each of these schemes.  But for you, all these 5 schemes with appropriate weight put together is your portfolio.  You want to have a consolidated view of stock and debt investments happened through these 5 schemes.  This portfolio scanner tool helps in getting information from across different schemes, collate the similar stocks and debt instruments and presents an overall view.

For example let us say there is a sample portfolio of Rs 1 Lakh each in HDFC Tax Saver and UTI Mid Cap Fund. Here is how the consolidated stocks stack up.




This is a snapshot of the sectors




And here, are the instruments in the Rs 2 Lakh portfolio (of 1 Lakh each in HDFC Tax Saver and UTI Mid Cap Fund)




And this view helps searching for a particular stock and how the total value in the stock is split up across the MF schemes invested in.



The online MF portfolio scanner is published here. You need to upload the portfolio of various MF schemes in an excel file (.xlsx). The excel sheet has to have a single sheet named "Portfolio" and have 3 columns to be populated as depicted in the below template.  The file name column is just an identifier for the MF and the application saves the portfolio of the scheme in the said name - it might save in the server, you will not be able to see that.

Thursday, November 17, 2016

Loan Amortization

I see a few otherwise prudent people getting into housing loan and trapping themselves.  The story goes something like this. Often people see their friends and friends of friends purchasing houses in various cities and the talks in social connects involve how someone purchased a flat for Rs X near a new suburb and suddenly the price shot up to Rs 1.6X, often ending with some statement like, "If we think of buying a house at this point in time, I definitely cannot afford it.  It was so fortunate and with god's grace that I happened to purchase this house 5 years before"  And they want everyone to give them post-purchase approval and satisfaction.  They make statements like, "See how this area has developed.  Who would have thought this 5 star hotel and that huge mall would come here even a few years before".

Ok, now people who thought of saving and purchasing a house, they start to get tempted. And this story repeats itself in multiple occasions for the "saving" people to ignore it completely.  And that's when the "home-buying" bug hits them. "We need to get a house. Dot!"  But the outskirts areas in the cities are not affordable, so they settle something on outer-outskirts, the nearest to nearest district of the city they would want to work, consoling themselves, "These areas are the new bright spots, see how the place will look like a few years from now".  A few years from now moves on and the area remains the same.  The people who bought with that only hope are now in denial - how could they have made a wrong decision.  The problem is not every area will develop in the same pace and the development takes into account multiple factors - no one will be able to judge or predict.  For every owner who said their area got developed so fast in so less time, there will be 5 others who said the place is just as it existed 10 years before.

The problem is with the people who are buying houses not to live in but considering it as in investment.  House, especially an apartment is never an investment.  The rental yields are so low - around 2 to 2.5% and the building value actually depreciates over the years.  It may sound like an investment because of the development that happens around, in certain instances. They get into huge loans for the entitlement of "I own a house now!" and "It is a great investment",  "I do not want to miss the opportunity now".

By the way, until the loan is paid off, the house belongs to the bankers!  Now coming back to the topic: loan amortization.

Consider this scenario: An apartment costs 30 Lakh Rupees (3 Million Rupees) for which a loan of Rs 20 Lakh taken at 10% to be repaid over 20 years as an equated monthly instalments (EMIs) of Rs 19135. The borrowers really have no clue about how this amortization works. They keep paying this amount every month and even after 3 or 4 years, their outstanding amount hardly reduces.  And the weight of the loan sits real heavy on the shoulders!  In the initial years, most of what is paid as instalment go in paying of the interest and only a little goes and pays off the outstanding principal.

Given below are the loan amortization inputs.

See how the initial payment contributes only Rs 3k towards principal, gradually increases to contribute to the whole of the outstanding principal towards the finishing years of loan tenure.  And an inverse relation is observed with the interest which actualy keeps reducing from 15k to 0.
Now, if you look at how the balance repayment happens, it gives a very interesting perspective. Out of the 20 Lakh loan, it take about 9.5 years to pay the first 5 lakhs, 5 years to pay the second five lakhs.  Out of the total loan tenure of 20 years, almost initial 14 years goes in paying off only half of the dues! The third and fourth 5 lakhs take around 3.25 and 2.25 years respectively.
To put the same in terms of time period: if the 20 year period is divided into 4 year buckets, the balance repayment happening in the buckets are respectively 1.74, 2.3, 3.43, 5.11 and 7.42 Lakhs.  It needs a very strong heart to see that the the outstanding amount even after 12 years is around 12.5 Lakhs!

Overall payment of Rs 19135 * 240 = Rs 45.92 lakhs for a Rs 20 Lakh loan!

I have published this online loan EMI calculator.

Wednesday, November 16, 2016

Curious case of burnt currency notes!

It has been one week since the demonetisation drive by the Government.  500 and 1000 rupee notes ceased to become legal tender since 9th Nov 2016 00:00 hrs.  ATMs country-wide closed on 9th and 10th Nov - to facilitate banks and agencies to replace the 1000 and 500 rupee notes with 100 rupee notes. A new 2000 rupee note got introduced which are now available only in a few ATMs, as the ATMs are not designed to handle the new 2000 rupee notes. 9th Nov was declared as a non-working day for banks for them to prepare for the situation.

The objective behind the ban on 500 and 100 rupee notes as stated by our Prime Minister in his 8th Nov 8 pm speech is to tackle counterfeit notes likely to be let into the Indian economic system from Pakistan, to tackle the terrorism financing especially by the counterfeit notes and to put a check on the black money.

There have been several measures taken by the Government to help ease people's need for cash, and for exchanging the old notes.  The 500 and 1000 rupee notes continued to get exchanged at Airports, Railway stations, hospitals, petrol stations and utility payments till 14th Nov, which later extended to 24th Nov.  Tolls were queued up on 9th and 10th which were then asked not to collect tolls till 14th Nov, which now got extended to 18th Nov.

To limit people converting black to white, some restrictions are enforced.
1. A limit of Rs 4000 for exchange of old notes to new notes
2. A daily withdrawal limit of Rs 10000 and weekly withdrawal limit of Rs 20000 from banks.
3. A daily withdrawal limit of Rs 2000 from ATMs.
4. No limit on cash deposits (of course, people would need to answer if they deposited huge amount at one go)

From Monday 15th Nov, these limits are increased to 4500, no daily limit, 24000, 2500 respectively.

Government has not thought of all possible tricks that people may play to convert black to white but is very quick in plugging the holes.  For example, since the trains can be reserved in advance of 4 months, expensive tickets in high end trains like Rajdhani and Shatabdi started getting booked, with the objective that people can later cancel it and make it white.  GoI issued a notice saying that cancellation of tickets will be processed with cheque or online transfer only - and after scrutiny.  The amount will be credited only after a minimum of 30 days from the date of cancellation. Advance payments has increased in utility payments like Bescom, BBMP and similar city corporations.  GoI has issued notice to stop accepting all advance payments.

The ban on 500 and 1000 notes comes after the VDIS program where there is a no question asked 45% tax and you keep rest 55%.  Now, there is no such impunity from the Income Tax department.  For all unaccounted cash deposits, there is an income tax and a penalty of 200% followed by further investigation. By some calculation (not verified), one can retain only around 10% of unaccounted cash after all tax and penalties.  All cash deposits and credit card advance payments will get reported.  In practice, there has been a system of AIR (Annual Information Reporting) on some key areas like credit card payments, cash deposits, MF or Stocks purchase. More details here: https://www.tin-nsdl.com/air/anninforeturn.php


Because of this, a few people resort to burning the currency notes.  The people who burn cash may think: "Hello Government of India, you have created a situation where you will not allow me to keep my money.  Now, why should I come and give it to you.  I will burn it away, so you will not benefit from my cash!" May be the people have not read what is written on the currency note. "I promise to pay the bearer the sum of one thousand rupees", signed RBI Governor.

Let us try to understand it with a different story. Anand, Bala and Chitra are vendors in a shopping mall. Anand sells flowers, Bala sells sweets and Chitra sells beverages.  Generally they have a few transactions among themselves which they promptly pay at regular intervals.  One day, Anand buys some sweets from Bala and he does not have ready cash to pay.  So he gives a handwritten note to Bala "To whomsoever, I will pay you 100 Rupees - signed, Anand" and tells him to bring it back next day and get Rs 100. Bala agrees. Later Bala purchases some beverages for Rs 100 from Chitra and gives the note signed by Anand.  Chitra accepts that because she knows Anand has been giving such chits on his special paper and honours them the next day.  Towards evening, somehow Chitra accidently burnt the note given by Anand.  She cannot ask Bala, because the transaction with him is already over.  She cannot ask Anand, because he will honour only if he gets his note.

Similarly, the currency note is a promissory note.  RBI will treat them as a liability.  The 500 and 1000 notes are worthless after March2017.  RBI knows how many of 500 and 1000 notes it has issued and by March 2017 how many it has got back.  The remaining notes which are burnt, burried or washed away will cease to become its liability and RBI for sure can write back that amount.

So, anyone who burns the 500 Rs or 1000 Rs currency note is effectively transferring it to the coffers of RBI.

Now the question is: What happens if I burn a Rs 100 note?

Tuesday, November 15, 2016

Benford's law

I just happened to stumble upon the Wikipedia page of Benford's law  which states that
"In many naturally occurring collections of numbers, the leading significant digit is likely to be small" - To put in other words, when you gather some collection of numbers, the count of numbers that start with "1" are more compared to the count of numbers that start with "2" and so on.  In the wikipedia article, we see some examples such as the distribution of physical constants, the population of 237 countries which seem to obey the law.

Here we shall take a different data set and see how the numbers are thrown up. Taking Sachin Tendulkar's scores from cricinfo and modifying to have scores only from the matches where he scored - leaving out non-scoring or non-batting matches.

Here comes the distribution - Of all his scores, on the numbers in which these scores start with

firstDigit
 1   2   3   4   5   6   7   8   9
127  63  58  45  31  38  19  29  22

And in Percentage terms,

firstDigit
   1     2     3     4     5     6     7     8     9
29.40 14.58 13.43 10.42  7.18  8.80  4.40  6.71  5.09




which is in line with Benford's law!

The occurrence of each digit, using Benford's law is given with a probability
    p(d) = log(1 + 1/d), log to the base 10

 
As a different exercise, I want to see whether Benford's law is obeyed in other bases.

Converted the scores into octal numbers and re-configured the probability formula to take in multiple bases - and the law applies.


                                   





By the way, if you convert to binary number, there is only p(1) which is always 100% - Starting digit in a binary number is always 1!


Monday, November 14, 2016

Thoughts on Gold

I happened to have a look at the gold prices today.  It is almost the same as it was 5 years before. Take for example, HDFC Gold ETF. Current price is around Rs 2800 per gram.  The graph below (from www.valueresearchonline.com) shows the gold prices (in appreciation percentage) for the last five years - Nov 2011 to Nov 2016.


So, for someone who had invested exactly 5 years before, the current result is same as keeping the cash under the mattress.  Except for the roller-coaster ride which the gold investor experienced in the said period (only, if he were to watch the prices constantly).  The price went up to Rs 3160 per gram in Sep 2012 and dropped to Rs 2470 per gram in June 2013 and immediately in 2 months went up to Rs 3075 per gm in Aug 2013 and dropped to Rs 2350 per gram in December 2015. Now, back at Rs 2800 as it was in Nov 2011.

Five years is a sufficiently long time, and except for the volatility that gold offered, it has not generated any wealth. It seems as such there is no use in accumulating the metal.  The price is driven by consumption (majorly accumulation in the form of jewels), supply and demand.  The returns from gold is only through appreciation as it is not an income generating asset.  You buy with the only hope that it will appreciate.  People still consider it as an asset. At best, it can be considered as an illiquid cash (oxymoron!) Gold, for most people is an expensive ornament and serves no further.

Of course, the sample size (in this case, it is just one 5 year period), the period taken, can all be in contention.  But overall, gold prices can stay at par with inflation adjusted for currency exchange rates.  Not any more.

But, there have been business that thrive on gold - gold jewellers and gold loan companies.  For every gram sold in the form of jewelry, the owners make roughly 15% as making charges.  And if an ornament is bought, later melted and remade after a few years - the jewellers make additional making charges on the same gold sold.  It does not matter whether it is the same jeweller or different.  If you consider all jewellers as one group, you bought from the group and again gave back to them to be melted and remade a few years later, giving them double making charges on the same gold.

The gold loan companies on the other hand convert the "illiquid cash" to "liquid cash" at a price, charging huge interest rates, at the same time having a right on the gold which is pledged.  They take a margin of around 30% to account for volatility.  By the way, in the said period there have been only one instance where the price had gone down by around 25%.  Better off actually selling and buying back later, there by you pay an overall 15% extra making charges while buying again, instead of repeated interest payments at 20% while not having the right on the gold as well.

Monday, January 05, 2015

An account of 2014!

This has been the longest interval between two of my posts in this blog!  And, writing a blog post itself has become quite old fashioned these days.  But let this post be a customary note between the years.

2014 has been an interesting part of my journey!

Started the year, with a trip to Mysore in January - during Pongal holidays.  Read quite a few books. Jaya by Devdutt Pattanaik, Sivakamiyin Sabadham, Parthiban Kanavu, En Iniya Iyanthira and Meendum Jeano of Sujatha, followed by Poiman Karadu.  Adding to the list are 6174, The Last Lecture, Sita by Devdutt Pattanaik. Most of the books that I read are in the first half of the year. Not able to allocate time to reading during the latter half.  

Followed Algorithms I and II in Coursera with Bharath. Read a lot related to functional programming.  Have been getting used to a lot Haskell and Elm.  Having acquainted with Haskell has been one great story of this year.  

Helped in a very small way towards the making of book "Write Code in Tamil" by Dr. Muthiah Annamalai, the creator of Ezhil Language

This year, had a chance to attend the Python India conference and Functional Programming conference, held in Bangalore. Gave a lightning talk on functional programming in Python conference. Visited Singapore for the first time for a technical workshop in R.

Looking forward to 2015 to be even more exciting and eventful!  To read a lot of books, to do more functional programming, solve real world problems and travel a lot!

Wish you all a happy and prosperous 2015!

Friday, January 24, 2014

Mysore Trip

Visited Mysore Palace and Brindavan, two weeks back. A few years back, I had gone to Srirangapatna to see the Temple, Daria Daulat Bagh etc. So, this time, when we planned a visit, I wanted to have as minimum intersections as possible.

It turned out that we had a great time and were able to see a lot of new places through the entire day.

6:15 Start from Bangalore

7:45 Stopped for Breakfast, at Kamat Lokaruchi.  As expected, the food was great. They have introduced an unlimited breakfast buffet at Rs 120.  Did not try, as it could become heavy for a long trip. The main specialty there being the idlis baked with wrapped banana leaves! Tastes awesome!  This restaurant is on the right side of the highway, approx 55 km from MG Road, Bangalore - just after Ramanagara.

8:15 Resumed the journey after breakfast

8:45 Stopped at Doddamallur Navaneedha Krishna temple - on the way - on the left side of the highway after Channapatna (Town of Toys) The temple seemed to be a very old temple.

There are arches welcoming before each of the towns - Ramanagara - Silk Town, Channapatna - Town of Toys, Srirangapatna - Town of Temples - also there were similar welcome arches for Maddur and Mandya which I forgot.

9:15 Resumed after a very short visit to the temple
10:30 Reached Srirangapatna, decided to visit the temple first. Some of the access roads were getting repaired, so had to take quite some detours inside the town. 

11:00 Started towards Ranganthittu, for which we need to return to the highway, proceed a little and take a right. This right turn is almost like a V junction. This is similar to taking a right from hosur road towards the dairy circle road (not allowed in current traffic regulations) after the Forum junction in Bangalore. The distance would be almost about 6 or 7 km from the temple. This is the road that goes to Brindavan too.  A point that comes within 2 or 3 kms of taking a right on the high-way, where one has to take a further right, into the arch for getting into Ranganthittu.

11:30 Ranganthittu bird sanctuary is neatly maintained with beautiful parks, river : 30 ways.  Had a boat-ride to have a closer look at the birds flocking in the nearby trees. Clicked some snaps of birds (I am not a bird watcher - so do not know the names of most birds which I had taken snaps of) and crocodiles.
Entry Ticket: Rs 50 for adults, Rs 30 for camera and Rs 50 for boating

13:00 Reached Balmuri falls. To get to Balmuri falls from Ranganthittu: return, come out of the arch and take a right, the road which one would have proceeded, if not taken the right into the arch. This is the same road that goes to KRS dam (or Brindavan Gardens - both are same).  Somewhere after travelling for about 5 to 6 km, one has to take a right into a muddy road to reach Balmuri falls.  This looks similar to Kodiveri falls, though I had not been to Kodiveri falls - seen only in photos. 

No Entry Fee at Balmuri Falls

A guy got almost drowned but saved by the boatman.  Shocking, I could see his entire face completely immersed in water when the boatman pulled him out catching his vests.  He was unconscious for sometime, later opened eyes and was being rushed to the hospital



14:15 Reached Mysore, started to wait in a huge queue to get a place to eat, in Hotel Siddartha - close to Mysore bus stand

16:15 Went to the Mysore Palace - Have never seen such a crowd - Jam-packed. And the palace has a single route to take through from entry to exit - completely crowded all the time.  Palace looked magnificent, indeed!  Only after visiting, learned through Wikipedia that this is the 2nd most visited tourist-spot in India, next only to TajMahal. Missed the opportunity to see with lights on.  Before even entering the palace, had to maneuver a lot to get the car parking done, in a place covered with dry soil-dust.  At least they could have spent some and made some good parking lot.  Totally haphazard and totally unplanned!
Entry Ticket: Rs 40 for adults, Cameras and mobile phones not allowed inside
Timings: 9 to 5 pm


17:30 Reached Brindavan, what I thought should have been done at the Palace in terms of organized parking, is done here.  A huge area with markers on concrete flooring dedicated for parking. It just reminded me of the parking lot in Akshardham, New Delhi.  This is my first visit to both Mysore Palace and Brindavan.  We went in such a time where we could see the gardens and fountain day-light, twilight and night fountain lights.  Again, since it was Pongal (Makara Sankranti) time, also being a Sunday, there was heavy crowd! We had to miss the musical fountain, as it got late and an almost half-km long queue was already there, inching head-to-head.
Entry Ticket: Rs 15 for adults and Rs 30 for camera
No entry beyond 6 pm

21:30 Left Brindavans at around 7:15 pm in the night and reached back to the same Kamat Lokaruchi for night dinner.

23:45 Back to Bangalore.

Saturday, January 11, 2014

The way it was - 2013.

Needed to write a post on 2013 towards the end.  Somehow finally, managed myself today to sit and write this post!

As usual, at the beginning of every year, I am pondering on how fast the last year too has gone in a jiffy.  Moved my base from Chennai to Bangalore; shifted jobs; Helped a client in solving a problem that had been troubling them for more than a year.  Learnt a lot on and off work. Met a lot of new people and shared interesting thoughts. A new country that added to my visited-list was South Africa.  

Got my first android phone - Galaxy Grand - birth day gift from wife.  But somehow not comfortable with the 5 inch screen and weight; exchanged with my appa's Galaxy Young - for it will be much useful to him, as his regular usage involves both hands.

After 2007, re-started my car trips to Salem - for I have never driven Chennai-Bangalore or Chennai-Salem stretches to this day.

A lunch-table chit-chat turned to a very quick and memorable trip of Yercaud on one fine day at Salem.  Deepavali at Salem, family functions at Salem and Chennai helped to connect back with a lot friends and relatives.

Read a lot of books in the year which include - The Oath of Vayuputras, Outliers, Design of Everyday Things, The Lost Symbol and portions of The Man Who Knew Infinity.

Now for the new year resolution - jogging / walking daily.  I have already been following my walking course on and off for the past 2 years, just made a resolve to make it a daily habit.  Also, planning one book a month policy - started with Jaya by Devdutt Pattanaik now.

And last but not least, able to make a quick-planned trip to Tirupathi on the eve of New Year!

I hope 2014 will be even more promising, challenging and interesting.

Wish you an interesting and happy 2014!

Saturday, September 21, 2013

BangPypers September

Attended the monthly chapter of Python Bangalore (BangPypers) for the first time.  I had been a regular at the ChennaiPy meet.  But after I moved to Bangalore, this is the first Python meet I am attending.  Around 20 enthusiasts participated.

Mr. Baiju of ZeOmega hosted the event at ZeOmega office.  It was held in an unconference mode where the audiences shared their views and experiences.

When Baiju finished with introduction to Python for beginners, we realised that the speakers as per the original agenda did not turn up.  So, there was some dead time in between - we started with a brief introduction of ourselves - which turned out to be a self and Python-tools introduction and experience sharing session as well - We just had 30 min after the introduction got over - time well spent in introduction.

Got introduced to quite a few things.  Though some of which was known earlier, I am listing below all that we discussed so they serve as pointers

Django - A very popular Python web framework
Tornado - A Python Web framework for non-blocking network I/O
Mezzanine - A Django Content Management System
Jekyll - Static Site Generator (based on text input) built in Ruby
Hyde - A Python based static site generator
Gevent - A Python networking library
Silpa - Swathanthra Indian Language Processing Applications - A project with a focus of building several Indian language specific tools
Python nltk - Natural language processing Toolkit for Python
Beautiful Soup - A Python based XML / HTML parser
BuildOut - Python based build system
Jenkins - Open Source Continuous Integration Tool - See here for what is continuous integration
Python Koans - A self learning tool for Python written in Python
Learn Python The Hard Way - A much revered python tutorial
Pycassa - Python client for Apache Cassandra (a distributed dbms for big data)
Sophia - A next-gen key value DB for high loads
Leveldb - A light weight key value DB designed by Google
Lucene - Open source search software by Apache

Later, towards the end, Baiju walked us through how a distribution can be created and uploaded to PyPI (Python Package Index) via setuptools


Friday, August 30, 2013

Slidify

Recently I came across a presentation making tool in R called "Slidify", by Ramnath Vaidyanathan.  At the outset, it is impressive.  A few advantages using slidify in R
1. One can embed the R code (or even some other code) directly in the slides.
2. The R code can be executed run time when the slides are prepared  (I suppose other languages can also be executed run time with appropriate set-up)
3. The plots (and other outputs) executed in R can directly be captured in the slides.

Works seamlessly in Chrome and Firefox.

For using the "slidify" we just need 
1. An R environment with required tools installed (one can follow the procedure in slidify.org website)
2. An "Rmd" - R mark down file, where the contents and code are written into.

It has plug and play support with multiple options for
1. Framework - The look and feel, theme of the slides
2. Highlights - The code highlighting support
3. Widgets - Tools for support like equation editing, making online quiz and much more.

For equation editing, the "mathjax" tool is quite good, which is readily supported.  Additional Info:  Many of the coursera courses uses mathjax tool to render mathematical equations.  Further I remember, my Professor Jeff Leek used Slidify for his slides in his "Data Analysis" course in coursera.

Slidify makes use of two key libraries among others.
1. Knitr - This converts the R markdown files to ordinary markdown files. 
2. markdown - This R library converts the markdown files to html files.

The output will be a dynamic, interactive html file with all required support files - css, js etc.  

An off-note on a relevant topic:
Markdown (wiki) was originally conceptualized by John Gruber and Aaron Swartz in 2004.  It has been in wide use since then.


Monday, June 24, 2013

The Lion Park

Visited the Lion Park here in Johannesburg today, with a couple of my colleagues. It is about 40 km from the place I stay, Bruma.

Had no idea about the place before visiting.  Just thought it would be only lions in the zoo which we would be seeing.  On going there realized that it was a safari.  As any tourist place would have it, this too had a few souvenir shop - most of which are over-priced.  Bought the tickets for the 11:30 safari trip and roamed around the souvenir shops in the meantime.  The ticket of 270 Rand each included the Guided safari and a mini-zoo and lion cub interaction session for 2 minutes where you can go and touch the cubs and take some photos.

Started with the safari at first.  The safari van seated around 20 people. Masana, our guide and driver stopped at the first point to show us ostriches, zebras and giraffe.  With stoppage near each animals, he gave lot of information: The pattern of lines on zebra's back is unique, just like fingerprints. The female zebra has a bigger back even during the non-gestation period, in which it stores some gas which it releases to fight predators, when chased.  Zebra at a time can give birth to 2 off-springs.

The female ostrich have grey feathers and the male ostrich have black feathers. Ostriches cannot fly; but can run upto 2 km non-stop.  The eggs of ostrich are the largest of birds, very strong that it can withstand a weight of upto 20kgs.

In the same area of zebras and ostriches, stopped to see the antelopes: impala, springbucks and blazebucks. The impalas have horns only for the males whereas the other two varieties have horns for both genders.  The blaze buch has a white patch on its face, which gets developed when the buck becomes adult.

Okay, then enter the lions - into the lions camp - there are four camps (enclosed areas) for lions and one for wild dogs and one for the cheetah.

The time that we went to see the lions was actually their weekly feeding time.  The lions are fed only once a week - on Sundays 12 noon.  All lions were eagerly looking for the arrival of the feeding van.  The van came with cut pieces of cow / bull meat and distributed.  These meat are supposedly gifted by the nearby farmers in the area.

We also happened to see Letsatsi, a white lion which was the main cast in the 2010 movie "White Lion".  Because of the best performance it did in the movie, Masana told Letsatsi could not be gifted a bungalow or car, but was gifted with 6 lionesses.

A lion can have many lionesses - that is considered a family group.  In some group, there could be more than one adult male lion - but most of these adult male lions are brothers and together with their lionesses live together.  We saw such a group of white lions.  And Letsatsi had all its lionesses brown - the offspings could be pale brown or completely white - we could see both kinds savouring their meal with their mothers.  In one other group, a single brown adult male lion had 3 lionesses in the first camp and all were roaming eagerly awaiting their weekly meal.



And another surprising fact regarding lions:  The lioness discards the weak cubs - it does not take care of them.  In the park, the management takes care of the rejected cubs in a nursery.  Survival of the fittest! These cubs which are rejected by mother will never learn the art of hunting and may not survive longer if left in the wild.

Saw both cheetah and leopards.  Cheetah during safari and leopard inside the cage in zoo.  Cheetah is a muscular animal and can run at speeds of 80 to 120 km per hour - but not sustainable beyond some 200 metres or so.  The body gets heated up and it needs to slow down to cool.  So, it starts attacking the prey with full speed only if it is within the limit, otherwise it just lets go.


Cheetah has a black mark on its face which is needed for the absorpion of Vitamin D from sun light.  Cheetah hunts during the day unlike the leopards which are nocturnal and hunts during nights.  Leopards are smaller in size compared to Cheetah and can climb the trees. (Remember Bagheera in Jungle book, which is a black leopard)




The wild dogs and cheetah are fed thrice a week, unlike lions which are fed only once.  Each has its own metabolism.  And wild dogs are supposed to eat their food very fast and the lions the slowest, savouring each bite.  The lions could end up eating their portion of sunday noon meal late into the evening as well.

On returning, just before the end, a giraffe came and got its neck down into each of the vehicles and did some inspection!

After the safari, visited the mini zoo which housed leopard, cubs etc.  The zoo also featured something called cub world, where visitors can touch the small cubs of lions.

Monday, May 27, 2013

The Shiva Trilogy

So, "The Oath of the Vayuputras" is done and dusted! - the third and final book in the Shiva Trilogy series. Almost every one in my friends and contact list had read or at least bought the book and stored in their shelf to read sometime later.

Well, I started with the first book of Amish in the Shiva Trilogy series, around one year back, when I was shuttling between Delhi and Chennai for one of my consulting assignments.  At that point, already his first two books had come.

The concept behind the story is very simple, but the way it is executed is awesome.  Amish places lots of dots in the plane and connects them well and makes a nice coherent story.  

He asks a simple question "What if Lord Shiva was not a God as he was always imagined to be?  What if He was just a human being?"  And, takes us through the life of a man Shiva, who resided in Himalayas and how he ended up as a lead man for the Quest of His Time.  And what is such a quest? To destroy Evil.

Shiva is made to believe that he is the One to go after Evil.  And, who is that Evil?  Shiva takes up the journey and finds the answer himself.  In his journey, he is helped and guided by many people from a tribe of intellectual and spiritual advisors like Vasudevs to even a beggar outside a temple.

The first book sets up the the context, describes the ways of life of two main tribes Meluhans and Swadweepans (Suryavanshis and Chandravanshis) inhabited across the northern subcontinent.  The book builds up the characters of Shiva and Sati (lead protagonists) nicely.  The book introduces Naga and their unusual living, violence and an inclination for disrupting the normal lives of Meluhans.  Characters like Parvateshwar (the war-general of Meluhans), Lord of the Nagas, Ayurvati, Nandi all introduced and built-up succinctly. 

The second one, "The Secret of Nagas" explores the lives of Nagas. It introduces the readers to other regions like Branga, Panchavati (present day WB, MH respectively). It brings up and reveals some of the ugly secrets which was kept out of reach, for years by people in power.  The conversations that Shiva has with Vasudevs are interesting and have lots of deep philosophical insights.

In all these books, Shiva keeps his search for Evil, the view on what is evil keeps changing every now and then.  What considered evil, becomes not evil - it just a completely different way of leading life.  Shiva proposes many hypothesis and keeps disproving all of them, until what he finds to be the ultimate evil in the 3rd book.

The third book involves lots of battles and strategic thinking behind the wars and battles, not that these are not present in the first two books - but the first two are more philosophical than war-strategic as compared to the third.  The book gives enough hints of nuclear power being used in wars - talks about fission and fusion reactions.

Overall, there is a lot of insights and deep philosophical truths that can be derived from the books.  It is definitely not a one-time read.  Every new read will bring up some insights.

Looking forward to the second read, soon!

Friday, May 17, 2013

Automated Messages

We get messages from the banks, IRCTC, telephone bills, ecommerce sites etc on order status, payments, POS transactions, reminders etc.

Generally these messages start with two letter combination which are like LM, TD, BA, AD, MM, MD, VM, BM, BZ, BP etc

One of my friends who works as a Consultant in Telecom Business told what is the significance of these two letters.

The first letters represent the Messaging Service Provider and the second letter represent the city.  

LM - Loop Mumbai
AD - Airtel Delhi
TD - Tata Docomo Delhi 

An elaborate list here http://goo.gl/QzYBZ

Both the messaging service provider and the message receiving network charge for each such message..