Saturday, March 10, 2007

F. Paul Wilson, Harbingers

F. Paul Wilson's Harbingers is a nominee for the Prometheus award. I understand the impulse to nominate the Repairman Jack novels for the Prometheus: Jack is a strong character who fights evil and eschews all contact with the government while living in New York City. His attitude toward self-help and antipathy to gun control also help his case. It's probably the fact that it's horror, and that both the cosmic bad guys and the cosmic okay guys are inscrutable that drives me away.

With this installment, I realized that there was another aspect that was bugging me. In the past 9 novels, little has changed about Jack's relationship to the two warring factions that are thoughtlessly interfering with Jack's life. Harbingers, on the other hand, contains several significant developments in that relationship. In fact, it reads like the second volume of a trilogy. Too bad it took Wilson 9 books (plus 6 others set in the Adversary world) to get us here.

But overall, I don't find the libertarian themes to predominate over the standard horror tropes. And inscrutable powers for whom we barely even qualify as pawns aren't much of a recommendation for a libertarian point of view.

In its defense, this book does have Jack standing up to the Ally after it attempts to take away what he most cherishes. But the negotiation ends with the Ally seeming to hint it won't hurt Jack's family for as long as he does what it wants. Not much of a recommendation.

Wednesday, March 07, 2007

Orson Scott Card: Empire

Orson Scott Card's Empire has been nominated for the Prometheus award. It stands a chance as a cautionary tale like Sinclair Lewis's It Can't Happen Here. The story covers a plot (with tentacles in the White House) to overthrow the government and bring about a left-wing coup. The action is intense, but the politics is strained. Like Lewis' novel, the point (as Card explains in an afterward) is to convince us that it wouldn't take much to turn our current heavily factionalized politics to open warfare.

The story reveals that far-left and far-right groups have been preparing plans in secret for years to take control of the government violently if it should become necessary (because the other side has gotten too much control.) The leftist radicals apparently have the advantage, since they have an extremely wealthy fanatical backer who has been funding the development of new high-tech weapons and staffing and training an army to use them. This part unfortunately reflects the fact that the backers of Card's project are game developers; the new weapons are several steps ahead of what the uniformed military has access to, but would play well on the video game consoles.

The viewpoint characters are sympathetic, well-trained special ops soldiers, and are patriotic to a fault. Their loyalty is to the nation and its legitimate leaders. The action is intense. But ultimately, the story falls short of being a cautionary tale. The motives of extremists on both side are hard to fathom; they want control of the levers of power to prevent the other sides extremists from doing something bad, but it's not clear what. After the conspirators take control of New York City and get sympathetic resolutions from a few state legislatures, they don't make any visible changes in anyone's lives.

At least Sinclair Lewis showed that the fascists who took over would have to suppress dissent brutally and ruthlessly in order to maintain control. In Card's novel, life goes on as before. At the end of the novel the viewpoint characters suspect the newly elected president of having helped orchestrate the entire coup in order to ensure popular support for his own election as a peacemaker. But they can't find any indication that he has dastardly designs to justify the conspiracy they are looking for.

The attempt at a coup and rebellion were short-lived, caused only a handful of deaths and a moderate amount of damage, and didn't have any impact on everyday life. As a cautionary tale, it's not much to worry about. If the protagonists hadn't done such a good job of protecting the nation, an extremist megalomaniac might have taken over the government, but Card's novel doesn't explain why that was something to worry about.

Tuesday, March 06, 2007

Conditional and Combinatorial Betting

After people have used Prediction Markets for a while and have gotten used to their ability to provide forecasts, they start thinking about different scenarios. Who would be the best Republican to face Clinton? How are the prospects for a market boom or crash effected by the winner of the election? How will poverty be affected by a proposed World Bank program? These kinds of questions can be posed in a number of ways using Prediction Markets. Markets can allow betting on conditional (if) or conjunctive (and) questions. Either one can be used to answer the what if questions, but they provide different choices to the bettors, and some make it easier for observers to decode the answers.

The easiest compound question to pose is a simple conjunction of two others. InTrade had separate markets in whether Bush would be reelected in 2004 ("BUSH"), and whether Osama bin Laden ("OSAMA") would be captured before the election. Justin Wolfers and Eric Zitzewitz asked InTrade to add a single combined contract that would pay off if both came true. Their paper, Experimental Political Betting Markets and the 2004 Election shows how the prices on these three contracts can be combined to show how one event would be likely to effect the other.

