Sunday, October 28, 2018

The SP500 from 1950 1968

Pretty sure I grabbed that opening price on a monthly basis, but any of the stock indices will do.

If we looked at values around the trend we see they are evenly dispersed.  The trend is strong, so, relative to trend this series has about as many numbers around 30 as it does around 80.  Around the point of symmetry we get a uniform distribution.

The deviations from trend show up as rare prices, (this is all aggregate opening price).    We expect longer queues when rare events happen.  

This is a bad choice to study, it has no complete set boundaries, so the data is aliased. But I made a Huffman tree out of it using three decimal precision:


                                        100                                                         
                    36                                      64                                      
          16                  20                  32                  32                            
     8         8         8         12        16        16        16        16                       
  4    4    4    4    4    4    5    7    8    8    8    8    8    8    8    8                      
 2 2  2 2  2 2  2 2  2 2  2 2  2 3  3 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4  4 4                     
1111 1111 1111 1111             12   22 2222 2222 2222 2222 2222 2222 2222 2222                     
                                 1      1111 1111 1111 1111           1111 1111                     
                                                                                                    
This is somewhat balanced, but the shortest path from root to leave ois 4 steps, the longest 7. Rare mevens have longer paths.  There is more that we can do, this is just one tiny proof of concept.  Mainly we want total wealth moved in the market, volume and prove. The other thing to remember, the market is efficient, already 'encoded' for efficiency.

Huffman coding is a standard non lossy compression method for text.  I can make it a bit lossy, do not do the exact match  on words, see if they are in the special set of words  Then my longest path represents the rare words needing multiple filters to identify, each node having a word filter, a word list of some exactness with which to join.    That way we identify the structure of a text body much like we diagram a sentence.

No comments: