Friday, May 8, 2015

The 29th Day

About a month ago, I won the Listserve. What do you write when you have the opportunity to send an email to over 20k ppl? Being a corny dork (a cork?), I wrote about exponential growth. Here it is:


---------- Forwarded message ----------
From: Andy <no-reply@thelistserve.com>
Date: Sun, Apr 12, 2015 at 4:01 PM
Subject: [The Listserve] The 29th Day


In ancient India, the inventor of chess showed his game to the King, who was so pleased with the invention, the King announced that he would grant the inventor anything he desired.  The inventor sat in silence thoughtfully, then replied that he merely wanted some rice to feed his family. To determine how much rice he would receive, they would use the chessboard as a counter. The inventor suggested that, for the first square, he would receive one grain of rice, two for the second square, four for the third square, doubling each the amount for each successive square. The inventor would receive all the rice on all the squares of the chessboard. The King laughed at this seemingly modest request and immediately accepted, tasking his treasurer with calculating the entire amount to grant the inventor. Weeks went by without hearing from his treasurer until one day, the King summoned his treasurer and asked why there was such a delay. When the treasurer showed him the total sum exceeded the rice count of his entire kingdom, the King was bankrupted and the inventor became the new King.What was the total amount?

.
.
.

18,446,744,073,709,551,615 or 18 quintillion

This heap of rice would be larger than Mt Everest.

There is a pond with invasive water lilies. The water lily population doubles each day and if left unchecked, will cover the entire pond in 30 days, smothering all other life in the pond. Each day, the caretaker of the pond checks the population, and will only take action to cut the water lily population when they have covered only half the pond.

On what day will the pond be half-covered?

.
.
.


The 29th day. This leaves the pond caretaker only 1 day to save the pond.

Exponential growth, or compounded growth, is a very powerful thing. Positive things like savings, investment, networks and technological innovation can bring incredible improvements to one's life, if allowed to compound without interruption. On the flip side, if left unchecked, dangerous things like inflation, debts, diseases or even dangerous ideologies can sneak up on you so quickly that you won't notice until it's too late.

Don't wait until the 29th day.

Friday, May 1, 2015

BRICs

Here's something I wrote for my company newsletter about my travels:

--------------------------------

Over the past two years or so, I've been fortunate enough to travel to each of the BRICs: Brazil, Russia, India and China. This group was identified by economists in the early 2000s as the four countries with the greatest potential to become the largest and most important economies in the future. Here were my experiences (no economic charts of GDP, I promise):

The first thing you notice about a country is what you can tangibly detect with your five senses: see, smell, hear, taste and feel. I will never forget the gilded gold surfaces that seemed to cover everything in St. Petersburg like a glimmering sheen, nor the smells of a Mumbai food market blocks away from the world's densest slum. I remember the rich yet simply seasoned broth of a freshly slaughtered chicken caught in the dusty dirt roads of Anhui, China; my bones rumbled by the beating of the African-origin Olodum drums in a street festival in Salvador's historic Pelourinho district. These things stay with you long after your souvenirs and trinkets collect dust in the attic.

But I am getting ahead of myself. Before you even arrive, you must find a (preferably legal) way into the country. I was lucky enough to visit India just months after their modern electronic visa-on-arrival program was launched: I applied online and received my visa confirmation in 18 hours. On the other hand, getting a Brazilian or Russian visa is an exercise in surreal absurdity, which required what I would describe as bureaucratic near-extortion in the case of the latter (in Brazil's favor, I guess it's not unreasonable for the consulate to close without warning to watch their own World Cup matches). I think I'd rather wait for Godot.

The next thing you notice is how much you take language for granted. Some countries are luckier than others: Brazil, China and Russia have high literacy rates, relatively homogenous populations and standardized languages/dialects. Each language has its own sound and rhythm: from the dancing vowels of Portuguese to the syncopated consonants of Russian to the whining singsong of Mandarin. On the other hand, India is a miniature United Nations within itself: each region has a different religion, ethnicity, cuisine and unrelated language. Ironically, this means that English has become the most popular "bridging" language in India out of all the BRICs, which results in surprising ease for English-speakers to survive in India.

