Monday, January 10, 2011

Computational methods 2

I left a brief post on using a windowed Huffman coder to measure rank and complexity of the yield curve, specifying that we should see the bond trades as a series of events.  We have to be careful and include all the events, so we have to weight by volume of the bond trade at the particular term structure.

If I did it, I would blur rates to two decimal digits. Then feed the bond rates into the Adaptive encoder and watch the coding tree change.  Note I am ignoring the term and just taking the rates, which I can do if the curve is reasonably upward sloping.  When the tree is unbalanced, that is because previous trades were clustered about some rate with only occasion rates out side of the cluster.  The encoding tree will be unbalanced when trading is clustered around a particular rate.  When all rates are similarly dispersed the tree is balanced, and the yield curve should be stable. So, just run the data and watch the tree. When the tree is very unbalanced, then the system is adjusting. When the tree balanced, the curve is stable.

The bit rate out of the coder should away be less than or equal to the input bit rate. So a comparison of input  to output is a measure of efficiency, the greater reduction in bandwidth the less efficient were the bankers.  The Huffman tree is a dual of the banking network, not a replica.  The symbol flow out of the encoder should be equivalent to deposit flow through the banking network.

Take the example of a flat curve . All rates the same regardless of term.  The Huffman coder returns a rank one tree, everything encoded to a single bit.  The economy soon returns a low rank yield curve, a collapsed curve.

No comments: