Wednesday, October 28, 2009

Why write a blog?

Before I had a blog, I wondered why people wrote them. Now that I have one, I wonder why other people write theirs. Because I know my reasons, and I am sure they are not shared by many other people.

I've always been the kind of person who liked learning and thinking about a lot of different things. Inevitably this means that I wind up having opinions on diverse topics. Which means that I regularly run into things that I have opinions about that I couldn't share because nobody in my immediate environment really cared. This blog has become a place for me to say those things. If nobody cares to listen, I still enjoyed getting my thoughts in electronic form.

Now to reasons I don't do the blog. I don't do it to share my personal life. My personal life is private, and the people I want to tell it to can hear about it directly from me. I don't do the blog for economic reasons. Admittedly I turned on ads out of curiosity for what it would be like. But to date I've made less than what I usually spend on lunch. I've made less than I get from 5 minutes of paid contract work, and have no shortage of potential contract work available right now. I don't do it out of desire for fame. I've seen enough fame in my life. And besides the built-in audience when I spent years posting on Perlmonks is much bigger than I'm going to get with a random blog.

So this blog is an outlet for expressing thoughts of a kind I've always had. Nothing more, and nothing less.

Now what triggered this particular post? It was a comment on my first entry that thought I was missing a big opportunity by not writing more about that topic and taking advantage of my current position as an expert. I simply don't see things that way.

Over my life I've been seen by people as an expert on a number of things. Lately I've been compensated fairly well for my expertise in Perl, A/B Testing, and general data manipulation. I don't think that being seen as an expert on spaced repetition learning would add much. I've also become moderately well-known in multiple communities. There is no need for me to try to become well-known for having taught a course. So I don't see the opportunity.

Furthermore there is a cost. I've always disliked people who took a good idea or story and expanded it with fluff to make the most of it. Why would I seek to be a kind of person I don't like? It makes no sense to me.

The same will go in the future. If I say my piece on a topic and don't feel I have more to say, I won't say more. If I say more it is because I feel I have more to say.

Tuesday, October 27, 2009

Stock buybacks shouldn't change stock prices

Companies are owned by the shareholders. Companies try to make profits. And when they do, some combination of three things happens with those profits.
  1. They get reinvested in the company.
  2. They get paid out as a dividend.
  3. Some shareholders are bought out in a stock buyback.

The mechanism of the first two is generally understood. But there is widespread misunderstanding of the third. Inevitably when a stock buyback is announced, you'll find articles that insert helpful explanations about how stock buybacks increase the stock price, helping investors.

Every time you see one of those explanations, I guarantee you that the person who wrote it is ignorant about basic financial matters. That appears to be most of the media.

Why, you ask? Because changing the stock price is not the purpose of a stock buyback. And to first order there is no effect on stock price. The reason for that is that the stock price is the value of the company divided by the number of shares. As the company buys back its stock, the value of the company drops by the money spent, and the amount of stock outstanding drops the same. Investors are rewarded by having those who wish to be bought out, bought out. And, unlike with a dividend, investors who didn't want to sell don't get taxable income.

So, for instance, if a company worth $50 billion with 10 billion outstanding shares of stock buys back $5 billion dollars, then the value of the company drops from $50 billion to $45 billion (because it spent $5 billion in cash), the amount of outstanding stock drops by 1 billion, and the remaining 9 billion shares are still valued at $5/share. This is finance 101 stuff. It falls right out of the CAPM.

Now I made a comment about "first order". Why? Well because there are several second order effects that realistically could cause stock prices to move. What sort of second order effects could those be?

  • It is always hard to buy large amounts of stock without increasing the price (and thereby cause inefficiency in your purchases). However buybacks are always announced in advance prominently enough to let interested shareholders know this is a good time to sell off large positions, so it works out.

  • Different investors have different opinions on the true value of the company. The ones you buy out tend to be the more pessimistic ones, leaving you with people who think the stock is worth more. This effect is generally small.

  • The market has many people who are confused about finance and who may expect prices to go up. If lots of people expect prices to go up, that's a self-fulfilling proposition. But it tends to be a temporary self-fulfilling proposition, and Wall St is very good at earning money from people predictably making such mistakes.

  • The company's cash holdings fluctuate less in value than the other assets that make up the company. Therefore as the relative balance of cash and other moves towards being more heavily weighted with "other", the volatility of the stock price increases. If you've studied options you'll know that increased volatility increases the returns for people holding options. Those returns come from somewhere, and the somewhere they come from is existing shareholders. Therefore the stock price should drop slightly. In theory. If investors are informed enough to pay attention.


I have no idea what the net result of these effects is on current stock holders. However all of the listed effects improve returns for option holders. Given that the people who make decisions about how to return money to shareholders (typically the CEO and board of directors) also tend to be the largest holders of long-term options, I have to wonder whether the ever-growing popularity of stock buybacks has more to do with avoiding giving investors unwanted ordinary income, or with improving the value of options held.

Monday, October 26, 2009

What are financial derivatives?

This weekend my wife convinced me to see Michael Moore's movie about Capitalism. It had its good points, its bad points, and its silly points. One of the silly points was multiple purportedly smart people finding that they couldn't explain what a financial derivative was.

So I decided to see if I could come up with an easy to understand explanation. And then explain the risks and benefits in (hopefully) common sense terms.

A financial derivative is a contract that has value based on what some other thing might do.

Let me illustrate with a concrete example. A put is a binding contract saying that person A can sell person B something at a fixed price on a fixed date. There is no obligation to sell. But if A wants to sell, B has to buy at that price. No matter what the current price happens to be.

Why would someone buy or sell one of these? Well suppose I bought some stock whose price I think will fluctuate, but which I think will wind up higher. So I think I'll make money, but just in case I can buy puts at somewhat below the current stock price as insurance. If the stock goes down I can sell the stock at the pre-agreed price, and I limit my losses. Conversely the person who sells me the put doesn't think the price will go down either, which is why they are happy to sell me my insurance.

Please note this carefully. Neither the buyer nor seller here believes the put will be used. Therefore it can be purchased cheaply. (This is why it makes a good insurance policy.) Yet the put has value to the buyer and risk to the seller, and therefore money has to trade hands for the contract to be worthwhile to both.

The next thing to notice is that virtually any type of contract you can dream up can be made into a derivative. For instance if you want you can do the reverse of a put. Rather than saying that B has to buy from A at a fixed price, you can say that B has to sell to A at that price. Those actually more popular and are called calls.

Both puts and calls are called options because they give someone the option (but not obligation) to do something at some point in the future. In fact the options that are given to employees are almost always calls. (Almost, but not actually always. One job rewarded me with a contract that was carefully constructed to legally be a bond, and not a call. That was done for tax reasons.)

Now a warning about derivatives. In theory derivatives can be used to limit and manage risk. Supporters generally introduce derivatives by illustrating how all parties to them can use them to manage risks. However they can also be used to create and concentrate risk very rapidly. For instance if you sell many puts very cheaply and then the price of the stock falls, you can quickly be out an insane amount of money. This is not a hypothetical risk. Every so often a rogue trader will accidentally destroy a bank or other large financial institution by making big options trades that go sour. A good example is Barings Bank. Let me stress that this typically happens by accident, not intent. (Usually, as with that case, someone does something stupid, loses money, then keeps doubling up their bet hoping to get out of trouble. If the string of bad bets goes long enough, the company goes broke. Which makes me wonder how many mistakes are made then are successfully corrected without anyone being the wiser...)

So derivatives are contracts. People can buy and sell them. But how should you price them? Well the standard answer for puts and calls is to apply the Black-Scholes pricing model. I won't go into the math, but here is the idea. What they do is construct a portfolio that, managed very carefully, will in the end come to the same effect as a put or call. The price of this portfolio is theoretically the price of the option. Why? Well if the portfolio is less than the option, then you can buy the portfolio and sell the option, manage the portfolio, and you make a guaranteed profit. (Making some combination of trades with guaranteed profit is called arbitrage, and people on Wall St are very, very interested in finding opportunities to do this because arbitrage is free money.) Conversely if the portfolio costs more than the option you can buy the option, sell the portfolio, manage the portfolio and again make money. So in an efficient market the prices have to match.

OK, this is all well and good. Now let's move on to something more fun. Given that the complexity of derivatives are only limited by the imagination of the people writing the contract, here is no shortage of interesting possibilities. Let us focus on swaps.