InTrade created three separate claims to cover combinations of the two base questions. They were "Bush wins election" (BUSH), "Osama is captured before the election" (OSAMA), and the combination: BUSH&OSAMA which would have paid out if both the others came true. Wolfers and Zitzewitz estimated the market's conditional probability by comparing the price of OSAMA with the price of BUSH&OSAMA. If the price levels were rational, the difference between the two prices had to equal the chance that Osama would be captured and Bush would not be reelected. Since the market price of BUSH&OSAMA was 91% as high as the price of Osama, they concluded that that represented the conditional probability. A weakness of this conclusion is that while investors and arbitrageurs have an incentive to ensure that the price of BUSH is correct relative to ~BUSH, (and OSAMA with respect to ~OSAMA), there's no bet that lets an arbitrageur exploit superior knowledge of the conditional probabilities.

Sometimes investors believe they know how one outcome will effect another, and want to bet directly on that linkage. If you were confident before the election that Osama's capture would raise the probability of Bush's reelection to 95% (above the level the the market prices implied), having the conjunctive bets didn't provide a bet that would have looked beneficial to you. You might think you could buy Bush&Osama (because you believe Bush's chances are improved if Osama is captured) and sell ~Bush&Osama (because this is the outcome your view says is least likely), but you'd lose both bets if Osama wasn't captured (which is an outcome your prediction doesn't specify.)

Conjunctive claims allow observers to deduce connections between claims, but since the investors aren't directly rewarded based on the conditional probabilities, they have little incentive to ensure that the implicit conditional probabilities reflect their understanding of the connections between the outcomes. In order to evaluate different proposals we have to look at what investors would spend up-front, and then compare the possible outcomes and how the investor's earnings change in each situation.

If Bush is a 60% favorite to be re-elected, and the market thinks there's only a 10% chance Osama will be captured before the election, the odds on the conjunctions might be:

 Bush reelectedBush defeated
Osama captured .09 .009
Osama free .5 .4

If you think Osama's capture would improve Bush's prospects to 95%, what should you buy or sell? Your prediction says that the ratio of Bush&Osama to ~Bush&Osama should be 19:1, but doesn't have anything to say about Bush&~Osama or ~Bush&~Osama. If you buy Bush&Osama and sell ~Bush&Osama, you can make the prices match your beliefs better, but you'll lose money if Osama isn't captured. In order to support conditional bets directly, market operators have to find ways to allow traders to buy positions without exposing themselves to risks due to the independent cases.

A contract that acts like a conditional bet directly (written as BUSH|OSAMA, pronounced as "Bush given Osama" or "Bush conditional on Osama") would pay off if Bush is elected, and return your investment if Osama bin Laden isn't captured. That gives investors the right incentive.

 Bush reelectedBush defeated
Osama capturedGain $1 Lose investment
Osama free Return investmentReturn investment

In order to support betting on conditional probabilities, the bets have to be able to return the investors' money in particular cases. I know of three detailed proposals that have this property. They are: betting on arbitrary boolean expressions, representing the complete cross-product of possible outcomes (providing a complete set of Arrow-Debreu securities), and using the independent claim as currency for purchasing the dependent claim. There are two additional suggestions that might work, but haven't been written down in sufficient detail to be sure.

Robin described and implemented Combinatorial Information Markets which represent probabilities and traders assets explicitly for all possible combinations of outcomes. Fortnow, Kilian, Pennock, and Wellman described how you might try to support bets on arbitrary boolean combinations of conditions. Their conclusion seemed to be that solving the general problem would be computationally infeasible. They didn't describe how to address the problems they found, but I think it's possible that a market that supported only binary combinations could be designed. And finally, Peter McCluskey built (and released as open source) USIFEX in 1999. It allows the user to use the coupons of the independent event as the currency. This combination allows traders to express conditionals directly. Unfortunately, that system didn't attract a user base quickly enough, and Peter stopped development soon after the initial release.

For an article on Decision Markets written in 1999, Robin Hanson suggested creating markets using assets that pay off in "units of A if B passes" (and "... if B doesn't pass."), and allow traders to trade the assets for each other. The price of A|B in terms of B (which can be built from component assets) expresses the conditional bet. Robin didn't explain how to set up a market in which people trade assets for assets and didn't describe how to let the users see how various combination bets would express the conditional claims they might have been interested in. (This is the first of the two incomplete suggestions.)

Robin's Combinatorial Information Market design uses a complex internal representation and can support arbitrary conditional bets. He built a prototype implementation that allows the user to explore these conditionals by choosing assumptions, and then adjusting probabilities in the resulting hypothetical situations. I wrote a prototype of my own in E. Neither prototype is more than a proof-of-concept that the institution works, and neither has been operated for any general market. The strength of this approach is that users can express conditional connections between arbitrary claims; this aspect has been shown to be effective in a laboratory experiment. Robin ran tests of this market after he proposed its use for PAM, and there were apparently no problems in running it with 6 traders estimating all outcome combinations for 8 events. The glaring weakness is that it doesn't scale well. It's not clear how to build a version that would work even with a market with dozens of questions and hundreds of users. I'll describe this market in more detail in a future post in this series.

Peter McCluskey built USIFEX in 1999. It works quite differently and doesn't seem to have the performance problems of the other proposals. The primary idea for supporting conditional trading is that you buy units of A|B using units of B as currency when betting on a conditional question. The effect is that when buying A|B, you end up with coupons of ~B as part of the purchase, and that's what ensures you'll be repaid if the independent event doesn't occur. USIFEX is open source, but it hasn't been maintained since it was released in 2000. The code was resurrected for use in the Swiss MarMix exchange, (AFAICT without making any use of the conditional betting features). The biggest weakness of Peter's approach, as I recall, was that it would have taken a lot of users to ensure that the conditional markets weren't extremely thin. A longer description of USIFEX is also in the works.

Todd Proebsting built an implementation of the Hanson design that works without conditionals. Dave Pennock wrote up a description of Todd's approach, focused on the Market maker. I intend to describe the implications of Todd's approach for betting on conditionals in a future post. (This is the second incomplete suggestion.) I think it might be straightforward to extend Todd's approach to support conditional betting without running into the exponential growth of Robin's solution. The drawback is that the market operator has to separately capitalize and enable every conditional question that you want the system to support, while Robin's approach enables all of them by default. It's also possible that Zocalo Open Source Prediction Market software would be compatible with this approach, where it's clear that Zocalo would require substantial modification to support the Hanson proposal.

Other Articles in this series

Thursday, March 01, 2007

Robert Pape: Dying to Win

Dying To Win , by Robert Pape, makes a reasonable case that suicide terrorism is primarily used by groups that perceive themselves to be oppressed in their home country by a powerful democratically governed foreign invader (usually with a different religion). The goals and intentions of the occupier don't actually matter very much, as long as the defenders feel that they don't have control, and can use the religious difference to demonize the invader. Pape marshals a considerable body of evidence to show that conventional wisdom is wrong: the terrorists play up religious differences, but aren't motivated by religion; the individual terrorists aren't poor or suicidal; and suicide terrorism is used against democratic countries (the goal is to convince the voters that the occupation isn't worth the cost.)

The book's thesis only explains a portion of what is going on in Iraq today. As far as I can tell, suicide terrorism aimed at the occupying powers is less than half of the violence currently occurring in that country; the rest is sectarian. Pape's thesis doesn't explain why roughly equal factions would use suicide terror against one another in an internal conflict. But I think the explanation of the attacks against foreigners holds up well. Unfortunately, only part of the terrorists' message to America is getting through to the American public.

The public understands that American soldiers are being targeted, but all the internecine violence obscures the message about foreign occupiers. Since some of the local factions are clearly more interested in a battle for control of the country after we leave, the violence against foreign troops looks like part of a strategy to maintain disorder. Major media haven't help Al Queda spread the message that all they want is for the foreigners to leave. Even if they had, the internal violence gives some Americans a reason to want to persevere, so we can help stabilize the country we destabilized.

Pape argues that the only responses to suicide terrorism that have stopped it in the past have been acceding to their demands (withdrawal) and ruthless violence against the terrorists and their community. He argues that one of the reasons this strategy is only used against democracies is that they are seldom willing to be sufficiently ruthless.

I wonder whether it wouldn't have been useful in this context if we had spent some effort ensuring that the history of the American occupation of Germany and Japan after WWII was heard in the Middle East. Those countries didn't lose their national identity; they got a lot of help rebuilding; and they came out of it much stronger than they went in. It may be too late for this message to be spread in the Arab world, where everything we say now is treated as propaganda.

Pape's policy recommendation is to remove active troops from the Middle East, while leaving enough deployed in nearby positions so that we could respond rapidly to new threats. This, unfortunately doesn't address the current situation in Iraq; leaving the country now would give the violent local factions unfettered ability to continue their mutual pogroms. If that isn't the kind of event we would expect to respond to from the off-shore position he recommends, what would be?

For the most part, the book was reasonably even-handed, given Pape's apparent prejudices, which he showed once or twice. He speaks of an American "Policy [...] to conquer Muslim countries" on pages 6 and 241, but otherwise sticks to analysis based on an extensive database of all known suicide terror incidents he has compiled at the University of Chicago. The last, short, chapter giving his policy recommendations is clearly separate, and readers can individually evaluate its merits.

Monday, February 26, 2007

Charles Stross: Glasshouse

Charles Stross's Glasshouse has been nominated for the Prometheus award. The theme of overcoming ubiquitous surveillance makes it a likely finalist and a possible winner this year.

The story takes place in an advanced post-nanotech world where the primary means for long distance travel is cellular deconstruction, data transmission, and reconstruction. In addition to that, you can edit your body and mind before reconstruction, allowing you to modify your basic body type or gender, remove signs of aging, or edit your memories. Unfortunately, this also means that anyone who controls the gates can control what comes out the other end.

Robin, our protagonist, is one of several people who are going through rehab—apparently their most recent life left them with some mental trauma, and the editing at their last reconstruction wasn't as complete as it should have been, so they are getting used to their newest selves and learning to integrate into mainstream society. Since someone seems to be trying to kill Robin (who has strong self-preservation skills and instincts, but doesn't remember why), the choice to accept an invitation into an anonymity-enforcing experiment in recovering information about a lost historical period makes sense. The historical period is ancient earth; really a Hollywood-based view of 1950s-1990s America, but with many details elided, and the entire period mixed together in one giant mish-mash of the experimenters' guesses about why the stereotyped sex roles could co-exist with various anachronistic technologies and mores.

"In order to study the emergent properties of the society" the experimenters are constructing, the subjects are constantly monitored and rewarded with points for remaining in character, and lose points (both individually and for their cliques) for arbitrary behaviors the experimenters want to discourage. Some of the participants quickly adopt the point system as their primary driver of value, while Robin and a few others find unseen ways to fight back. Eventually, Robin discovers a cell of others who want to stop the experiment and/or escape.

The story is well-told and interesting, with both action scenes and psychological studies of the characters. The conflict is engaging, and the elaboration of the background (I haven't given it all away here) is rolled out in a plausible sequence. The exploration of how modern society will look to far-future societies is entirely plausible, with or without intentional culling of the historical records. Stross's characters have a believably accepting attitude to gender- and bodyplan-switching, and their reactions to an attempt to impose a cartoon interpretation of 1950s gender roles is convincing.

There aren't any obvious governments, but several factions are struggling to become the de facto monopolists on political control and the use of force, either locally or throughout the connected polities. The idea that societies that can communicate as easily as they do throughout the Invisible Republic might still maintain distinctly different political systems is interesting. The implication that it might be stable as long as no one manages to subvert the gates that enable cheap commerce is intriguing.

Saturday, February 17, 2007

Sheri S. Tepper: Six Moon Dance

Sherry Tepper's Six Moon Dance is an intriguing fantasy. It starts out seeming to be an investigation of a society with unusual sex roles (half the female babies on Newholme die as infants, so women have unusual power. Men are seen as the weaker sex, and male concubines are common; Mouche, the viewpoint character, will train to be one). The story slowly morphs into a deeper exploration of the interaction between a bizarre quasi-human society, and two interesting alien organisms, mediated by the Great Questioner, a cyborg with her own problems. Each has been changed by their interactions with the others.

Humans have only inhabited this world for a few hundred years. The first settlers didn't notice the native life (they were hiding until they figured out the settlers intentions), which put them in a bind because the Council of Worlds enforces their version of the Prime Directive harshly. The native life has some rather fantastic powers: budding off individuals who can live a separate life for a while and then reabsorb, returning their memories to the collective.

The story arises because the Questioner (the investigator and enforcer of the Prime Directive) schedules a visit at the same time as Newholme's periodic geologic upheavals start again in earnest. The natives have dealt with the problem in the past (it's partly of organic origin and intricately related to both the themes of multi-species intertwining and strange sex roles) but need more help from the humans this time around, since their presence has disrupted their normal approaches. But if the local humans are to escape punishment, the Questioner mustn't notice the shenanigans.

Of course, the Questioner has her own resources, and her job is to be suspicious, so everything unravels. But along the way, this is more than the story of an investigation, and Tepper describes events and people very poetically. Here are a few excerpts to give a taste:

Questioner has drafted two young dancers to help her with the investigation on Newholme, and as they were still struggling to find their identities, her intervention has interrupted their progress. Gandro Bao has trained as a Kabuki dancer, which has given him some sex-role confusion (excuse his broken English, please.) The other dancer, Ellin Voy has identity issues since she found out she is a clone raised to be a dancer just like her mother and her many sisters.

"So, I am being confused, and some days I am looking at face in mirror and thinking, who is this? Is this male or female? Is this real person or only actor? ... So when I am twelve, ... and deciding I am whoever I am wanting to be! Who I am choosing to be!"
"But that's just it! I can't choose who to be! I never had a choice!"
"You cannot choose to be horse, or fish, or tree, no. But it is like this. You are like small seed, and this ship is like big wind, and it is blowing seed from small plant far, far away where is no other such plant. And plant is not saying, 'Oh, oh. I cannot be oak tree, I cannot be bamboo, I cannot be cactus, I have no choice.' Plant is not so silly as that. Plant is putting down roots of own self and growing! And while it is growing, when things are difficult, it changes a little bit, so when it is grown, it is not exactly like the plant it was coming from. It adapts."

Near the end of the book, Mouche is consoling the Questioner:

"the true story of any living thing has pain in it, and life has to be that way. Curiosity is a good goad, but pain is a better one. It is pain that moves us, that makes us learn how to cure, how to mend, how to improve, how to re-create. Inside all of us, even the happiest are memories of pain. ... Each of us cries that we are lost. We ask the darkened room, who are we? And we demand easy answers: I am my father's son. My mother's daughter. A child of this family, or that."
"That's the nature of mankind," she agreed.
"True, but Corojum had an answer that is equally true, and I like his better! We are made of the stuff of stars, given our lives by a living world, given our selves by time. We are brother to the trees and sister to the sun. We are of such glorious stuff we need not carry pain around like a label. Our duty, as living things, to be sure that pain is not our whole story, for we can choose to be otherwise. As Ellin says, we can choose to dance.

The part about being driven by pain doesn't resonate with me, but I liked the way the story illuminated the exhortation to choose.

Sunday, January 21, 2007

Rich Dad's Guide to Investing

Robert T. Kiyosaki's Rich Dad's Guide to Investing isn't particularly well written, but it contains a fair number of good ideas. The prose is repetitive, and many of the ideas have appeared in other books in the Rich Dad, Poor Dad series. Nevertheless, I found it valuable. The subtitle ("What the Rich Invest In, That the Poor and Middle Class do not") indicates some of what I found in the book.

For a couple of decades, I was a pretty dedicated mutual fund investor. I read the (popular technical) literature, and understood the predominant returns of index funds, and the value of diversity. I continue to subscribe to the No Load Fund Investor newsletter, and use their recommendations to balance the portion of my portfolio that isn't in real estate.

But over the last few years I've moved most of my investments to real estate. The real estate group I've joined does an excellent job of providing education in the fundamentals of real estate investing. I feel competent to evaluate the value of an investment, the likely cash flow and prospects for appreciation. But it's clear that there is a lot more to learn, and many other kinds of investment projects to consider.

The Rich Dad series does a good job of explaining the basics: how to think about cash and cash flow, why real estate investment pays off whether the market is going up or going down, how the tax advantages work, etc. The books share similar stylistic problems; they're repetitive, anecdotal and simplistic. But there's good information in the books, it's not just hype, and if you pay attention, the books do give useful ideas on how get started and to proceed. It helps a lot to have decent classes to fill in the gaps. (If you're in Silicon Valley, or the L.A. area, I can recommend a group that gives informative classes, without hard sell or hype. Selling is strictly segregated from educating. The education tells you why and how and gives you an opportunity to talk to other people who are going through the same thing.)

