Skip to content

Shannon’s Demon

December 2, 2009

Is there a way to make money off of randomness? If markets were indeed efficient, does that neccessarily imply that traders cannot make money? Strangely enough as long as there is volatility, one can make money off of a random price series assuming frictionless returns. Even with slight modifications, this can be rendered profitable after transaction costs. The answer lies with the theory posulated by renowned genius Claude Shannon who proposed a method to make money by volatility harvesting.

The origins of the theory lie with the concept of entropy. Physicist James Maxwell described a method of creating a perpetual motion machine by using a container with air divided into two chambers by partition. A trapdoor is placed within the partition that is operated by a “demon” who sorts the air molecules by their speed and opens the trapdoor to separate the fast molecules from the slower ones. Eventually the fast molecules reside on one side, while the slow molecules reside on the other side. Thus the fast molecules which generate heat or hot gas are separate from the cold gas that contains the slower molecules. A classic steam engine can generate energy from the temperature difference–thus useable energy can be created from the random motion of molecules. The more molecules the demon is able to sort the more energy he can create. This can be translated to volatility which permits the creation of higher profits using this mechanism.

Now the machine still requires some energy in the form of the demon who sorts the molecules. The same condition exists for the trader who must dynamically allocate funds in a similar manner at  a work cost and a commission cost. So how does the method work? Essentially the method is also behind the concept of Constant Proportion Portfolio Rebalancing  and also standard rebalancing methodologies that attempt to maintain a constant weight between a risky asset such as stocks and cash. It works as follows: start with $1000 and place 50% in both cash and stock, so $500 in each. If the stock drops 20% the next day you now have $400 in stock and $500 in cash. To maintain a neutral weight, you must take $50 from the cash account and place it in the stock account to have an equal weight of $450 and $450. The formula for rebalance  would be:

For a loss on the previous day:  Cash withdrawal transaction from the cash to the stock account= $ daily loss/2

For a gain on the previous day: Stock withdrawal transaction from the stock to the cash account= $ daily gain/2

You perform this excercise each day to keep the accounts in constant balance. Assuming you could find a stock that doubled and halved each day $1 could run into $1 million dollars in 240 trades. Now that ain’t too bad! So how does this apply to the real world of trading? As we shall see, Shannon’s demon can be used to determine the degree of randomness inherent in a time series. If a Shannon portfolio happens to be the optimal method, than we can say by extension that the market is fairly random. If it is not optimal than a variation on the Shannon algorithm can be used to determine whether mean reversion or trending strategies are optimal for a given price series. More on this to come.

to be continued…….

6 Comments leave one →
  1. Aleks Ontman permalink
    December 2, 2009 5:05 pm

    I am guessing that you are aware that Maxwell’s demon violates 2nd law of thermodynamics so what does that say about CPPI?

    • david varadi permalink*
      December 2, 2009 5:07 pm

      hi aleks, please clarify what you mean.

      • December 3, 2009 4:10 am

        Strictly from a physics point of view, this is possible if you are ready to allow very high volatility in your portfolio.

  2. Aleks Ontman permalink
    December 14, 2009 11:08 am

    Strictly from physics it is impossible as it would violate 2nd law of thermodynamics. As per portfolio management, this type of portfolio modeling requires essentially daily trades. Even with paying $3/trade, the commissions alone (just like the little demon) will eat you alive. Spacing out the trades will impede the tactic so short of having free trades (zecco?), this is very difficult portfolio to model (of course in my opinion). Sorry took a while to respond, lost the tab.

  3. Ira permalink
    March 29, 2010 11:38 am

    actually it doesnt violate any laws of physics as Shannon thoughtfully pointed out that the “demon’s” brain will be increasing in entropy as he is doing the work…


  1. ETF Prophet | Lessons From Perold and Sharpe

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: