Composite Fractal Behavior (CFB) is a sophisticated trend duration index developed by Jurik Research. It measures the "fractal efficiency" of price movements across multiple time scales to determine the quality and duration of a trend. Unlike traditional trend indicators that look at a single period, CFB analyzes a spectrum of lookback periods to create a composite index.
CFB is designed to answer the question: "How long has the market been trending efficiently?" It is particularly useful for:
* Adjusting the period of other indicators (adaptive indicators).
* Filtering out choppy markets.
* Identifying the breakdown of long-term trends.
## Core Concepts
* **Fractal Efficiency:** Measures how "straight" the price movement is. A straight line has high efficiency; a choppy path has low efficiency.
* **Composite Index:** Instead of relying on a single lookback length, CFB evaluates a wide range of lengths (e.g., 4 to 192 bars) and combines them based on their efficiency.
* **Adaptive:** The indicator adapts to the market's current fractal structure, giving more weight to timeframes where trending behavior is evident.
* **Trend Duration:** The output value represents the approximate duration (in bars) of the current trend.
## Common Settings and Parameters
| Parameter | Default | Function |
|-----------|---------|----------|
| Lengths | `[2, 4, ..., 192]` | Array of lookback periods to analyze. Default is a dense array from 2 to 192. |
| Source | Close | Price data used for calculation. |
**Pro Tip:** CFB values typically range from 0 to the maximum lookback length. A rising CFB indicates a strengthening trend (either up or down), while a falling CFB suggests the trend is breaking down or the market is entering a consolidation phase.
## Calculation and Mathematical Foundation
The CFB calculation involves several steps for each lookback length $L$ in the provided set:
1.**Calculate Efficiency Ratio:**
For each length $L$, calculate the ratio of the net price movement to the total volatility (path length) over that period.