This book primarily covers investor psychology and how to approach the process of evaluating, buying, and managing investments. Kiyosaki wants to convince people to have a long term view of their financial holdings, to evaluate potential investments for their effects on your cash flow, and to focus on investments that add to your net worth. The first half of the book concentrates on who you have to become in order to be a successful investor. Each chapter ends with a "Mental Aptitude Quizzes" to help you figure out whether you're serious, calm, patient, etc. enough to succeed at investing. The argument is that many people aren't temperamentally suited to being high-stakes investors, and they'd be better off trying something else.

Kiyosaki's main story about growing as an investor is that you need to start with a solid financial foundation so you can afford to take some risks, then you can either grow a portfolio slowly over time, or you can invest your effort into building a business on your own. The latter route provides many tax advantages while building the business, and gives more control over your life and the kinds of projects you invest in. He strongly emphasizes the value of building your own business (even a franchise business) both for the experience in what it takes to make a business succeed, and for the tax advantages. He overemphasizes the chances of building a successful business; he may be right that it's worth it for the experience.

One of his messages is that the safe way to build wealth is to "find a plan that works, and stick with it." Unfortunately, he repeats this mantra without explaining how to pick a good plan or how to tell whether your plan is working. There's a three-page section in Chapter 8 that talks about how to evaluate results, but I doubt that many readers will get it. It's not enough to have a plan and stick to it. You might be lucky enough to pick the right plan, or you might not. What you need first is a method for evaluating plans and their results. Then you can search for good plans, and experiment with them until you find one that works in practice for you.

