11 May 2011

Andrew Lo: What a boss

``If you have no interest in money or don't care about making money, talk to me after lecture and I'll fix that.'' --A. Lo

Andrew Lo, a renowned finance professor, talked about how we could use financial engineering to solve society's three biggest problems (cancer, global warming, and one more that I forgot). His plan is similar to what MIT did to win the Darpa Network Challenge: to incentivize people who give money to solve problems, essentially relying on human greed, which has always been and will continue to be a part of human nature. (Fear, another powerful tool, only works in the short term; if one is constantly afraid of something, then he is not capable of surviving.) Lo gave the following example:

Suppose that, for a pharmacutical, developing a drug for cancer cost $500M, had a cycle of 10 years, and a 5% success rate. A successful drug would make $2B a year. If we only invested in one pharm, then they would have a pitiful return. However, if we invested in forty pharms, then our probability of having at least one successful drug is 1-(1-0.05)^40, or 87%, which is much higher than 5%. We would then need $20B, which we can get from one-tenth of America families if each family contributes $2,000. We can further incentivize by deducting this amount from the family's tax.

This $20B we get from taking advantage of people's inherent greedy nature is supplemented by donations from the altruistic, which amounts to $25M. Of course, this is a very simple model, but if we learn to take advantage of greed and focus it like a giant laserbeam to benefit society, say curing cancer, then we are capable of achieving great things.

Edit: typo in math; 0.87 = 1-(1-0.05)^40, not 1-0.05^40.

09 May 2011

Nyan Cat Alarm

This is quite possibly the silliest project I've done. Besides nchoosethree.com. Anyway.

The project was simple: to set up an alarm that would wake me up to the tune of nyan.cat every morning. Since I had just set up my lovely iMac G4 earlier that day, complete with my JBL Creature II speakers, I had something that could autonomously play loud and annoying music every morning, at the expense of my roommate's sleep. I could have done this two ways: (A) command line with cron and mplayer, or (B) with builtin Mac OS X apps. I chose the latter because I was lazy. So the troll begins:
  1. Get an MP3 of the Nyan Cat song of nontrivial length. I ripped mine from here.
  2. Create an Automator workflow as follows:
    1. Set system volume to some annoying but tolerable loudness.
    2. Tell iTunes to get the selected song (Nyan Cat, in this case).
    3. Tell iTunes to play the selected song.
      Then save the workflow as an Application.
  3. Create iCal events at the time when you wake up. Set an alarm to 0 minutes before and open up the Automator application. You may want to test this before going to sleep.
There you go! Troll in a box in five minutes! Unfortunately for me, I forgot that my Mac's clock was ahead by three hours, so creating wake-up events at 8:00am meant waking up to mute the speakers at 5:00am. Whoops!

07 May 2011

End of term evaluation

