# Distribution-of-returns Profiling

A Statistics concept (Normalization & distribution) in the LuxAlgo Library, with 5 indicator implementations.

## What is Distribution-of-returns Profiling?

Distribution-of-returns profiling builds the empirical distribution of a market's moves from history and reads its shape directly, instead of assuming a bell curve. Collect returns per bar, per session, or per week, optionally conditioned on context such as weekday or regime, then examine the histogram and its summary statistics: center, spread, skew, and tail weight, the classic [distribution moments](https://www.luxalgo.com/library/concept/distribution-moments/), along with percentiles and exceedance frequencies such as the share of days that travel more than a given distance.

The workflow has a few load-bearing choices. The return unit sets the question (per-bar returns profile noise, per-session returns profile the tradable day, weekly returns profile the swing horizon); log returns are standard for their additivity, though simple returns read more naturally; and conditioning splits, by session, weekday, or volatility state, turn one anonymous distribution into several answerable ones. Exceedance tables and percentile grids are the usual outputs because they translate directly into trade language: how often does a day travel this far?

The exercise matters because market returns are famously non-Gaussian: fat tails and volatility clustering make extreme moves far more common than a normal curve implies. Profiling the observed sample grounds targets, stops, and expectations in measured frequencies rather than idealized math, and it supplies the raw material for tools such as [probability cones](https://www.luxalgo.com/library/concept/probability-cones/) and exceedance tables. The estimates are only as good as the sample: tails need a lot of data, and old regimes may not represent current ones.

The pitfalls are the flip side of the power. Markets are not stationary, so a profile spanning a regime break averages two different markets into one misleading picture; every conditioning split thins the sample, and enough splits will find a flattering slice by chance. Serial dependence complicates the story further, since returns that echo their own past (see [autocorrelation](https://www.luxalgo.com/library/concept/autocorrelation/)) make independent-draw reasoning too optimistic. Good profiling reports sample sizes, tests slices out of sample, and treats the result as a description of the past rather than a promise.

## How to read a returns-profile tool

Profile tools render as histograms, percentile grids, or probability tables; the reading discipline is the same for all of them.

1. Check the definition first: which return unit (bar, session, week), log or simple, and over what sample span; nothing else means anything without these.
2. Read the histogram against its fitted normal overlay, if shown: extra mass in the tails and asymmetry between the sides are the non-normality that sigma reasoning misses.
3. Read the percentile grid for the market's vocabulary: the median day, the quartile day, the worst-decile day, each in the instrument's own units.
4. Use exceedance rows as frequency statements: the share of sessions traveling beyond a given multiple of [ATR](https://www.luxalgo.com/library/concept/atr/) or percentage tells you how rare a target or stop distance really is.
5. For conditioned views, check the per-slice sample size before trusting any difference between slices; thin slices produce loud, meaningless contrasts.

## How traders use it

- To size targets and stops from observed frequencies: if only a small share of sessions travel beyond some multiple of [ATR](https://www.luxalgo.com/library/concept/atr/), a target parked past that distance is, by the data's own account, a low-frequency outcome.
- To test for conditional edges: split the sample by session, weekday, or volatility regime and compare the distributions; a bias that survives the split, with adequate sample size in each slice, is worth further study.
- To sanity-check model assumptions: comparing the sample's tails against a fitted normal curve shows how badly sigma-based bands and thresholds will understate extremes before you rely on them.
- To choose normalizations: whether a [z-score](https://www.luxalgo.com/library/concept/z-score/) is honest or a [percentile rank](https://www.luxalgo.com/library/concept/percentile-rank/) is required is itself a profiling question, answered by how non-normal the measured distribution turns out to be.
- To feed simulations: resampling from the empirical distribution, or fitting one that matches its moments, gives [Monte Carlo paths](https://www.luxalgo.com/library/concept/monte-carlo-price-paths/) and [probability cones](https://www.luxalgo.com/library/concept/probability-cones/) the market's actual tail behavior instead of textbook tails.

## Profiling vs related statistical tools

- **Distribution Moments** (https://www.luxalgo.com/library/concept/distribution-moments/): Moments compress the distribution into a few shape coefficients: mean, variance, skew, kurtosis. Profiling keeps the whole object, histogram, percentiles, exceedances, which is more robust when outliers make higher-moment estimates unstable.
- **Probability Cones** (https://www.luxalgo.com/library/concept/probability-cones/): Cones are the forward projection of a profile: take the measured distribution, compound it over a horizon, and draw the percentile envelope. Profiling is the measurement step; the cone is one way to spend it.
- **Monte Carlo Price Paths** (https://www.luxalgo.com/library/concept/monte-carlo-price-paths/): Monte Carlo generates synthetic futures by drawing from some distribution, and the profile is what makes those draws honest: resampling measured returns carries the real tails and asymmetry into the simulation instead of Gaussian assumptions.

## FAQ

### Are market returns normally distributed?

No. Empirical return distributions are fat-tailed and often skewed, and volatility clusters in time, so large moves arrive far more often than a normal distribution predicts. That is exactly why profiling the observed distribution is useful: rules calibrated to a Gaussian assumption, such as fixed sigma thresholds, systematically understate how frequent and how large the extremes really are.

### How much history do you need to profile returns?

It depends on which part of the distribution you care about. Estimates of the center and middle percentiles stabilize with modest samples, while tail frequencies need far more data, and every conditioning split (by weekday, session, or regime) thins the sample further. There is no universal number: report sample size alongside the estimate, and remember that old data may describe a regime that no longer exists.

### Should profiling use log returns or simple returns?

Log returns are the analyst's default: they add across time, so multi-period behavior follows from single-period behavior, and they treat up and down moves symmetrically in compounding terms. Simple returns read more intuitively and match P&L for single periods. For small moves the two are nearly identical; for large moves and long horizons the log convention avoids compounding distortions.

### What is an exceedance table?

A frequency table of how often moves beyond given thresholds occurred: the share of sessions traveling more than 1, 2, or 3 ATR, or more than fixed percentage distances. It converts the distribution into direct trade language, since a stop or target at some distance can be read off as the historical frequency of the market reaching it within the unit period.

### How should regime changes be handled in profiling?

By segmentation and recency discipline. A profile spanning an obvious break, a volatility explosion, a structural market change, averages incompatible samples, so analysts either profile regimes separately, weight recent data more heavily, or restart the sample at detected change points. Checking whether the profile's own recent slice resembles its full-sample shape is a quick honesty test.

### Per-bar, per-session, or per-week: which unit should be profiled?

The one matching the decision the profile will inform. Intraday stop placement wants per-bar or per-session distributions; swing targets want daily or weekly ones; and mixing units quietly invalidates the read, since per-bar noise compounds into per-week behavior in ways serial dependence distorts. Many desks maintain profiles at two or three units and consult the one the trade lives on.

## Implementations in the Library

- Probability Grid (LuxAlgo): https://www.luxalgo.com/library/indicator/probability-grid/
- Consecutive Candle Streak Analysis (LuxAlgo): https://www.luxalgo.com/library/indicator/consecutive-candle-streak-analysis/
- ATR Exceedance Probability Model (LuxAlgo): https://www.luxalgo.com/library/indicator/atr-exceedance-probability-model/
- Visible Range Mean Deviation Histogram (LuxAlgo): https://www.luxalgo.com/library/indicator/visible-range-mean-deviation-histogram/
- Day Of Week Price Distribution (LuxAlgo): https://www.luxalgo.com/library/indicator/day-of-week-price-distribution/

## Related concepts

- Percentile Rank: https://www.luxalgo.com/library/concept/percentile-rank/
- Min-max Scaling: https://www.luxalgo.com/library/concept/min-max-scaling/
- Sigmoid/softmax Transforms: https://www.luxalgo.com/library/concept/sigmoid-softmax-transforms/
- Standard Deviation: https://www.luxalgo.com/library/concept/standard-deviation/
- Z-score: https://www.luxalgo.com/library/concept/z-score/
- Winsorization: https://www.luxalgo.com/library/concept/winsorization/
- Distribution Moments: https://www.luxalgo.com/library/concept/distribution-moments/
- Normality Testing: https://www.luxalgo.com/library/concept/normality-testing/
- Outlier Detection: https://www.luxalgo.com/library/concept/outlier-detection/

---

Source: https://www.luxalgo.com/library/concept/distribution-of-returns-profiling/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/