Another message that is repeated many times is that employees are at someone else's mercy, while people who build successful businesses are in control of their fate. He pounds on this point to convince readers that being an employee isn't a path to wealth or security as most of our parents were taught. Aspiring investors need to be aware that getting loans is the most common path to buying real estate, and lenders like to see stable income. A failing business or intermittent consulting doesn't inspire their confidence. Once you have an investment portfolio, you can go to other sources for leverage, but when starting out, it's quite valuable to continue working the day job.

Different kinds of investors ( accredited, qualified, sophisticated, inside, ultimate) have different opportunities available to them. Moving into a new category requires learning the skills to evaluate the opportunities or gaining the resources to handle setbacks. Investing outside of the categories you are suited for is sometimes illegal, and usually (financially) dangerous. The tax treatment of income is different depending on whether it is from employee, self-employed, Business owner, or Investor. Sophisticated investors understand the tax treatment of each, and use each category when it is advantageous.

In the first chapter, Kiyosaki talks about the abilities of different kinds of investors:

There are many more bad deals than good deals. If a person is not aware, all deals--good and bad--look the same. It takes a great deal of education and experience to sort the more sophisticated investments into good and bad investments.

Reading this book is a small step in learning to distinguish good from bad. If you haven't decided that getting wealthy is worth the effort, you may not get much out of this book. If you have, there are important insights available here.