It's the end of another term at MIT, which means that I'm very close to have finished freshman year! (all that's left is two finals and a problem set) The semester was quite a ride; I did not do as well as I had hoped, but in the end, I think I learned all the material the classes asked me to learn. Without further ado, here are my opinions on my classes this term:

15.401 Finance Theory I (MW8:30-10, F8:30-10): This class is mostly memorization based; one only needs basic mathematical skill and intuition to do well (of course, economical intuition is highly recommended). It's easy to lose points here and there because of silly mistakes and can cause one's grade to drop quite easily, in fact. However, this class is a great introduction to the world of quantitative finance. Professor Stephenson isn't the best lecturer, but he gets the point across well.

15.053 Optimization Methods of Management Science (MW2:30-4): This class is also memorization based; same thoughts as above. It's a good introduction to Linear Programming, optimization algorithms such as Dijkstra and Max-Flow/Min-Cut/Min-Cost, and NP-completeness (although referred to as "really hard problems" in class). Again, silly mistakes will kill you. Professor Orlin, a renowned researcher of flow, inserts humor into an otherwise basic ((and boring) course.

14.01 Principles of Microeconomics (MW1, F1): This class is more math based than I thought, after doing almost no calculus in its sibling, 14.02. Your grade is basically determined by how silly you are on tests. Professor Harris is quite eccentric, which makes his lectures worth attending.

6.004 Computational Structures (TR1, WF2): This class was a lot of fun (one gets to build a 32-bit RISC microprocessor! (except in software, boo)), except for the quizzes, which actually required studying. (wait, what kind of statement is this?!) Ward is a great lecturer and injects humor into his lectures. But please, STOP WITH THE COMIC SANS!!11!!1

6.046J/18.410J Design and Analysis of Algorithms (TR9:30-11, F3): This class is one of those "rites of passage" for any decent math/computer science nerd at MIT. It wasn't particularly fun; absolutely no implementation was required: the entire class was very mathematically rigorous and proof-based. The take-home was lots of fun; it's rewarding when you solve a (hard, not NP-hard :P) problem you haven't seen before. Professor Leiserson is a great lecturer and knows how to use humor, unlike Professor Moshkovitz, who does very intense and dry math-based proofs (and in turn, loses half the class).

All in all, classes weren't as fun as first semester, probably because there was no software coding involved (no, those 6.004 bits do not count). I was also less bored because I spent more time learning and reviewing the material for classes, so I think I did better grade-wise this term than last term. However, I was still sufficiently bored at times, suring which I could have spent extending class material, such as working out proofs or reading papers on Google Scholar instead of staring blankly at a wall. What's done is done; grades have basically been decided, and although I could have gotten more As, I don't regret my decisions because (1) what's done is done; regretting will only waste CPU cycles, and (2) I needed to experience how a typical "lazy student" did and learn to not take this path again. Here's to a more exciting and more academically successful term this fall!

05 May 2011

Stuff that's changed in the past $n = 17+2!$ years

What's notable/changed from year N to year 19:
  • N = 18: I became a health freak! I also finally got a Power Mac G5 (and it's liquid cooled!) Dream come true after seven years much? Oh yeah I got into college.
  • N = 17: I learned how to play bridge. I also quit violin cold turkey. I grew out of gaming, although I occasionally play pinball and get the occasional high score.
  • N = 16: I built my first computer =D
  • N = 15: I learned how to program (albeit in AutoIt). I started trolling people.
  • N = 14: I got the world's thinnest dual core laptop, the MacBook Pro 1,1. I also met Steve Jobs in person!
  • N = 13: I used Linux  (albeit Ubuntu)! I also hackintoshed my Dell (and proceeded to get a copyright infringement notice from my ISP for seeding).
  • N = 12: I sold my soul to Steve Jobs. Possibly one of the best decisions ever. I also learned how to play Sudoku from a classroom activity.
  • N = 11: I started cracking my joints and got my first computer. I also was a moron and chose a Dell Dimension 4600C over a Power Mac G5.
  • N = 10: I went to this awesome summer camp in which I did EE and played Super Smash Melee. I think this was when I got my first 1:18 diecast car (a 1998 Guards Red Porsche 911 Carerra).
  • N = 9: I got into cars. Every day at lunch I would draw cars with these two guys who were into supercars. I also bought Hamburger at one of the holiday botique sales in school.
  • N = 8: I immersed myself in Honda lawnmower literature because my family was going to buy a gas-powered mower.
  • N = 7: I got my Nintendo 64 (and I still have it!) I also got a teal GameBoy Color, which I retardedly sold to GameStop for a measly $15.
  • N = 6: I learned how to solve a two-equation two-variable linear system of equations. (this honestly can't be the most interesting thing, can it?)
  • N = 5: I learned how to play violin.
  • N = 4: I learned multiplication.
  • N = 3: I learned addition: the start of my math career.
  • N = 2: I broke my parents' VCR. This was possibly the start of my affinity towards EE/MechE.
  • N = 1: lolwut