Finally, I have to say something about the people. There are endlessly creative and productive ways that the citizens of the aspiring world powers manifest their skills. Of course, you can observe the results of their labor in incredible megaprojects such as China's high-speed train, which has enabled millions of migrant workers to visit their hometowns on a regular basis; and Brazil-Paraguay's hydroelectric Itaipu Dam on the IguaƧu, which generates more power than the entire country of Paraguay consumes. Yet there is also the simple industriousness of the everyday citizen, which can be found by using Uber to hail a Lada driven by an ordinary Moscow resident as well as the sophisticated leather and plastic-recycling industries operated out of Indian slum-dwellers' homes. Take the brutally efficient subway in Moscow and you will never wait on the platform for more than 3 minutes (which is not something I can say in supposedly fast-paced NYC). Despite the vastly different social and economic development models, the BRICs all depend on its citizens for its resourcefulness, from whom I felt a sense of limitless and immense capability.

What you hear in the Western news about the emerging world is sometimes sensationalist or even frightening. Yes, there's poverty, bureaucratic mismanagement and even wars. However, based off my experiences with the people, I have no doubt in my mind that the BRICs are well on their way to becoming the global powerhouses of the future.

Monday, April 20, 2015

Buy and Forget

For those people who don't want to actively manage their portfolios, I usually recommend VT and ACWV to ppl as passive buy-and-hold core holdings for the stock allocations of their portfolios. These are global stock ETFs, which means that they hold basically all the stocks that are publicly trade-able. The main difference is their weighting methodology.

VT is market-cap weighted. That means the stocks held in it are weighted by the size of the company itself. This is the return of the (dollar-weighted) average investor. It is mathematically impossible to always and consistently beat this benchmark (otherwise, you eventually become the market).

ACWV has a higher allocation to low-risk or low-volatility stocks (here we use risk and volatility interchangeably). The correct way to evaluate the worthiness of an investment is to look at return divided by risk (you should NEVER look at solely the return with no regard for the risk). If an investment B has two-thirds the return of investment A but also two-thirds the risk, then you should be ambivalent between the two investments. However, if investment C has two-thirds the return but one-half the risk of investment A, then you should strictly prefer investment C to investment A.

The theory behind ACWV is that ppl are biased towards buying high risk / high reward stocks and structurally overpay for them. When you bid up the price of an asset, you reduce its potential return. Thus, high risk / high reward stocks have their return reduced below what efficient markets would justify.

Why does this bias exist? There are several theories.
  1. The paradigm described above (our analysis with investments A, B, C) is only true if you have access to risk-free leverage. This is obviously not true in the real world. Due to this leverage constraint, investors who have higher risk tolerance, rather than borrowing 50% to buy a 150% allocation of stocks will instead just buy 100% allocation of 1.5x more volatile stocks.
  2. Another theory is that investors solely look at potential return and do not properly account for potential risk. In this scenario, investors will prefer an investment with 1.5x the return but 2x the risk.
  3. Finally, there is theory that investors have behavioral preference-for-gambling and will pay extra for lottery-like binary outcomes. Regardless of which theory is correct, the empirical data confirms that the low-vol anomaly exists.
Thus I think ACWV should outperform VT on a risk-adjusted basis over the long run. Investors should be careful to adjust their asset allocation to take into account the lower risk of ACWV (e.g. rather than a 60-40 stock-bond allocation, a 70-30 or even 80-20 stock-bond allocation might be more appropriate when using ACWV for the stock allocation).

Tuesday, April 14, 2015

Negative Yield Bonds

In theory, negative yields are impossible. Why would you buy something that pays you back less than what you paid? However, this is exactly what is happening across Europe. Almost a dozen European countries now have bonds with a negative yield. What does that mean and how does that come to exist?

WHAT IT MEANS

The yield is the return received by a bond investor expressed as a percentage of the purchase price. For the sake of simplicity, assume a bond maturing in x years has no coupon and $100 principal, i.e. the bond gives the investor $100 after x years.

If you pay <$100 for this bond, then you will receive a + yield.
If you pay exactly $100, then you get a 0% yield.
If you pay >$100, then you get a - yield.

In effect, a negative yield means you lend someone MORE than $100 with the expectation of only receiving $100 back.

HOW IT COMES TO EXIST

In theory, this bond should never exist. Why would you ever lend more to someone than s/he will pay back? You can keep the cash under your mattress and get a better yield (of 0%) with zero risk! However, this bond DOES exist, and in fact, it is estimated that there is over $2 TRILLION of negative-yield bonds today. For example a 2 year German "bund" (which is Deutsch for bond) has an almost -0.30% annual yield, so you are effectively losing 30 cents annually for every $100 you invest. In fact, Germany, France, Netherlands, Belgium, Finland, Austria, Switzerland, Sweden and Denmark all have negative-yield 2y bonds.

