Click here to Login








Fixed Bucket Calculation

by swalk10, 5258 days ago
Share |


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




You have to log in to bookmark this object
What is this?
Additional Information




Type: Trading Indicator

Object ID: 566


Country:
All

Market: All

Style:
Technical Analysis

Reviews
You must log in first

Join now
and get instant access for free to the trading software, the Sharing server and the Social network website.
Click here


Related objects

Empty

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
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

Technical Analysis


Fundamental Analysis



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
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
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






QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.