Wednesday, January 10, 2007

Integrating Book Orders and Market Makers

Dave Pennock gave a gentle introduction to the Market Scoring Rule invented by Robin Hanson. In the comments, Sid asked for an explanation of how to integrate the MSR with an order book. Dave asked me privately if I'd be willing to tackle that, and this post is the result.

Robin's short note on integrating an order book and a market maker covers a lot of territory very quickly. In Robin's defense, it was written to clarify some ideas in the midst of a conversation we were having at the time, and hasn't been cleaned up for publication. I'll expand on it here so it has a chance of making sense to others. The paper couches things in terms of the MSR, a particular AMM, but none of the implementation depends on which AMM is used.

There's a working example of the integration we're talking about in the code for Zocalo. The code that does this is currently in transition since I'm adding support for multi-outcome markets. For the moment, I recommend reading the code for version 375, since the current code is more complex and possibly incomplete. You can either download the complete source code for release 2006.5 of the Zocalo Prediction Market, or browse the code directly using the SVN interface.

The paper starts by giving a very compressed introduction to the idea of a prediction market and market maker (hereafter AMM for Automated Market Maker). Unless you're very familiar with the details and the formalisms that Robin uses to describe them, you'd be better off reading the original papers (Logarithmic Market Scoring Rules, Combinatorial Information Market Design) than trying to pick anything up from the first four paragraphs of the note.

