#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

## Fixed Bucket Calculation

 by swalk10, 3864 days ago

Fixed Bucket Calculation

In financial modeling, "normalizing" data is critical to evaluating a time series in a smooth and consistent manner. What constitutes a high versus what is a low value? Properly characterizing values is important to determine valid "signals". It rarely a good idea to use absolute values, rather, analysis outcomes are more predictable and models robust when the data series is adopted to the current conditions.

Several techniques are available to accomplish this task. One is the Percent Rank Function (kindly programmed by the QuantShare team at my suggestions - thanks!). An alternative approach is to place the data into a series of "buckets". This function takes a time series of data and puts it into buckets based on a fixed high and low value. The number of buckets are a variable that the user can set - I like to use a small odd number of buckets - for example 5. With 5 buckets, the high bucket would be a value of 4, and the low would have a value of 0.

The data is placed into the buckets by linearly distributing such that each bucket has an equal range of values that will cause even brackets. For example, If the data series has a minimum of 0 and max is 100, and we use 5 buckets, then the bucket values boundaries would be 0 to 20, 20+ to 40, 40+to 60, etc.

Takes highest values of the series goes to largest # bucket, the smallest to lowest bucket (bucket 0).

The function inputs are:
DataSeries: can use a price series (e.g., close) or an indicator
HighValue: user defined highest values (values out of range are places in the highest/lowest bucket respectively)
LowValue: user defined lowest value
Buckets: # of buckets

A powerful combination is to use this with the Channel Position, so it can dynamically change the high and low values when bucketing data. Combined it could be called as follows:

FixedBucketCalc (ChannelPosition(c,50), 1,0,5)

This would use a 50 period channel of closing price, with the high and low values of 1 and 0 to accommodate the percent rank output of the ChannelPosition, and 5 buckets.

Scott Walker & Michael Walker

What is this?

 Type: Trading Indicator Object ID: 566 Country: All Market: All Style: Technical Analysis

 Related objects Empty
Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

 Random Blog Posts How to create a trading indicator that uses stock news How to create your own technical analysis indicators Create a stock index or a trading indicator using the composite tools Create a trading strategy using the money management tool - Part 2 Create a trading strategy using the money management tool - Part 1 How to create a market timing system - Part 3 Correlation of market indicators How to create a market timing system Show All

Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object