In my SP100 trading analyzer I generally round up trades to the nearest two dollar bill, then I run the trades through my encoder. At the end, I get trades encoded into a shorter production chain, fewer traders along the curve, but each trader limited to a certain trades size depending upon where on the curve she works.
These qunat sizes are len(i) : The number of bits allocated to trades to the Ith production stage, and t(i) : The transaction rate at the Ith stage.
The sum (len(i) * t(i) over all stages gets me the information content according the the Huffamn example in Wiki, and is also the optimum average trading size. The sum(-t(i) log(t(i)) is the information content for the same data if we could trade to the nearest fractional penny. It is the best production system for the data given if one could set up a production system of traders down to the last penny (ignoring transaction costs)
Typically, for a day of SP100 trading with $2 dollar bills I end up with a 25 stage trading network, that is a spanning tree across Wall Street with a depth of 25, that is generating trades down the network, like a Wal Mart distribution system Obviously such a network would have about 80 retail outlets selling paper to you and I, at the retail level as it fans out.
We really want to model that network with a standard spanning tree, a set of trading quants that have flexibility, like the Fibonacci sequence. For analysis it is better to model the 25 stage network with a balanced 8 stage network of Fibonacci numbers since we know the F numbers will be minimum redundancy.
I want the sequences: [t(i)]*[log(t(i]) converted to something like [f(i)*k]*[log(f(i)*k] where the k scale is chosen to match the actual t(i) at the long end. Once in the F series, I have some simplifications I can make to the sum of ([f(i)*k]*[log(f(i)*k)] where I have, say 8 stages rather than the 25 out of the encoder. Channel theorists work with the fact that log(f(i)) is uniformly distributed, to the nearest integer, meaning the value increases at a rate no faster then the distance between two consecutive F numbers, a valuable property., and is the reason F numbers are the basis set for traders. It means that when we map a trade series to a F sequence, the quant sises along the network remains a two multiple of the basic quant size.
After some reangement the sum looks like: k* sum(f(i) * Q) + n*ln(k)) summed over n channels rather then the original 25. The basic quant size can be set so that the series based on f generates the same prices as that generated by real traders. We have a basis set.
Note also that the sum(f(i) is Fn+2 -1, (n+2) is the second F number greater than the max in the chosen series). So, setting the scale values properly (which I never get right!) we have a simplified match to the data, which we can make as accurate as we want.
Working the details and getting scale factors correct, we end up treating the trading system as a simple binary 8 bit balanced computing tree rather than the unbalanced, 25 bit computing tree we started with. I can then count trades up to a price (rescaled) of 128 with a precision of 1/256, or measured in $2 bills, my quant error is $1 and I can actual up to $256*128 = $32768. My balanced trading network overlays the real network.
No comments:
Post a Comment