The fourth paragraph slips into the idea of integrating an order book with the AMM he's talked about to that point. ("If instead [the AMM price resulting from buying the entire quantity is higher than the user's max marginal price], a portion [...] could be traded with the market maker, leaving a book order for the remaining quantity"). From that point, he talks about how to integrate the two markets.

If new orders get the advantage of any order price overlap

In book order systems, if orders arrive asynchronously, you will often see orders that "overlap", i.e. orders to buy at a higher price than the best offer to sell, or orders to sell lower than the best offer to buy. The system has to have policy about what price to transact at in these cases. The system could tell each party that they got the price they requested, and pocket the difference; it could use the book order's price or the new offer's price; or it could split the difference in the interest of fairness. If any choice is made other than using the stated price of the order in the book, investors have an incentive to carefully submit bids a little at a time (aka "structure" their bids) so they won't pay more than they have to if new orders should arrive. Robin argued elsewhere (I can't find the reference at the moment) that you should just transact at the book order price so that people submitting market price orders don't waste their resources and yours on this optimization.

That choice also simplifies the calculation for accepting new offers. As Robin says, "each book order [...] imposes a constraint on the market maker price". The AMM should fulfill orders up to that limit, then let trade continue with the book order. This requires a loop, in which you buy from the AMM until you reach the limit imposed by the best order(s), then trade up to the book order's available quantity, then go back to the AMM until you reach the next book order. You can see the approach in Zocalo's method Market.buyFromBothBookAndMaker(...). (The method starts at line 237.)

