Fri 21 Jul 2006

Ok, as promised, a primer on density profiles or meta-MarketProfiles or whatever you want to call them.

To begin, grab yourself some data.? Good ol’ OHLC data.? Any timeframe will do as we have been discussing in the “You Are My Density” thread.? I realize that daily data is by far and away the most commonly availble free data so don’t be afraid to use it even though I recommend 30 minute data or hourly if you can get it.? Now, throw out the open and close.? Well, don’t literally throw it out but you won’t need it to make the chart.? What you are left with are a bunch of high-low ranges for each time period.? How many time periods?? I usually don’t like to work with less that 250 periods and I avoid after-market periods and weekends data because they aren’t active enough to be given the same weight (or any at all).? In addition to the 250 period chart, I like to make a 500 and a 1000 period chart for reference.

So if you have a vertical column of highs and lows, create a horizontal group of buckets for your chart price axis.? If you have enough space, make a bucket for every possible price tick from the highest high to the lowest low of your data set.? Or otherwise make some bigger buckets, like every 5 or 10 ticks.? Now put a?”1″ in every bucket that the high-low range for that period covers.? For example, if the range of some market is 70-65 during one time period, and you have buckets every 0.5 then you’ve put a 1 in the 65.00, the 65.5, the 66.00 etc. all the way up to 70.00.? Do this for each time period then add up all your columns into a histogram.? That’s it.

Here is an?example?worksheet. I used daily SPX prices from Yahoo!? I figured using this data would be appreciated since it’s the most readily available.? Across the top are the buckets I created, one at each whole number.? The rest of the worksheet is the 1s and 0s used to flag the buckets at each time period.? The very last row is the sum of each column and is the final histogram that I charted.

Now you should be able to create these for anything you wish.

P.S. I included an exponentially-weighted version of the chart on the second tab if you want to play with that concept.? I tend to do this to my data often.? You can play with the weights. If you want, say a 200 day exponential weighting then the weight is 2/(200+1) or ~0.01.? This would go in the formula in place of the 0.008 I used (~250 days).? You could also just right the formula to accept some input from some cell but I was in a hurry.