A swap is just an agreement for two parties to trade things of equal, or close to equal, value at the time of the trade. There are many kinds of swaps traded today. Some are traded with insane volumes. For instance foreign exchange swaps trade money between currencies today in return for a reverse trade tomorrow. This is done to the estimated tune of $1.7 trillion (USD) per day! (The primary purpose is to transfer money at close of business from traders in New York to Tokyo, then from Tokyo to England, then back to New York. That way money can be used to make money 24 hours a day.) But let's take something different. I'll look at an example of two companies swapping mortgages.

Our scenario is that a US company is building a skyscraper in Japan. At the same time a Japanese company is building a skyscraper in the USA for approximately the same price. Neither has sufficient cash on hand to fund this, so each needs a mortgage. (This would likely be done with bonds, but let's not worry about that detail.) But rather than each taking out a mortgage in the other currency, let's say that they enter into a contract to swap the financial obligations - the US company pays the mortgage on the US building, while the Japanese company pays the mortgage on the Japanese building. That's a swap.

Well they certainly swapped something. But what is the point?

The point is that neither wants to have to worry about exchange rates. The mortgage on the Japanese building will be in yen. The mortgage on the US building will be in dollars. The US company has a reliable stream of dollars coming in in their future, but doesn't know how much to set aside to meet an obligation priced in yen. The Japanese company has the reverse situation. It is easier for each to budget and plan for an expense in their own currency, and so they'd each prefer to pay the other's mortgage.

It is important to stress that this is not just a convenience. When the companies go to the banks, the banks will recognize the exchange rate risk and that will affect the rates the companies can get. A US company can therefore get a loan in US dollars at a better interest rate than the Japanese company can. Conversely the Japanese company can get a loan in yen at a better interest rate than a US company can. So after the companies swap mortgages, each gets a better interest rate than they could otherwise get. And since both save on their interest payments, both write down immediate profits from making that swap.

This is one of the most important and counter-intuitive points to understand about financial derivatives. Two companies entered into a contract, and both wrote down an immediate profit. Nothing is faked here. Real money is saved in their monthly bills. That saving can be calculated, and as a result the company is better off. Over time the exchange rates will likely move and as a result one probably makes money and the other eventually loses on the deal. But on day 1, both marked down a profit and the profit is real.

Now if there is one thing that gets the attention of people in finance, it is the ability to manufacture money out of thin air. That apparently happened here. It is therefore worth repeating that this example has been studied to death and generally accepted accounting rules agree that both companies get to write down immediate profits in this case.

Of course you can only set this up if the conditions are just right. These profits aren't particularly easy to find. But once you've seen a way to do it, people can set them up over and over again. And over time the financial wizards found cases where companies could write private contracts and claim an immediate profit. As with the swap described there was inevitably long-term risk associated. But who wants to turn down free profits?

Now here we have a critical danger. With many financial derivatives people enter into complex contracts which, based on some complex theory, they think entitles them to write down a profit. However the investments take time to pan out, and come with significant risks. Worse yet there is the very real possibility that people will write down profits that aren't real due to honest mistakes. And if someone honestly overvalues the value of a particular kind of contract, they will enter into that kind of contract over and over again, writing down fake profits each time. (And getting paid correspondingly large bonuses for finding such great deals!) As a result in the end even the smartest people in the world can find themselves unable to truly measure the risks a given company is taking.

If you think I am exaggerating, go read what one of the greatest investors ever has to say about financial derivatives. There is a section about derivatives that starts on page 14 of this PDF from Berkshire-Hathaway. When Warren Buffett wanted to talk about financial derivatives in 2002, the first point he made was, Charlie and I are of one mind in how we feel about derivatives and the trading activities that go with them: We view them as time bombs, both for the parties that deal in them and the economic system. He then goes on to explain many of the same points that I have. His common sense comments are well worth reading by anyone who wishes to make sense of the recent financial crisis.

Now let's move on to securitization. Securitization starts with a bunch of things with promised future payments that may or may not materialize. The things could be loans on houses, credit card debt, student loans, risky bonds - as long as it is a stream of future payments it is meat for the grinder. Typically each thing is a stream of relatively small payments that lasts for a long time. An issuer takes a whole bunch of these, and puts them together in a deal. A deal likely will have a long stream of big payments. Technically a deal is a very carefully set up corporation whose assets are the things that go into the deal, and whose likely future revenue is used to issue a series of bonds. Each bond is a stream of payments that ends once a particular amount of money has been delivered. The first bonds issued are very likely to be worth full face value, and the last ones are unlikely to make much money. For technical reasons the different kinds of bonds are of interest to different investors.

A financial security is any financial instrument that can be traded. The loans etc that go into a deal can't be traded in any kind of open market. The bonds that come out of the deal can. Therefore this process creates securities out of debt, hence the name securitization.

When the deal is set up right, the loans, etc that go into the deal can be purchased for less than the bonds sell for, and the issuer gets to write down an immediate profit. If the deal is correctly modeled, every purchaser gets a known amount of possible future profit with a clearly understood associated risk. Everyone wins.

Given recent bad press it is worth pointing out that securitization has been around for a while and until recently it worked out well for most of us. Whether or not we were aware of it.

Securitization is really a mechanism for diversifying risk. Before securitization took hold, mortgages would be held by the local issuing bank. This meant that if a local area's economy took a nose dive, the local banks would get seriously hurt and sometimes got wiped out. This would restrict the availability of credit for a long time following, and made eventual economic recovery much, much slower.

Since the 80s things have been very different. Banks now sell their loans on to Wall St, which turns them into securities. This means that if a local economy collapses, like Pittsburgh's when the steel industry left or Michigan's with the auto industry troubles, local banks are much less likely to collapse with it. And they can continue to offer credit, which makes it much easier to recover down the road. Therefore securitization has made local economies much more resilient than they otherwise would be.

But, as we all know, there is a fly in the ointment. In the case of sub-prime mortgages we had bad risk models. Thanks to those risk models companies could write down easy profits while not understanding the size of the risks they were taking on. And in their pursuit of profit, they repeated the mistake over and over again. As a result widespread acceptance of securitization wound up replacing the risk of fairly frequent nasty local economic collapses with the risk of relatively rare nasty global collapses. Luckily with the last one having been averted. (So far, anyways.)

So there we have it. Financial derivatives are just contracts. People enter into them for all sorts of reasons. They are traded in large volumes. They can be arbitrarily complex. They can mitigate or create risk. We have theories on how to price them. When financial derivatives are set up correctly, apparently free money is created. This money comes with associated risk. Honest mistakes about the pricing or risks can lead to disaster. Warren Buffett has written on this topic with extreme warnings about this exact issue. Securitization is a way of bundling lots of little streams of cash into nice bonds. Securitization brought us increased local financial stability, which has been to our general benefit. But systemic mistakes in securitization also brought us a real risk of global collapse.

If you understood that then you likely understand financial derivatives better than half the talking heads you see on TV. And you definitely understand them better than Michael Moore appeared to in his movie.

Saturday, October 24, 2009

Progress on Kelly materials

Not done is nothing taught me a lesson. Publicly saying "I didn't complete this because I lost interest" doesn't feel good and provides motivation to finish. So I've returned to the Kelly Criterion explanation I was working on, added a little bit, and provided return calculator that optimizes.

That may not sound like much, but under the hood it is doing calculus in JavaScript. The generic parts of the implementation are in advanced-math.js. If you like the idea of doing math with closures, feel free to take a look.

Next I need to add some linear algebra, some multi-variable calculus, then implement something that finds maxima using Newton's method on a convex polytope defined in any number of dimensions using a set of linear inequalities. You can think of this as a non-linear version of the problem solved by the Simplex Algorithm. The fun part is that I need it to good enough to find the optimum point in an n-dimensional polytope sitting in n+1-dimensional space. (The actual polytope I will need is defined by 0 ≤ xi &le 1 for i=0..n, and x0 + ... + xn = 1.) That means I have to deal with issues like finding my way back to the region after round-off error takes me away from it.

Oh. And of course I'll do all of this in JavaScript.

Perhaps that can be useful for others? Possibly. However JavaScript has no real equivalent to, say, CPAN, so the effort of putting it somewhere that someone in need can easily find it is beyond my motivation. That's why I did nothing with my port of Statistics::Distributions. But that is a thought for another day.

Tuesday, October 20, 2009

What granularity for MVC?

Web developers often try to use an MVC architecture. This means that the business end of a website is divided into models, views, and controllers. Models encapsulate your data, and this is where you are supposed to put business rules like, "You can't take more money out of your account than you have in it." Views are about how to present the data. Ideally the model shouldn't know or care about whether the user is going to look at an edit page or a display page, or look at a page in English or Chinese, those things are presentation logic which belongs in the view. And finally the controller is responsible for the necessary glue between them, for instance to figure out what model and view to use for a given URL for a given person.

There is widespread agreement that this is a good thing in the principle, but things get messy when you go to the details. Why? Well in part because people often break the rules they agree to. Business logic creeps into views, models format text that is just passed through the view, and the controller gets into everyone else's business. After a while you're doing MVC in name only. But also there are honest disagreements about a myriad of issues including where exactly to draw the lines between classes, whether to add in helper classes and if so which ones, how complex views should be, and so on.

I'd like to draw people's attention to a design question that few in the web world think about, namely how granularly we should do MVC.

Traditionally in web development people assume that the right level of granularity is the web page. You get a URL, that goes into a controller, sometimes there can be a cascade of routing decisions, and eventually you get to the code that fetches an appropriate model and view, then puts them together to get a web page. Sounds pretty straightforward and flexible.

But what if we have a complex web page? What happens if we add independent sections on a web page that have little to do with each other but need different dynamic information? Alternately how do we handle displaying many related objects for editing? In my experience the natural tendency is for the controller to become a mess. And the view has to be synchronized with the controller, resulting in fragile dependencies.

For an alternative, let's look back at the history of MVC. Originally MVC arose in the Smalltalk world. And the appropriate granularity for MVC wasn't a whole page, it was a component. You'd write Smalltalk applications and every little dropdown could have its own model, view and controller. Which could all talk to each other, and permitted good decomposition of very complex behavior. This idea has continued in the world of GUI programming. For instance an object-oriented Flash program is likely to be developed on a similar paradigm.

What happens if we take this idea back to serving a web page? Well obviously you need a lot more models, views and controllers. However it isn't as bad as it seems because they also become much simpler. Plus it becomes easier to reuse components on multiple pages through a site. The whole page can still become complex, but MVC is a good way to manage it. After all our design is now closer to the original versions where MVC first proved itself useful.

And as a final thought, ever more complex and dynamic client side interfaces make web pages into something more like any other GUI. Which means that at some point there are likely to be real advantages to using component based MVC within the client interface. But this idea is more natural to try when there is no impedance mismatch between your server-side design and your client-side design. Which suggests that you should start with component-level MVC on the server side, and then "lift" components to dynamic AJAXified components one by one as appropriate. Therefore starting with a component-level MVC gives you more flexibility to later evolve a complex, dynamic client-side interface.

Obviously I wouldn't recommend that every developer rewrite their current websites based on this idea. However I think that the benefits are interesting enough that I'd recommend that developers play with this idea, so that they can make an informed decision about whether to try this approach on future websites.

Monday, October 19, 2009

Why did the Neanderthals die out?

Yesterday's entry reminded me of a Scientific American article last summer about Neanderthals. Reading it I was reminded again of the curious resistance that anthropologists seem to have towards accepting lessons from biology.

But before I get into that, I need to give some background. The theory of punctuated equilibrium, put forth in the early 70s by Niles Eldredge and Stephen J. Gould. This theory held that new species to develop fairly quickly in small isolated regions, then if successful spread over a wide range and change only slightly until they are replaced by another species. Biologists long ago accepted this theory, and it is backed up with evidence ranging from observations of speciation in action in fish in Africa, to Eldredge and Gould's initial example of a type of trilobite that went through 2 speciation episodes in several million years, both of which we are lucky enough to have fossils from the speciation episode in a single mine each. So in general this is what we expect speciation to look like - something that happens in a small area somewhere which bursts out.

Anthropologists have traced a number of types of humans that existed in the past. Of particular interest are modern humans. Two theories existed on that. One is that we evolved in Africa, then spread. The other is the multi-regional hypothesis, which is that we evolved in several regions at once, and possibly mixed in other kinds of humans. Thus leading to side questions such as, "Did we interbreed with the Neanderthals?"

There is no question which version evolutionary theory supports. Punctuated equilibrium unambiguously says that we should expect our species to have started in a small area and then spread without significant (if any) mixing. I remember reading an essay by Gould many years ago that laid this out pretty bluntly. However anthropologists don't like hearing things like, "We can tell you what probably happened with humans based on general principles established with trilobites and fish." And so the active debate lasted for decades on this point.

Reading the Scientific American article I found that the question has now been tackled with the aid of DNA analysis. Based on genetics we now know that the evolutionary biologists were right, and the multi-regional hypothesis is wrong.

But now we have a new question that anthropologists are putting energy in. What killed the Neanderthals?

First let's list some facts. The Neanderthals survived for over 150,000 years. They lived through multiple ice ages. We have evidence of them hunting both large and small prey, with a preference for big game. We coexisted with Neanderthals for thousands of years. There are minor differences in technology (for instance our ancestors had better stitching on their clothing), but nothing specific. Our ancestors specialized in smaller prey (though we were happy to chase big game after the Neanderthals died out). Yet by the end of the ice age the Neanderthals had died out, both in places where our ancestors were found, and in places we weren't.

Hence the mystery. Why did the Neanderthals die? The long (apparently peaceful) coexistence suggests that we didn't directly kill them. They survived previous ice ages. We survived in the same places at the same time. And they should have been able to adapt and use our strategies - after all they did it in previous ice ages. With such small differences, why did they die out?

The article was very good. This was all laid out very well. Along with lots of detail about relative energy requirements, technology, and so on. But I found myself asking whether they had bothered asking the ecologists.

If you study ecology, one of the basic principles is that related species avoid directly competing. How so? Well when the related species is not there they broaden their niche, and when the related species is then each species defines its ecological niche closely enough that they don't directly compete.

Let me give an example. Originally I read this with 3 species of birds, but that was many years ago so I'll simplify to 2 species of birds that I'll call A and B. These birds all hunt insects, and have the choice of hunting them in the forest or by lakes and streams. When only one species is there, they can be found in both places. But if both species coexist in a region, species A does all of the hunting by lakes and streams, while B hunts only in the forest, and so they avoid directly competing.

Why do they do this? Well A is better than B at hunting in open water. B is better than A at hunting in the forest. When only A is around, therefore, the insect population in the forest rises until a given bird is equally well off in the forest and by the water, so you find birds in both places. With B the reverse happens. But when both species are present, then the A birds lower the population of insects near rivers and streams to the point where the B birds will go hungry if they try to feed there. And conversely the B birds keep the insect populations in the forest low enough that the A birds will go hungry if they try to feed there. So A and B coexist, and specialize.

This coexistence can last indefinitely. However there is very real competition here. The presence of the other species narrows the niche the birds live in, and result in fewer of A and B. Each population is now more precarious, and less able to adapt to environmental changes. Thus the general principle that related species tend to coexist and compete through specialization.

Now let us return to the mystery of the Neanderthal extinction. In the absence of our ancestors, the Neanderthals were willing and able to use a combination of food gathering strategies. However once our ancestors arrived, both groups specialized. The two had no difficulty coexisting for thousands of years, but both populations were more precarious than they had been. In particular the Neanderthals were no longer able to use our niche because our ancestors were occupying it more efficiently than they could. Not much more efficiently, perhaps, but even a small difference is the margin between survival and death.

And so it went. Where we were, our presence forced the Neanderthals to specialize. Where we weren't, our absence was evidence that our niche wasn't a good fit to that area, so the Neanderthals there would be unlikely to benefit much from being able to adapt freely to what worked best. Which left the Neanderthals unable to adapt to climate change, and eventually left them dead.

Based on the history of the multi-region hypothesis, I predict that anthropologists will eventually acquire overwhelming evidence for a detailed version of that scenario. But they are likely to take decades to get their. And when they do they won't notice that they could have gotten there faster if they were willing to accept general principles that are already well established in birds, salamanders and the like.

Sunday, October 18, 2009

Thoughts on Youtube

I think my son was 2 when I discovered this. To to youtube. Type in a random thing of interest, like "fire truck". And then watch videos about that topic.

Of course things have progressed since then. My son is almost 5 now. And he just discovered dinosaurs. So we watched some dinosaur videos yesterday and discovered the series of "Walking with ..." series. And as these things go, I wound up going to Amazon this morning and ordering several series. Walking with Monsters, Walking with Dinosaurs, Allosaurus, A Walking with Dinosaurs Special, Chased by Dinosaurs and Walking with Prehistoric Beasts. (Yeah, overboard. But I know my son and it is a good price.)

Yes, I know how much they made up. But there is a lot of good science in there as well. And I know how much my son will love it.

Now lots of people, including many copyright holders, think that youtube is a horrible violation of copyright. Technically they are right. But I believe that there are plenty of people like me out there, and the net effect is more people discovering then buying things they like. Which is good for copyright holders.

And it is a belief backed by some evidence as well. For instance look at the Baen Free Library. Put books online for free in multiple formats and what happens? Sales go up!

Thursday, October 15, 2009

Literature not popular in the USA

I grew up in Canada, but now live in the USA. In the grand scheme of things, Canada and the USA are very, very similar. Yet even so there are odd differences. One of them being that there are books which are popular around most of the English-speaking world (and often farther) that are popular in Canada which nobody in the USA has heard of.

In some cases it is obvious why. For instance consider Yes, Minister which is one of the most brilliant descriptions ever of how bureaucracies work. However it assumes you understand the British parliamentary system. This political system is used in most places that were part of the British empire, including Great Britain, England, India and Australia. Therefore there is little surprise that while I've met plenty of fans of the series from all of those countries, virtually nobody in the USA has even heard of it.

In other cases it is less obvious to me why it is so. Consider, for instance, the comic series Asterix and Obelix. Originally written in French, the series has been translated into many, many different languages and is loved by children around the world. I've talked with fans from France who didn't know it was translated, fans from Spain who didn't realize it was in English, fans from India who didn't know it wasn't originally written in English, and so on. Yet I think I've talked with a grand total of one person from the USA who had heard of it - and I believe he learned about it while traveling through Europe!

Why would this be so? I suspect that some marketer looked at the series and said, "A comic series set in ancient France shortly after the Roman invasion? No American kid will ever go for that!" And so it was never marketed here.

I think this was just a bad decision. Certainly no American that I've lent it to (including several children) had trouble with the material. They all loved it. Besides, the books are meant to be appreciated on many levels. I can read it to my 4 year old son and he laughs at how Obelix accidentally breaks doors when he knocks at them. I loved it at 9 even though I missed most of the jokes embedded in the names. And my kids' babysitter wants me to buy more so she can read them. It really is a series that grows with you as you learn enough to understand more of the jokes.

In short you'd think that any series that is popular around the world in multiple languages is worth trying in the USA as well. But apparently publishers don't think that way. And so American audiences miss out on some really great works.

But this makes me wonder. I'm aware of these works because I grew up in Canada. But the USA and Canada are very similar. What popular works would I love that I don't know because they were never marketed in either country?

Wednesday, October 14, 2009

Why do we use checks?

Think about this scenario. I hand you a piece of paper. This piece of paper has all of the information you need to take any amount of money directly from my bank account. It has written on it the amount I wish to give you. You assume that I can indeed give you that amount, and I assume that you will not steal from me.

Does this seem like a sane thing to do? Just think of all that can go wrong here. You could steal from me. You might be honest, but someone else could take the information from you and steal from me. (This happened to Donald Knuth - people would get a check from him, scan them and post the proof, then scammers looking for pictures of checks online found them and forged checks. Knuth's reward checks are now no longer valid because of this.) I may not have money in my bank account. Perhaps I don't now, but I hope to. Banks actually give a little leeway called "float" to as a convenience to their customers. But this can backfire. If someone arranges things carefully they can bounce a series of payments between accounts, get the bank ready to say that all of the accounts have money, withdraw the money, and leave the bank holding the bag!

Obviously I've just describe a check. But, you ask, what is the alternative? Funny you should ask. Several months ago I went to the Netherlands. They don't have checks there. What do they do instead?

Well if you're my utility company and you want me to pay you, you send me the information I will need to deposit money in your bank account. I go to my bank and transfer money there. You get notified when it arrives. The technical name for this in English is giro transfer.

Now stop and think about how many problems this solves. I never hand out my bank details to anyone. You never have to deal with a bounced check. There is no possibility of anything like a kiting scheme. And the only practical change is that instead of my giving you information that can be used to draw from my account, you give me enough information to put money into your account.

The moral is that checking systems are fundamentally flawed. The design of a giro transfer system is fundamentally sound. Unfortunately tradition is set so that checks are here for a while to come. And people are honest enough that the problems don't generally rise to the point that would make people object. Sure, the security problems are obvious when you think about it. But as always when people aren't being bitten by the problems, people forget about the security implications.

Of course checks are losing popularity between credit cards, easy cash withdrawals, and automated payments. So there is hope that some day they will be seen to be superfluous and will eventually be abandoned. In the meantime checks serve as yet another example showing how little we care about security, even when it comes to our money.

Tuesday, October 13, 2009

Limitations of Capitalism

I've commented that Capitalism is the most effective way known of getting people to do what it gets them to do. However you have no control of what that is. I thought I would expand on that. In that light, here are some of the major flaws of capitalism:

  1. There are big problems we want solved that have no associated revenue. For example consider the problem of taking care of the million or so untreatable schizophrenics in the USA. (I estimated that number by knowing that the USA has 300 million people, about 1% of people have schizophrenia at some point in their life, and of those about 1/3 spontaneously recover, 1/3 respond to treatment, and 1/3 are not treatable.) Left to their own devices these people are unable to function. No matter how loving their families, family resources get severely strained supporting them. And there is no realistic hope of integrating them into society. As a society we do not wish to kill them and do not want them starving to death, so we need to take care of them. The magnitude of the problem is more than charity can support, so this is a valid role for the government. (Total charitable giving in the USA is about $300 billion/year. If we assume that institutionalizing a person in a place with medical care costs $30,000/year, then that would suck up 10% of all charitable giving. On just one cause.)

  2. Capitalism ignores external costs. A rational profit seeking individual who can acquire revenue and leave costs for others, will. A classic example is pollution. Pollution is a diffuse cost that is shared by an entire community and is mostly not experienced by the polluter. Therefore polluters have little incentive to reduce pollution. Government regulation can solve the problem by artificially providing the incentive.

  3. Capitalism ignores external benefits. What do universal education, basic research, and sound policing have in common? The providers of the benefit cannot readily recoup the benefit they provide. Poor kids who will do better with an education are poor right now, their parents can afford that education. It is the nature of research that it proceeds best by sharing ideas, but when ideas are shared then there is generally little or no connection between the people who did the basic research and the people who commercialize it. Law and order is great, but the people who enforce the law aren't generally the people who build businesses that can prosper because they exist within a well-regulated society. Private markets therefore are poor at allocating any of these things.

  4. Capitalism has perverse incentives with asymmetric information. As an individual you are in an extremely poor position to judge whether cooks at a local restaurant wash their hands, the security of a safe, or how effective a medical treatment is. So people judge on the basis of things they can see that they hope are a good proxy for what they want to know. Such as the quality of the decor, how sturdy the safe looks, and the presentation of the person selling you the treatment. But you can fake those without providing the attribute people really want. As a result private markets left to their own devices will provide unhealthy restaurants, insecure products, and unreliable treatments. (Government is good about public health, only rarely intervenes in security, and frequently doesn't pay attention to effectiveness of treatments. If you know where to look, this shows.)


None of this is to say that we want or need government intervention in everything. As I said, capitalism is incredibly effective at generating economic activity, much of which benefits us all. Besides, government has its own characteristic failure modes, which are at least as bad, if not worse, than the ways that capitalism fails.

However when there is a solid justification for government intervention, usually one of these failure modes in free markets is behind it. And if you can identify no specific reason why free markets should do a bad job in that area, then odds are good that the effects of the government intervention is somewhere between ineffective and bad.

Monday, October 5, 2009

Not done is nothing

I have a problem. I'll start personal projects, get to the point where I am satisfied that I could finish it, then don't. Sometimes it takes quite a bit of work to get there. For instance consider this explanation of the Kelly criterion for optimal betting patterns. I did quite a bit of work on it, created a calculator that could be useful. In addition I began a library to let me do basic differential calculus and linear algebra in JavaScript, and worked out exactly how to build numerical approximations of optimal betting patterns. Then I got distracted.

I began this blog. Then I got distracted. OK, it is the nature of blogs to never be done, and I certainly couldn't keep up the pace I started with, but I still could have done more.

The side project I now spend time thinking about is a design for a web development platform that I think would be really powerful. It could be a revolutionary way to work..if it ever gets completed.

I have no shortage of excuses. I have very little time for any side project once you subtract working full time, helping my ex-employer on the side, and taking care of my young children. I am interested in a large variety of things, and so have no shortage of distractions. Furthermore I really do constantly learn new stuff.

None of this is to say that I can't finish things. I am great at finishing things when I have an external reason to. I finish things for my employer all the time. I put a lot of work into my Effective A/B Testing tutorial, and a lot of people have been happy with the result.

However when I am doing something out of personal interest, I lose interest once I've completely learned how to do it. And as a result nobody else benefits from my efforts.

In short, I'm pretty much the opposite of being a member of The Cult of Done. :-(