Wednesday, August 26, 2009

Many Lines

So, one might ask, "Hari, 3 blog posts in one day?"

Yep, I'm not very busy today...

And, I just learned about a really neat algorithm! And... I can't explain it any better than this. So here is the link: http://marblemice.com/2007/09/12/douglas-peuker-line-simplification-explained/

Its so simple and yet elegent!

However, there is also another algorithm I've seen for this which used dynamic programming. We learned it in my algos class at Cornell. I'm lucky that the chapter is on the book's website here (go to section 6.3.):

I'm curious to see how they compare, but haven't had time to compare them at all yet. I'll get around to it, but the douglas-peuker algorithm reminded me of the dynamic programming approach and I decided to put it up here.

Ted Kennedy Has Died

Obvioius Statement: Wow... this is big news. This is big international news.

The NY Times article is great, but certainly not unbiased.

I don't think I can add much to that artcle... but I would like to point out that wow this story inspired a lot of arguing betwween people. I saw a lot of arguing on Hacker News about what kind of person he was (great or not great) a lot of it centering around the Chappaquiddick incident. Some people thought it completely marred his record and some people were more than willing to ignore it in favor of his accomplishments as as senator.

I'm curious what people think. Is it right to ignore someone's faults and focus on their accompishments after they've died or is it better to look at eveything someone has done?

Time and Space

Nope, this entry is not about physics. If you want to read cool blogs about science, go to http://scienceblogs.com/ where you can read people much smarter than me talk about this stuff.

This entry is about the way I see time and space being thought about differently in India vs. the US. Some of this is well known, but oh well.

Note: All statemetns about India/Indians below or anywhere on my blog are the result of what I've seen in my short time here. As a result, they may not be accurate.

Time
A lot of peole have heard of IST (Indian Standard Time). Its not so much a time zone as it is a delay factor... Indian's are between 15 min and 1 hour late to anything. Well, thas the story anyway. Well, I'm definitly seeing that at work, and even seeing extensions on this.
  • We are supposed to come in at 9:30 AM, but I've seen people wander in as late as 11:00 AM and no one seems to mind. Obviously sometimes its with good reason, but from what I'm told this is pretty normal.
  • My cousins don't seem to worry if they are late to work. They are never in a rush to get to work on time.
  • If there is extra work to do at the end of the day, people seem to stick around and do it without thinking twice.
  • There is a lot of idle time (my uncle told me a story about how he was idle for 45 days once on a project).
Even outside of work, things are different. No one knows when anyone will be home, things are done at a leisurly pace. Traffic moves very slowly so it takes a long time to get anywhere.

My sense is that time is just not treated as super important... the opposite of Manhattan where "ASAP" is the phrase and if you go to a restaraunt 15 min late you lose your reserveration.

Space
What constitutes an adequate sized room? What is big? What is small?

For those of you who remember the ex-brothel I lived in, try to remember the rooms there. Not my room, I had a "big" one, but the small rooms. They were probably about 8' x 12'. Big enough for a bed and a small desk.... and to walk from one to the other. When I left, those rooms were about $900.00 a pop.

Contrast that to a story I heard about someone living in Bangalore. The placewas maybe the same size as the room I just described... a bit bigger really, but it had three beds. Yes, one room, three beds, three people living there. One wall was just a cardboard partition seperating it fom another, similar setup. That place cost about Rs. 5,000!

Ok... lets do some quick math. The exchange rate is about $1.00 = Rs. 50.00. So, you say smugly, that room only cost about $100.00. What should you expect? True... in Manhattan if I want a room for $100.00 I expect a very sturdy cardboard box inside someone's closet. But you can't use straight exchange rates. You need to use PPP (purchasing power parity).

Googling around, I see the PPP is more like $1.00 = Rs. 10.00. So by that logic, we see this place is really around $500.00!!

I'm not sure what you can get for $500.00 in Manhattan, but I'm sure you can get something where you have your own room. A quick look at Craig's List and we see a decent number of rooms. Ok, some of them are in Jersey City or other way uptown... but still, its your own room.

Now, to be fair, I just found a place where I'm thinking of moving in. Its also Rs 5,000 a month and I'd have one housemate (seperate rooms, living room, one bathroom, kitchen). But from what I'm hearing from my cousins, this is the exception not the rule.

Of course, they also charge a lot more for bachelors than for familys, but still, I think the example of 3 people sharing a room with a cardboard wall is pretty extreme. But, this whole room sharing thing seems reasonably normal around here...

Wednesday, August 12, 2009

India: Post 1

Hey All

This is my first post on this blog. I got to India Friday night and have been here for 5 days now.

I promised that this blog would be less narrative and more about my thoughts, but here is a quick summary of whats happened so far.

I'm staying with family for the moment. I think that will change over the weekend, but they've been very helpful. Over the weekend we ate a lot and visited some other family around Chennai. I started work at IFMR Trust on Monday. For the first two days my manager was pretty busy so didn't have time to chat with me... so I spent time reading, browsing, etc... Today I got some reading to do and the next two days are an introduction to the company.

I've only been here for 5 days, so I'm not going to try to draw and broad conclusions about India now. Anything generalities I draw would be premature... so instead I'll talk about what I've learned so far about microfinance. Everything here is from the first 100 or so pages of a book called "The Economics of Microfinance" (http://www.amazon.com/Economics-Microfinance-Beatriz-Armendáriz/dp/0262012162) and some other essays.

What most people know about microfinance comes Grameen's original methodolgy.
  • Loans work in 5 people groups. First you loan to two people, whenthey pay back you loan to the next two. When they pay it back you loan to the last person (the leader). If at any point someone doesn't pay, the whole group is "blacklisted." This gives the recipient social preassure to pay and gives the others preassure to help out.
  • After these loans are finished, the group can get more (and bigger) loans.
  • Loans are given primarily to women.
  • Loans are given out only for starting a business.
This was, indeed, the original grameen setup. However, a lot of microfinance loans have given up all of these. Loans are given out individually and still paid back. Why? Because repayement allows the recipient to get bigger loans next time. People realized that even though the recipients were officially women, both men and women spent the money. And, even in the original system the loans were used for other purposed (although they did discourage using this). In fact, even Grameen has started something called Grameen II which abandons a lot of the previous restrictions. Other groups originally copied Grameen but many have found the restrictiosn they put on the loans counterproductive. (Note: I'm not trying to say anything bad about Grameen, they did great stuff and got the movement started).

I mention this because until a few days ago, I thought all microfinance used the group method and that they were primarily given out to women. Pretty neat stuff.

So what am I going to be working on in relation to microfinance loans? One big problem is that the microfinance institutions (MFIs) have trouble getting capital. In addition, most of them focus on one region (and may even narrow down their criteria even more). This is good because it allows them to pick up the necessary local knowledge to decide who should recive loans. But its bad because it exposes the MFIs to a huge "concentration risk." Imagine, for example, there is a drought in an area where some MFI works. This will probably advsersely affect all the loans this MFI has out. What happens? The MFI is pretty much dead.

So whats the fix? Diversification. But thats tough because doing microfinance correctly means gaining a lot of local knowledge. So instead, what IFMR Trust is doing (in addition to other things) is working to securitize the loans. This means buying exposure to the loans, packaging them, and selling them.

So... to you finance people out there (and most other people) you say "but isn't this what caused the subprime crisis?" Well... sort of. The problem is that the banks knew they could sell of the exposure from their loans so they didn't need to do the necessary due-dilligence. To avoid this, two steps are taken.
  • The loans are divided into two traunches (essentailly two sets). One traunch is superiod ot the other one in the capital structure (i.e. moneyh that gets paid back goes to that one first).
  • The MFI and IFRM Trust both keep exposure to the inferior traunch.
What does this mean? This means that both the MFI and IFRM Trust will be extra careful because they take on the most risk. Its a cool way to give the MFIs funding and still be responsible about it.

Of course, this means that IFMR Trust takes on a lot of risk. Its diversified across MFIs (and therefore across regions, etc...) but it still needs to be monitored. However, the risks aren't well known yet, so I'll be working with them to figure out the risks, model them and create a system around it all. It's going to be a lot of fun since we'll be breaking new ground and starting from scratch.

So far they've only securitized one set of loans (http://www.ifmrtrust.co.in/announcements/ifmr_capital.php) but they've given money to MFIs for a bunch more there is a lot of risk they have.

Note: IFMR Trust is doing a lot of other stuff. If your interested you can take a look at the website.

Ok, thats post 1. Nothing new, but hopefully its interesting. More to come!

Hari