At every step,

  • find the remaining quantity q of the new order
  • find the price p available from the best existing order
  • if the AMM's price is no better than the book order, trade up to q with the book
  • otherwise trade with the AMM to the lesser of p or q

The loop stops either when the new order is fulfilled or the price limit specified by the new order is reached.

That's the simple version for a one-dimensional AMM. The multi-dimensional version arises if you implement the AMM as described in "Combinatorial Information Market Design". There are two open source implementations of this approach available for reading by hard-core hackers. Robin built an implementation in Lisp, and I wrote a version in E. Neither is more than a demonstration of how the market engine works, since no serious user interface was written for either one.

Rather than attempt to explain how the approach translates to the multi-dimensional case now, I'd prefer to wait until after I write an explanation of the n-dimensional combination market, and that depends on a gentle introduction to conditional and combinatorial betting which I haven't written yet. Having someone ask about Robin's note raises my priority for writing these prerequisites.

Addendum: other explanatory articles I've written:

Thursday, December 07, 2006

Edward Castronova: Synthetic Worlds

Edward Castronova's Synthetic Worlds provides a good explanation of why social spaces constructed in software will be an important part of our future. But first, Castronova takes the time to give us a feel for what it's like to spend time there, so that we'll understand the inhabitants and what they do while online.

Castronova has a very engaging style; I particularly liked the way he keeps the reader apprised of the roadmap he is following and how each chapter and major section fit into the exposition. Castronova is an economist, but he didn't get into this subject expecting to prove an an economic theory—he was just playing games. After he had spent a significant amount of time in several social games, he thought of writing a tongue-in-cheek report on the economies he'd visited. But as he gathered enough data to lend verisimilitude to the joke, he found more and more depth to the real economic interactions going on inside the worlds and in external sites where people were selling in-world artifacts and identities for significant sums. He did eventually write the paper, though from a more serious viewpoint than he had originally envisioned. Within 6 months, it ended up being on of the most read papers available from SSRN, a major repository for serious academic work.

Since then Castronova has been the go-to guy for a serious social science view of these game worlds. He wrote this book to explain what he has learned. His most important conclusion is that the economic and social consequences of what transpires within these systems is real, and so it doesn't make any sense to call them virtual worlds. Not virtual reality, not virtual economies, not virtual goods, not virtual interactions. The interactions are real; the goods have value in the real world; the economies work just like the real world and they trade goods, services, and money across borders with real world economies. It's a real reality and events there have real effects on the inhabitants and everyone else in the same way we can be effected by the weather in the Gulf Coast or a fire or an earthquake in the Far East.

As Moore's law continues to increase computational power, these worlds will become attractive to more people, and more people will spend increasing amounts of time and productive effort there. Read Synthetic World for a glimpse of how it may effect you.

Thursday, November 30, 2006

David Friedman, Harald

David Friedman's novel Harald has been nominated for the Prometheus award. It will probably be a finalist, but the libertarianism is muted. It's an enjoyable read, though not deep or with a very broad scope. Harald is accepted as a leader among his people, though they don't have any formal government. He is wealthy, and a brilliant (unerring) strategist and tactition. Actually, that's the biggest weakness of the book; Harald always out-plans the opposition. When they occasionally try to think one step ahead of him, those are the occasions on which Harald has planned two steps ahead. Harald is also an accomplished field doctor, though no one else seems to even be familiar with the rudiments of first aid. He knows a story for every occasion, and is a charismatic leader. For some reason his extraordinary abilities stand out even compared to the standard hero stories we're used to.

But if you're willing to forgive this conceit, it's a good adventure story, with plenty of pitched battles, a few battles won by stealth, and a plausible depiction of how a society without government might defend itself. Unfortunately, we can't tell whether it would work if they couldn't count on the constant attention of a superior general. Harald is alway monitoring developments, and imagining what his old enemies might do if they were to decide to attack again.

There are plenty of incidents showing people making choices freely, and bearing the consequences of their choices. No government intervention, except among the citizens of the emperor. Even those who live under kings seem to be allowed to live their own lives, and choose to accept the protection of the local ruler as long as it's worth the cost.

In this society, women are warriors on a par with men, though they maintain their own separate force ("The Order"), and join the battle only when their leaders decide that their interests are at stake. The conflict starts when the young king tries to take control of The Order to ensure that they will help him if the empire attacks. If Harald hadn't stepped in, the king would have ended up with a rebellion, cutting his forces rather than augmenting them. Harald shows him that persuasion works better than force.

Sunday, November 05, 2006

John Scalzi, The Ghost Brigades

John Scalzi's The Ghost Brigades is likely to be a strong candidate for this year's Prometheus award. It may be the best I've read so far. (Since the competition includes Vinge, a past winner, and Stross, a past nominee, that's an achievement.)

