charts
Statistical Analysis
These statistics provide valuable insights into the behavior of your market data. This understanding is particularly useful when constructing exotic bars and fine-tuning your algorithms.
Understading Your Data
Bars Per Day
This statistic calculates the average number of bars generated per day. It provides a simple way to categorize the time frame of your market data:
- Short-term markets: More than 24 bars per day (less than hourly bars). These capture rapid price fluctuations.
- Medium-term markets: Between 24 and 6 bars per day (e.g., 4-hour bars). These are suitable for day trading and swing trading strategies.
- Long-term markets: Between 6 and 1 bar per day (e.g., daily bars). These are used for longer-term trend-following and position trading strategies.
- Extra long-term markets: Less than 1 bar per day. These are for traders with a very long-term horizon.
Why is this important for exotic bars?
Exotic bars, which are not based on fixed time intervals, can be harder to categorize in terms of their time frame. "Bars per day" provides a quick and easy way to compare them with traditional time-based bars and understand their behavior.
Distribution
This provides basic statistical information about the bars on your chart, including:
- Mean: The average bar size.
- Standard Deviation: The variability or dispersion of bar sizes.
- Other statistics: Minimum, maximum, and various percentiles.
How can this be used?
This information can be useful for translating time-based bars into exotic bars. For example, you could calculate the average plus one standard deviation of 4-hour bars and use this value to construct range bars.
Entropy
Entropy is a measure of randomness or disorder in a system. In the context of market data, it indicates the degree of unpredictability in price movements.
Shannon Entropy
We use 5-bit Shannon entropy, which measures the information content of the data. The closer the value is to 5.0, the more random or noisy the data. Lower numbers indicate greater directionality and clearer signals.
Why is this useful?
By analyzing the entropy of your data, you can gain insights into its underlying structure and identify potential trading opportunities. For example, you might find that certain exotic bar settings produce lower entropy, indicating clearer trends and potentially more profitable trading signals.
Think of it like this:
Imagine a coin toss. A fair coin has maximum entropy because the outcome is completely unpredictable. A biased coin has lower entropy because one outcome is more likely than the other. Similarly, market data with high entropy is more random and difficult to predict, while data with low entropy exhibits clearer patterns and trends.
Building better bars
Use entropy as a guide to construct exotic bars that improve the clarity of your market data. Aim for bar settings that result in lower entropy compared to traditional time-based bars. This can help you filter out noise and identify more reliable trading signals.