Here is a list of four reasons that I can think of (which is certainly not exhaustive) to justify this situation:

1. RESERVE REQUIREMENTS (RR) and INTEREST ON RESERVES (IOR)

Banks are required by financial regulation to hold a percentage of their assets as reserves with the central bank (you can think of a CB as a bank for banks). Banks can keep their reserves with the CB either in 1) cash deposits or in 2) gov't bonds. So why not keep it all in cash? In normal times, banks receive some interest on their reserves (IOR), just as you would receive interest in your checking/savings account with your bank. However, here's the catch: now some central banks such as the ECB (European Central Bank), SNB (Swiss National Bank), Sweden's Riksbank and Danish National Bank have negative IOR, which is effectively a fee on cash deposits. To a bank that's being charged to hold cash in their reserve accounts, holding negative-yield bonds instead doesn't look so bad.

2. FX REDENOMINATION and CURRENCY BETS

If the Eurozone monetary union breaks up, there will be 19 new currencies. Countries with stronger economic and fiscal positions will almost certainly have their new currencies appreciate. For example, in this breakup scenario, German bunds, instead of paying you Euros (EUR) which would no longer exist, would probably pay out in newly created Deutsche Marks (DEM). Since DEM would significantly appreciate against EUR, the negative yield would be more than compensated. This is a popular idea for journalists to write about in the media, but since the chances of this are insignificant and the mechanics of this FX redenomination is uncertain (the contracts on which these bonds are written have no clause on the possibility of redenomination), this has the least explanatory power out of the four theories here. Still, it is worth mentioning and it's a cheap bet to take (you pay 0.30% annually for a 2y bund but you have a chance, albeit low, of making double-digit returns if the Eurozone falls apart).

A similar thing is playing out in Switzerland and Denmark, which are not part of the Eurozone, but have historically maintained currency pegs with EUR. When the SNB removed the Swiss Franc (CHF) peg, it immediately appreciated by 20% against EUR in one day. Investors who believe that Denmark will do the same thing with its Danish Krone (DKK) peg can purchase Danish negative-yield bonds for a similar bet.

3. "PONZI BORROWERS" or GREATER FOOL THEORY

If you hold a bond to maturity and there is no default, your total return will be exactly the yield at which you purchased the bond. For a negative yielding bond, this means that you are guaranteed a negative total return by holding to maturity. However, if you sell the bond before maturity, your total return will also be determined by your sale price. If your sale price is higher than your purchase price, you will have a positive total return.

An investor who borrows money to purchase an asset with the expectation to sell at a higher price before maturity was termed by economist Hyman Minsky as a "Ponzi borrower". Due to the inverse price-yield relationship of bonds, this means that Ponzi borrowers who purchase bonds must have the expectation that yields will go down. For negative yielding bonds, that means that Ponzi borrowers are expecting them to become even more negative! This might not be so ridiculous, especially if central banks cut their deposit rates even further into negative territory.

Although buying negative-yield bonds may be foolish, there may be even greater fools who are willing to buy them from you later. Hence, the Greater Fool Theory.

4. (LACK of) SUPPLY and (TOO MUCH) DEMAND

Finally, the central banks themselves are buying these bonds in large size. The ECB has committed to buying over $1.2 trillion of assets over the next 1.5y, most of which will be Eurozone gov't bonds. It is willing to buy bonds with yields as negative as -0.20%. Furthermore, there is little sign that gov'ts will pick up bond issuance in any size, keeping supply very tight, as gov'ts aim for deficit targets mandated by Eurozone treaties. Denmark has actually completely stopped issuing new gov't bonds.

IMPLICATIONS

Ponzi schemes end when there are no more new investors willing to pay ever-increasing prices to existing investors. This inevitably happens with all Ponzi schemes. However, when the perpetrator of the scheme controls both supply (through official fiscal constraints on gov't borrowing) and demand (through bank regulatory requirements as well as direct outright purchases by the central bank), the scheme can be perpetuated for much longer than you'd think.

Monday, January 12, 2015

Chronicles of Conrad as a Coder

I have never worked in the tech industry before.

  1. First day to work- try to build the work computer that I choose parts to customize and find out that my graphics card doesn't have linux drivers. I stay till midnight but still can't fix it. I get in to work early Tuesday and fix it just as people are streaming in. Phew.
  2. First week- so our company is a PaaS so we end up doing a lot of tech support for tech guys. I find out that my knowledge is in no way superior to the programmers asking me questions- it takes me a full work day to answer questions that my coworkers take half an hr to answer. My support work basically involves me verbally asking my coworkers and then regurgitating back to the people with questions. And my speed for this particular sort of work is 16x slower than my coworkers.
  3. Over the wkend, my computer completely breaks because of the graphics card issue. The more I try to fix it, the worst it gets, and it gets to the point where I can't even get to the GRUB bootloader screen. I learn a lot about mounting file systems, installing desktop managers, and debugging from commandline. I have also installed and reinstalled various flavors of linux over 10 times. I spend the whole Monday trying to fix this issue but failing. I had the foresight to bring a laptop to work and did not have the foresight to bring my power cable. I have to pop out to buy one and realize that Mac power cables are a total ripoff. Another day spent working at a tech company not using a computer. Manage to fix it Tuesday morning again- I make sure everything is well documented in case my computer blows up again.
  4. Second week- I move from my temporary stay that is 30 seconds away from work to my friend's place that is not in central London. I find out that what seems like a 30min travel time on a good day could easily become 2hrs+. Then the climax: the train station conductor convinces me to board this train that is supposed to go in to central London. Instead, it is a direct train going to Brighton with no stops in between. Brighton is on the UK shoreline and is a "classic British beach town". My coworkers hear about this, think it's hilarious, and encourage me to check it out before I come back.
  5. At end of this second week, it is getting close to Christmas, and I realize everyone is going away for vacation and people are advising me to stock up 3 days of rations because all transportation and restaurants will be closed... I ask if I can take some time off as well. I'm going back to HK so I ask for 2.5 wks of vacation... less than two weeks in. I fully expect the response to be "yes, why don't you just take an extended vacation and not come back".
  6. My third wk (and last wk before vacation starts) is nice and peaceful with no major accidents. Yay! Well I was supposed to experience my first deploy to the live website, but that occurs at 6am in the morning so as not to affect the workflow of our customers. Needless to say, the trains failed me again. I get in at the very end of the deploy. In time to share a post deploy celebratory breakfast with everyone. All in all, I consider my performance this week to be stellar in comparison to the other weeks. I jet off Friday night to HK.
  7. While in HK, I encounter what seems like a problem with my company's email server. I am unable to send emails for multiple days. That sounds bad- I'm just going to disappear for 2.5 wks and not respond to any work emails? It turns out that this time it actually isn't my fault. HK PCCW blocks their users from sending requests to non-whitelisted smtp servers because of spam. Literally the whole of HK needs to use their email server. I am speechless. I also end up tethering my phone a lot.
  8. On new years eve, I notice an irregularity on the web server and go in to try to fix it. I run a bunch of monitoring tools after ssh-ing into the server, identify the problem process, and decide to kill it. Then the server magically comes back up. I believe I am a true hacker. I later find out that my coworker had also saw the problem and went in and actually fixed it as I was fiddling around. Well... at least I tried. Hopefully whoever's process I killed won't be too mad at me.
  9. My first week back after the break- I am now super up to speed with everything, I can do support in 8x the time instead of 16x the time now, and I actually debugged and saved a couple servers from certain death! I am truly, truly a skilled and seasoned programmer now. Of course, I did restart nginx on our load balancer instead of reloading it, and brought down the thousands of websites hosted on our company for a couple minutes, but that only just a scare.
  10. It is now Friday of my fourth week. I am taking on cool side projects such as writing scripts for other people to use. Clearly I am a pro coder now. Here is one such script: clone a git repository of your config files (bashrc etc), and put them into your home directory by creating symlinks. Well but then of course you should create a backup folder for the configs that you are writing. Let's put them in ~/backups. Oh wait, that's weird, ~ doesn't expand to /home/username/. I just created a ~ folder in my current working directory, with backups etc in it. Well I guess I'll just "rm -rf" it.
 Let us just pause for a second to bask in the ramifications of this.

For the non-tech initiated, I just removed everything in the home directory. rm -rf is a locust that will go in and eat and kill and destroy anything in it's path. And I just released it on basically everything*. And there is no such thing as the trash folder where us pro coders play. Nothing is recoverable because you are expected to know what you are doing.

Let us pause again and imagine the worst case scenario.

* not everything. I guess "rm -rf ~" is better than doing it on "rm -rf /". But it sure seemed like everything then.