Humankind is one of many species competing for living space around the galaxy. There's a little cooperation, and a lot of war. Our government is keeping most of the population in the dark about who our friends and enemies are, and how we're fighting them. Our best weapon is an army of vat-grown, genetically enhanced soldiers who are effectively brainwashed slave labor.

The conflict arises when Charles Boutin, the genius scientist who has helped develop the technologies, becomes convinced that the government was careless about protecting his wife and daughter, and in his grief, lends his assistance to some of humanity's enemies. In order to help track him down, his memory backup is loaded into the mind of Jared Dirac, a custom-designed soldier. Since the mind transplant doesn't take at first, Dirac develops his own personality, with idiosyncratic quirks and abilities. This isn't on the program for the enhanced soldiers, which results in a lot of trouble.

Many of the tropes of near-future technological enhancements are on display here: mind melding soldiers, nano-suits that protect the wearer from minor injury, instant access to information. Scalzi does a decent job of merging them into a plausible society: Dirac is as likely to use his tools and skills while joking around with his buddies as he does in battle.

The deeper issues include Dirac and the other soldier's ability to make choices and control their own fate, the moral issues surrounding combatants and bystanders in war, and the morality of allowing population pressures to force the choice of going to war. Scalzi lets Dirac and his fellow soldiers explore the issues without forcing particular answers on them or us.

I liked the answers Dirac came up with better than those Ken Chinran came up with in Michael Williamson's The Weapon. Chinran was a nearly omnipotent military force on his own. He accepted his assignments without question, carried them out as best he could and worried about ethics after the fighting was done. Chinran sometimes made morally doubtful tactical choices in the heat of battle that undermined his strategic objectives, and ended up several time regretting his choices. But he never learned to make better choices in battle.

Dirac considers the possibilities as he proceeds, and limits his tactical choices to behaviors he has already decided are morally acceptable acts of war. In one incident, Dirac and his squad are tasked with abducting the immature heir to the throne of one of humanity's enemies, the Eneshan. The squad recognizes that the morality is questionable. Some members, while willing to participate in the raid, ask to be left out of the dirty work, so the squad leader asks for volunteers. Dirac recognizes it as dirty, but accepts the necessity in a time of war. The important point for the story is that Dirac and his companions are making moral choices, even though they weren't given any choice about being soldiers.

Dirac continues to make moral choices right through the end.

Wednesday, November 01, 2006

ID Theft Report Discourages use of SSNs

The front page of the latest issue of Privacy Journal has the headline "Feds Now Discourage Use of SSNs". The article reports on the interim recommendations from an interagency task force on identity theft. Privacy Journal focuses on the report as the first indication that the federal government finally recognizes the danger that SSNs pose, and may start to take steps to remedy the harm they've caused by helping make SSNs ubiquitous in government and many private databases.

This report, by itself, doesn't change government policy, so you can't cite it as authority when trying to get assistance from government agencies without revealing your SSN. But you can refer to it when working to convince administrators that agency policy should change or that training of the people who collect information from the public should be updated. I suspect that it would also serve as useful ammunition when arguing with people in private industry. The report isn't directly addressed to them, and doesn't hold any legal authority, but it is a recommendation from the government, and it does represent a significant change of heart.

  • Recommendation 1: OMB should provide guidance to all federal agencies about giving notice in the event of data breaches.
  • Recommendation 2: OMB and DHS should identify best practices and mistakes to avoid.
  • Recommendation 3: on SSNs
    1. OPM should accelerate its review of the use of SSNs in its collection of human resource data, and take steps to reduce their use (including the assignment of employee identification numbers).
    2. The commentary suggests that agencies assign employee ID numbers to replace SSNs. They also suggest that Executive Order 9397 (which encouraged use of SSNs in Federal databases) might need to be "partially rescinded" in order to reduce use of SSNs.

    3. OPM should develop and issue policy guidance to the federal HR community on the appropriate use of SSNs in employee records, including the proper way to restrict, conceal, or mask SSNs.
    4. OMB should require all federal agencies to review their use of SSNs to determine which uses can be reduced or eliminated.
  • Recommendation 4: All agencies should add disclosure of information in response to a data breach to their published "routine use" list under the Privacy Act.
  • Recommendation 5: The task force should investigate reliable methods of authenticating individuals to reduce openings for identity thieves.
  • Recommendation 6: Congress should add restitution for time spent remediating harm from identity theft to the criminal statutes.
  • Recommendation 7: The FTC will develop standardized forms for reporting identity theft to police.