August 9, 2013

Hushmail - Lavabit - Where does the madness end?

Lavabit abruptly shut down today because its owner, in his own words, refused "to become complicit in crimes against the American people." What he means by that we will perhaps never know, due to the accompanying gag order.

But I can't help speculating. My best guess is that the government tried to get Lavabit to do what Hushmail has implied is within the bounds of what a government can do: compel a company to abuse the trust placed in them by distributing compromised software with a government backdoor.

But if a government can do that, then where does the madness end?

Can Apple be compelled to send a compromised version of iOS to a particular iPhone, e.g. keeping the microphone and camera on at all times, sending data to the NSA? Can Google be compelled to do the same for Glass? For a single "target", or even for larger group of "foreign nationals"?

Can Cisco, Juniper and Alcatel-Lucent be compelled to implement functionality in their equipment to siphon off certain network traffic around the word, for the NSA to study in Fort Meade? That would likely make criminals of these companies' employees, at least in other jurisdictions than the US. As unlikely as that sounds Microsoft has already made statements indicating that they (and any other US based company) can be compelled by the US government to hand over personal data stored in EU data centers. That would probably be a crime in most EU countries; e.g. in Sweden it would likely fall under "unlawful intelligence gathering" and a carry prison sentence of up to 4 years.

So where does the madness end? Perhaps nowhere. Perhaps that's why the US government is so afraid of Huawei and ZTE; they know what they themselves are prepared to compel a US company to do, so cannot imagine that Huawei or ZTE could ever say no to the Chinese.

Using force to coerce otherwise law-abiding citizens to commit crimes, that used to be the hallmark of mafia. Has it now become a cornerstone of civil service? We need the UN to step in or something. We need some sort of international treaty.

July 28, 2013

Hyperloop lets you travel on a resonant acoustic wave

Elon Musk is a fascinating guy, and his Hyperloop concept equally so. Now that the details have started trickling out, almost in the form of a riddle, I can't help speculating on what it is.

So, in riddle form:
It takes you from LA to SF in 30 minutes,
it leaves when you arrive,
it can store energy over many hours or even days,
it can't crash,
Elon Musk calls it a "Hyperloop" and
it's not an evacuated tunnel. What is it?

The best speculation I've seen so far is Charles Alexander's. My guess is a variation on the same theme: Elon Musk's Hyperloop is a double tunnel connected in a loop, designed to resonate acoustically at a low frequency with "standing waves" traveling around the loop, each wave capable of carrying a small capsule with goods or passengers at almost the speed of sound.

My knowledge of acoustics is far too rudimentary to go into the physics (or even feasibility) of this design, but my gut tells me that it should be possible to generate standing waves even in a very long pipe or tunnel, and it's well known that acoustic waves can be used to exert a force on an object. The video below shows a beautiful example, albeit on a significantly smaller scale.

As the term 'standing waves' implies these are not ideal for travel. But when you connect the ends of the tunnel into a loop you remove the edge conditions on the wave equation and I would not be surprised if there are then solutions with similar energy preserving characteristics as a standing wave, but where the wave fronts instead travel along the tunnel at just about any speed up to the speed of sound. Imagine the droplets in the video being capsules carrying goods and people, and instead of levitating, being pushed through a tube at almost the speed of sound. That's what I think the Hyperloop is.

Again, I haven't made a single calculation to verify this design is even possible. Instead I will prove my case in prose!

It takes you from LA to SF in 30 minutes

This means you must be traveling at about the speed of sound. Let's say 90% of the speed of sound, pushed along by a traveling resonant wave going around the Hyperloop.

(It could be that there's a pure traveling wave solution to the wave equation with favorable energy preservation characteristics. My gut however arrived at this design by first imagining a standing wave and then slowly phase shifting it up to speed, while fulfilling the wave equation. It therefore tells me something weird could happen as velocity approaches the speed of sound.)

It leaves when you arrive

Clearly, if it's a standing wave then you'll have HZ departures a second to choose from. No waiting at the station. Just crawl into a capsule and be catapulted up to speed before entering the Hyperloop.

It can store energy over many hours or even days

This is what gave it all away. Just kidding, but there aren't that many designs that can store energy for a longish time. Here it would take some time to build up the resonant standing wave and that would in effect be a form of energy store. My gut tells me it's not entirely impossible that you could build up wave energy during the day using solar and use it during the night.

But again, I could be completely off; a combination of gut feeling and prosaic elegance is not certain to lead to revolutionary transportation system design.

It can't crash

Steering of course would be trivial. But also, if there was ever a terror attack or something like that the tunnel would be opened up to the outside atmosphere. That would immediately ruin the resonance and all capsules should come to a screeching halt. This sounds remarkably safe for a "train" traveling at near the speed of sound: if there's any problem with the "rails" up ahead the "cars" would be notified at twice the speed of sound, in order of distance to the break, and will automatically lose power.

Elon Musk calls it a "Hyperloop"

Elon Musk is a smart guy, and super logical. I'm willing to bet he would not call it a "loop" if it wasn't, or if that fact was not important to the functioning of the system. This is one of few designs I can think of where the loop property is essential. You can't have a traveling resonant wave without it.

UPDATE 28/7: After the discussion on Hacker News I'd like to clarify that
  1. the reason it might be better to push capsules along with a sort of acoustic propulsion like this is of course that it may require less energy than overcoming the air resistance with some other method of propulsion, and/or be cheaper to build,
  2. using a "rapidly phase shifting standing wave" would avoid having to travelling at exactly the speed of sound (as in Charles' proposal), which my gut tells me would be beneficial because otherwise you'd likely have supersonic airflow somewhere over the craft and that usually ruins efficiency, and finally
  3. the energy economics of a system like this would of course depend heavily on the rate of energy dispersion along the tunnel, which would depend heavily on the stiffness of the tunnel wall (and therefore difficult to calculate), but my gut tells me that low frequency sound e.g. from blasts of various kinds sometimes travel several times around the earth, and that implies that propagation characteristics could be quite good.
I rest my case.

Vote on Hacker News

March 17, 2013

What's wrong with the Cyprus bailout

The financial blogosphere is ablaze with talk of a bailout in Cyprus. The short story is that Cyprus has been forced by Germany to rob deposit holders of 6.7% - 9.9% of their bank balance, in the form of a so-called 'upfront one-off stability levy'. Not unsurprisingly people are screaming theft, bloody theft.

After some thought I have to say I agree, but with slightly more nuance: There's nothing immoral about imposing losses on deposit holders. Banks fail. People lose money. That in itself doesn't make it theft. Money is not unconditionally safe just because it's on deposit with a major financial institution.

But when loses are imposed in a way that benefit some at the expense of others, then we are approaching that moral boundary. Bankruptcy law typically says that loses are to be imposed in a certain order:
  1. First shareholders are wiped out,
  2. then junior bondholders,
  3. and only then senior bondholders and (uninsured) deposit holders.
In societies as far back as Rome it has been considered a crime to circumvent this order, to benefit junior creditors at the expense of senior.

But in modern day Europe there's also deposit insurance. This is usually a guarantee that deposit holders will receive their first 100 000 € back from the government, if their bank should fail. The government of course has other liabilities, like government bonds, but in my opinion it can at least be argued that deposit insurance should be seen as senior to bonds.

This gives us an idea of the order in which a "morally just" bailout would impose losses in a situation where both the banking system and the government are insolvent:
  1. First bank shareholders should be wiped out(!),
  2. then junior bank bondholders,
  3. then senior bank bondholders and uninsured depositors,
  4. then government bond holders,
  5. and finally, only if the above doesn't cover it, insured deposit holders will have to take a haircut.
We seem to be pretty far from this in the case of Cyprus: Shareholders will likely be diluted (because deposit holders will receive some "compensation" in the form of bank shares) but not wiped out. Junior bondholders on the other hand may be. Uninsured depositors will receive 90 cents on the Euro while senior bondholders will likely be made whole(!), and so will government bondholders. But insured depositors will take a 6.7% hit.

Many say this is still the best option. If loses are imposed on senior debtors or government bondholders there will be "contagion", and if shareholders lose faith the banking sector could implode. Safer then to take a little from the many, hopefully diluting the sense of loss enough to get away with it.

But a crime isn't suddenly okay just because you have a good reason. As painful as the failure of a major financial institution may be I don't think it compares to the pain we all have in front of us if we abandon the rule of law. So, in my book the proposed Cyprus bailout is theft. Yes, even if you call it a tax.

Fiat justitia ruat caelum, "let justice be done though the heavens may fall." That's my 2 cents at least.

December 17, 2012

It's rational to pay far more

A while back I read a post by Chris Dixon where he lays out the logic for "build vs. buy" and argues that it may be rational for a big company to pay quite a lot to get their hands on a hot new product.

His argument goes something like this:
Big company estimates that hot product can boost its market cap by $500M, and that they'd have a 50% chance of building it for $50M. The alternative is to acquire little startup that has already built it. Assume there are no second chances and ignore time, then the upper bound of what big company would rationally pay to acquire would be $100M.
As Chris points out an M&A group at a real "big company" would of course have a much more sophisticated model anyway, taking all kinds of things into account. With that said, I think it's interesting to note that (even) in this simplistic example it is rational to pay 3x more than what Chris thinks.

Why? Well, big company only really has one choice: acquire little startup or don't. Now what is the expected outcome if they do acquire little startup? Easy, it's a boost in market cap of $500M - X, where X is the cost of acquisition. What's the outcome if they don't acquire little startup and instead try to build the product themselves? That depends. If they succeed then the gain is a whopping $450M, but if they fail they've spent $50M for nothing. Since the probability of outcomes is 50/50 the expected value is just $200M. This means that if big company buys little startup for anything less than $300M they can expect to do better than if they try to build. Don't believe me? Draw the decision tree.

This is a very simplistic model, but the result indicates a principle that in my mind bears generalization: the acquisition valuations are dominated by opportunity cost, not development cost. In other words; opportunity cost is what drives valuations of little startups.

February 23, 2012

Forget about the money - it's opportunity cost that matters

Bryan Caplan and Paul Krugman are right about one thing: the Austrian business cycle theory (ABCT) is flawed [1][2]. Here's my attempt at explaining why entrepreneurs are fooled by credit expansion and why the consequences for the economy are so severe.

The principle of subjective value

One of the key propositions of Austrian economics is that both utility and cost are subjective. We all value different things in life, and the true cost of any action is opportunity cost, i.e. the value of the highest-valued alternative forgone in taking the action [3].

Hayek placed such importance on this concept of subjective value that he defined his subject of study not as "economics" (which Aristoteles defined as the art of household management) but as "catallactics", the order brought about by the mutual adjustment of many individual economies in a market [4]. But for some reason Hayek decided to leave these principles behind when he constructed his theory of the business cycle. Suddenly money, and especially the time value of money, took center stage. The result is in my opinion a rather contrived explanation based on aggregate concepts such as the "natural interest rate" and "relative price changes". This has been widely criticized [5].

Instead, let's see how the argument goes if we for a moment forget about monetary aggregates and instead stay true to the principle of subjective value.

Credit expansion lowers opportunity cost

Remember that all costs are really opportunity costs. In a monetary catallaxy opportunity costs depend on two things: how accessible money is and what alternative use money has. This statement may perhaps surprise some of my readers because mainstream economics often keeps the former of these out of the equation (as a constant income) and treats the rest separately as a "utility maximization problem" [6]. But if we go back to the definition, "the opportunity cost of any action is the value of the highest-valued alternative forgone in taking that action", it's quite obvious that the highest-valued alternative to buying a car may very well be the free time and rest you could have had instead of working extra hours to pay for the car.

Credit expansion lowers opportunity costs simply because it tends to make money more accessible to more people. For example, there is a world of difference between taking out a second mortgage to buy a car and working extra night shifts to do the same. In the first case the buyer may hardly see an opportunity cost at all, whereas in the latter case the buyer has obviously already foregone something valuable, her time and energy, in order to afford the car.

Austrians often make a distinction between loans to productive businesses and those made to consumers. In general they are in favor of the former but more ambivalent about the latter. From this viewpoint I think there's a simple explanation for that ambivalence: when a loan is made to a business that invests in productive capacity the borrowed money doesn't come easy to anybody. The entrepreneur knows she will lose her business unless she can put the money to productive use and pay back the loan, and the employee or supplier that gets payed from those borrowed funds has to work just as hard for their money. This means that the loan will not have a significant impact on anybody's perceived opportunity costs.

Compare this to the case where a loan is made to a home buyer. The buyer pays the seller. The seller has most likely lived in the home for some time over which the property has appreciated (and money has depreciated). The seller therefore makes a significant profit with very low perceived risk. Other home owners see those profits and regard them as easily available to them as well. It is true (as you are perhaps saying to yourself) that the seller often has to buy a new home; everybody needs somewhere to live and so on. But that just means the money is transferred to another seller, and another, until it reaches somebody who can use the profit for something other than buying a home.

It should also be noted that exactly where the money flows is perhaps not so important. The important factor as I see it is people's perception of how accessible money is to them. This feeling of having access to wast amounts of money, just a phone call away, simply lowers the perceived opportunity cost of goods and services - which essentially has the same effect as lowering prices. Some economists call this the "wealth effect" and give it a positive spin. I think we'll realize sooner or later that it's in fact a form of price instability, with potentially disastrous consequences.

This concept of credit that lowers perceived opportunity costs is similar to the "unsound credit" that Mises so often lamented, but there are some important differences. For example, if my understanding is correct Mises was referring to credit extended to borrowers that are or will be unable to pay the money back. To me that seems of less importance. If a loan is extended to a business that does its best to invest it wisely (in wages and capital goods) then that should have the same effect on the subjective perception of opportunity costs for those involved regardless of if the business fails or succeeds. It can perhaps even be argued that lending to a business that fails would tend to increase perceived opportunity costs, for the lender that is, who can no longer look forward to repayment.

How credit expansion can distort a market

If (some sorts of) credit expansion lowers opportunity costs for many people then it should come as no surprise that it causes a boom. But how can it cause the massive damage known as a recession?
It would be a serious blunder to neglect the fact that inflation also generates forces which tend toward capital consumption. One of its consequences is that it falsifies economic calculation and accounting. It produces the phenomenon of illusory or apparent profits. 
- Ludwig von Mises
Entrepreneurs rely on the market response to guide them towards profitable new businesses. Credit expansion will sooner or later lead to price increases. But the effect on opportunity costs is much more immediate. This in turn has a sharp and immediate effect on the market response, not in terms of prices but in terms of quantities demanded at a certain price. This is what fools entrepreneurs. They see "strong demand" for their new product or service at profitable price levels, but their customers are only willing to pay those prices (or even any price) as long as money is easy to come by and has no important alternative use. The market response to a new product or service is incredibly difficult to predict, but nearly impossible to second guess.

This can also be understood as a distortion of the profitability requirement itself. Profitability doesn't depend only on market prices. It also depends (perhaps even more so) on market quantities. For example, just because you can sell a single burger for $10 at some street corner doesn't mean you can open a profitable burger joint there (you have to sell hundreds every day). When credit expansion lowers opportunity costs for consumers they tend to be less careful with their money. Entrepreneurs interpret this as demand for their product or service. Investors and bankers carefully review the numbers, which look good, and chip in. The result is investment in an economic activity which is dependent on continued credit expansion for its profitability. When the boom is over demand vanishes and "phony profits evaporate", leaving a fooled entrepreneur with a failing business behind.

There may be a third way to understand this problem. In a sound catallaxy market participants trade value for value with money acting as the medium of exchange. If we isolate a single market participant, say a car buyer, and regard the interaction between this participant and the rest of the catallaxy then an interesting observation can be made. In an undistorted market the car buyer would have to offer the rest of the catallaxy something of value in exchange for the car. Let's for a moment ignore money, which is only the medium of exchange, and say that he offers his labor. Since free trade is voluntary he would only make that trade if he placed a higher expected value on the car than on his labor. We rely on this one-way valve principle when we assume that a catallaxy as a whole will trend towards value creation and capital accumulation. But when credit expansion lowers opportunity costs this property breaks down. The car buyer now expects to trade nothing but some small portion of his constantly increasing home equity in return for the car. I think this may to some extent explain what Mises referred to as "capital consumption", especially when considering the fundamental human bias of hyperbolic discounting of future rewards [7].

The anatomy of a boom-bust cycle

Now lets apply this understanding to a typical boom-bust cycle.

There is no means of avoiding a final collapse of a boom brought about by credit expansion. The alternative is only whether the crisis should come sooner as a result of a voluntary abandonment of further credit expansion or later as a final and total catastrophe of the currency system involved.
- Ludwig von Mises

First an expansion in (some forms of) credit lowers opportunity costs for many people. This distorts the market response, at this stage not so much in prices as in quantities demanded (at a certain price level). Entrepreneurs misinterpret this as genuine demand for their products and services and therefore "malinvest". From this perspective it should come as no surprise that the products and services produced would tend to be of a dispensable nature, such as luxury goods, travel and experiences. The longer the boom continues the more economic activity sustained only by credit expansion is built up.

If credit expansion continues for long enough prices will start to raise. When they finally do people are forced to make more and more difficult trade-offs between alternative uses of money, i.e. their opportunity costs go up. This increase in opportunity costs as perceived by many people will sharply lower demand for products and services that previously relied on credit expansion for their profitability. This will be seen as deteriorating economic conditions, causing banks to tighten their lending standards and credit expansion to slow. This in my mind explains the short burst of relatively strong price inflation often seen just before a crash.

Once credit stops expanding and starts to contract money will become even harder to come by than usual, causing the process above to work in reverse. A Keynesian may conclude that in uncertain times the demand for money itself becomes excessive thereby causing a fall in aggregate demand. An Austrian may instead conclude that in uncertain times many market participants may perceive future consumption as a highly valued alternative to immediate consumption options, because access to money in the future is uncertain and/or expected to be laborious. But perhaps it is sufficient to simply say that when credit is contracting money is harder to come by than when credit is expanding. In any case this has the effect of increasing perceived opportunity costs and distorting the market response in the opposite direction: quantities demanded at profitable price levels become too small to sustain even businesses that would under more normal circumstances be profitable.


At least to me this line of thinking provides a convincing explanation of why entrepreneurs are fooled by credit expansion and why the consequences for the economy are so severe. It also hints at why luxury goods are hardest hit in a recession and why a short burst of price inflation is often observed just before a crash.

Note also how remarkably close we come to the Keynesian model, at least during the bust. The only difference is really that from this viewpoint not all of the reduction in economic activity is "spare capacity" or an "output gap"; some of the economic activity built up during the boom would not have been profitable in the first place had it not been for unsustainable credit expansion and the resulting lowering of opportunity costs. The policy challenge once in recession is getting rid of the unsustainable economic activity, without hurting potentially profitable businesses. Low interest rates, quantitative easing and fiscal expansion all make sense - as long as they don't overcompensate and bring opportunity costs back down to artificially low levels.

I hope to follow up this post with one aimed at those more familiar with mainstream economics. In that I plan to include a mathematical formulation of a "generalized utility maximization problem" (involving both income and consumption and taking the combinatorial nature of choices into account) most likely as a Mixed Integer Non-Linear Programming (MINLP) problem [8]. I think this could fit nicely as a microfoundation [9] to an agent-based model [10].

Be the first to know when this exciting sequel is released. ;) Follow me on Twitter.


[1] Bryan Caplan, Why I Am Not an Austrian Economist;

[2] Paul Krugman, The Hangover Theory;

[3] The Concise Encyclopedia of Economics: Austrian School of Economics;

[4] Wikipedia: Catallaxy;

[5] Social Democracy for the 21st Century: Bloggers Debate the Austrian Business Cycle Theory; 

[6] Wikipedia: Utility maximization problem;

[7] Wikipedia: Hyperbolic discounting;

[8] Mixed Integer Nonlinear Programing, M. Bussieck and A. Pruessner (2003);

[9] Wikipedia: Microfoundations;

[10] Wikipedia: Agent-based model;

February 16, 2012

An entrepreneur's business cycle theory

Over the last five years or so I've become increasingly interested in macroeconomics and monetary theory. At the center of this subject is the age-old question of what causes the business cycle, and especially the more pronounced "booms and busts". All the schools of monetary theory have their explanations. The Keynesians see the market economy as fundamentally unstable and in need of constant intervention [1], the Modern Monetary Theorists seem to think a bust is an unavoidable consequence of a prolonged imbalance of payments between the private and the public sector [2] and the Austrians have a complex hypothesis about artificially low interest rates fooling entrepreneurs to "malinvest" in stages of production that are too far removed from the consumer [3].

If you don't believe me that the Austrian explanation is rather complex and contrived watch this interview with Lawrence H. White, Professor of Economics at George Mason University. Let's just say he's not exactly crystal clear on what really causes that "cluster of (entrepreneurial) errors".

(Some more background is provided in Brian Caplan's explanation of why he's not an Austrian [4], Paul Krugman's refutation of what he calls the hangover theory [5] and Brian J. Stanley's defense of the same [6] if you're interested.)

Now the interesting part: I think I can formulate a clear, logical and plausible explanation for how loose monetary policy causes a boom and bust cycle. I know, that sounds pretentious, but please bear with me. :)

My theory of the business cycle takes Hayek as its starting point but goes like this: Entrepreneurs are not fooled by artificially low interest rates. Entrepreneurs are fooled by a phony market response, the market in turn is "fooled" by credit expansion and credit expansion is caused by artificially low interest rates. Now let me try to briefly explain what I mean by that.

What is in a price

It's easy to ascribe more importance to money than is really warranted. Money is just the medium of exchange. What people really want are the things that money can buy [7].

Likewise, we put a price on things in the monetary unit, but it's not that we want to keep the money that stops us from buying something expensive, it's that we will then not be able to afford other things, or we will have to work hard to make more money. 

If you really think about it a "price" is whatever a customer forfeits in order to buy a product or service, a sort of opportunity cost. That's unique for every customer (even if the monetary price is the same) and largely depends on how accessible money is to them, and what alternative use they have for it. Anyone who has run a business knows this intuitively, that's why "market skimming" is so popular.

Credit expansion and price stability

When economists talk about the effect of credit expansion on price stability they usually mean the tendency for monetary prices to (sooner or later) rise, causing what we call inflation. But monetary prices are "sticky". The much more immediate effect is that credit expansion lowers the opportunity cost of many things for many people, because money becomes easier to come by.

Suddenly you have to forfeit less to be able to afford a certain product or service. For example, who do you think would pay a hundred dollars for a pedicure for their dog if they had to take an extra job to (first) earn that money? How about if they had to forfeit a tiny portion of their $500k+ home equity, a few hours worth of "the appreciation you get in a normal market" [8]? :)

You may say that's just inflation, and you would perhaps in some sense of the word be right. It spreads like rings on the water across the economy in much the same way as inflation does. But it's a stealthy sort of inflation. It doesn't show up in the statistics and central banks pay no attention to it (and if they do they call it the "wealth effect" and regard it as something positive).

Why entrepreneurs are fooled

Predicting the market's response to a new product or service is incredibly difficult. So difficult in fact that most experts on the subject have accepted that it's often stupid to even try and better to continuously measure market response and iterate on your offering. In startup lingo it's called "customer development" or "finding product/market fit" [9][10] but it's basically the same idea that entrepreneurs have employed for centuries (knowingly or subconsciously); you feel your way to profitable business by continuously probing the market, testing your hypotheses, trying new things.

But credit expansion distorts the market response. Entrepreneurs find what they think is new profitable business, because customers are willing to pay more for the product or service than what it costs to produce, but they are only willing to do so as long as money is "artificially" easy to come by (and have no more important alternative use). When credit stops expanding and starts to contract customers are gone with the wind, leaving fooled entrepreneurs with a failing businesses behind.

In order to avoid that fate entrepreneurs not only have to understand that interest rates are being held too low and that credit is expanding too quickly, they also have to guess in exactly what way the market response for their particular product or service is distorted. The market for a new product or service is incredibly difficult to predict, but more or less impossible to second guess. That's why entrepreneurs are fooled. That's why they "malinvest" in a correlated fashion, forming a "cluster of errors".


[1] Wikipedia: Keynesian economics;

[2] New Economic Perspectives blog, Modern Money Primer;

[3] Wikipedia: Austrian Business Cycle Theory;

[4] Bryan Caplan, Why I Am Not an Austrian Economist;

[6] Brian J. Stanley, Why Don't Entrepreneurs Outsmart the Business Cycle?;

[7] Paul Graham, How to Make Wealth;

[8] YouTube: Peter Schiff Was Right 2006 - 2007 (2nd Edition);

[9] Steve Blank, The Four Steps to the Epiphany: Successful Strategies for Products that Win;