Source-linked AI summary
Introducing the CZAR Loss: A Tailored Objective Function for Financial Log-Return Predictions
Joel Pfeffer, J. M. Diederik Kruijssen, Florian Stecker, Steven N. Longmore
TL;DR
Near-zero conditional means make symmetric losses favor zero-return forecasts, affecting return prediction and model comparison. The paper introduces CZAR, a convex, direction-aware loss with an adaptive evaluation floor. Idealized tests keep its log-loss breakeven near chance as prediction noise rises, and BTC experiments report improved directional accuracy on large-magnitude returns.
Problem
Because conditional mean returns are near zero, symmetric losses make zero forecasts near-optimal and can misalign training and evaluation with directional prediction.
Source: §1 · pp. 1–2Method
The paper constructs CZAR, a piecewise quadratic loss with true-direction asymmetry and an evaluation-time loss floor, designed to be convex and usable in gradient-boosted frameworks.
Source: §1 · p. 2Results
CZAR-trained LightGBM models on intraday BTC returns reduce prediction shrinkage and improve naive Sharpe and directional accuracy on large-magnitude returns.
Source: §5 · p. 14Takeaways & Limitations
The authors conclude CZAR offers a convex, trainable, evaluation-consistent loss that removes the zero-returns attractor by construction, at the cost of a characterizable forecast bias.
Source: §5 · p. 15On the 2,000-candle test window, full-sample directional accuracy is generally statistically indistinguishable from L1 and L2, with improvement tending to occur on larger moves.
Source: §4.2 · p. 12
Abstract
from arXiv · showhide
In quantitative finance, standard regression losses are misaligned with the economics of return prediction. As the conditional mean of financial log-returns is close to zero, symmetric losses such as the mean squared and mean absolute errors make the constant zero forecast a near-optimal solution, penalizing models with genuine but noisy directional skill. This applies both during training, where predictions shrink toward zero, and during evaluation, where trivial forecasters can lead loss-based rankings. Under a Gaussian linear prediction model, we show that all symmetric monotonic losses share a universal breakeven directional accuracy against the zero predictor, which rises sharply and becomes unobtainable as the prediction noise approaches the standard deviation of the returns. We introduce the CZAR (Composite Zero-Agnostic Return) loss function, a piecewise quadratic loss built around five key requirements: convexity in the prediction, asymmetry with true return direction that vanishes at zero, near-linear penalization of undershoots and wrong-direction predictions, divergence for large errors, and an adaptive loss floor for evaluation. CZAR is provably convex in the prediction at fixed true value, has closed-form gradient and Hessian suitable for custom objectives in gradient-boosted libraries, and its four hyperparameters reduce to a single choice through correlated defaults. In idealized tests, the minimum directional accuracy required for a CZAR-evaluated forecaster to outperform the zero predictor under mean log loss remains near the 50% chance level, whereas the corresponding threshold for symmetric losses rises sharply with prediction noise. This advantage persists under heavy-tailed return distributions. In a LightGBM experiment on intraday BTC log-returns, CZAR-trained models reduce the `zero-returns bias' and improve directional accuracy on large-magnitude returns.
1 Introduction
Near-zero conditional means make symmetric regression losses favor zero forecasts, misaligning both training and evaluation with directional prediction. The paper introduces CZAR as a convex, direction-aware loss designed to address this problem while remaining usable for gradient-boosted models.
1 Introduction
- Symmetric losses make zero a near-optimal forecast, penalizing noisy directional skill and pulling trained predictions toward zero.Because losses also guide model selection, the bias affects both training and evaluation.Source: §1 · p. 1
- Existing asymmetric losses impose a fixed prediction-error bias, while strong constant asymmetry can make systematically wrong forecasts win under mean log loss.The paper argues return prediction instead needs asymmetry oriented by the true return, vanishing at zero and strengthening with magnitude.Source: §1 · p. 2
- Economic-objective approaches often lack the convexity or analytical gradient and Hessian needed for general-purpose training in gradient-boosted libraries.The stated gap is a general-purpose, directly trainable loss that prevents zero or wrong-direction forecasts from outranking informative models.Source: §1 · p. 2
- CZAR is a piecewise quadratic loss satisfying five return-prediction requirements, with convexity, closed-form gradient and Hessian, and four hyperparameters reduced through correlated defaults.Idealized tests keep its log-loss breakeven directional accuracy near 50% as noise rises; BTC experiments report less prediction shrinkage and improved large-move directional accuracy.Source: §1 · p. 2
2 Background
Under Gaussian linear predictions, symmetric losses share a noise-dependent breakeven directional-accuracy threshold against the zero-returns model. The section compares asymmetric losses and a loss floor, then motivates design requirements for return-prediction objectives.
2 Background
- The analysis assumes true returns y~N(0,1) and predictions ˆy=ρy+independent Gaussian noise; ρ is the regression slope, not the prediction–return correlation.The figure illustrates predicted-versus-true returns under this Gaussian linear model.Source: §2 · p. 2, Figure 1 · p. 3
- Zero predictions have DA=0 yet achieve MAE 0.795 and MSE 1.007, below the signal model at ρ=0.1, σN=0.5 (MAE 0.826, MSE 1.079).This example shows prediction noise outweighing the signal under these error measures.Source: §2 · p. 3
- For Gaussian linear predictions, symmetric monotonic losses share a universal breakeven directional-accuracy curve; above noise scale σN=1, they cannot beat zero regardless of directional accuracy.The curve is DA = 0.5 + arctan(ρ_minσ/σN)/π, with ρ_min = 1 − (σN/σ)^2, valid for 0 ≤ σN ≤ 1.Source: §2 · p. 3, Figure 2 · p. 4
- Under mean linear loss, asymmetric losses lower breakeven DA but keep it above 50%; MAE with α=0 achieves far lower breakeven than MSE.The comparison favors a linear undershooting term over a quadratic one in these panels.Source: §2 · p. 3, Figure 2 · p. 4
- Under mean log loss, constant asymmetry can push breakeven below 50%, while a Gaussian loss floor keeps it at least 50% and reduces it at intermediate noise.The floor raises loss near y=0 and falls with |y|; because it does not depend on predictions, it cancels from the mean-loss breakeven inequality.Source: §2 · pp. 3–4, Figure 2 · p. 4
- The proposed design requirements include convexity in prediction at fixed truth, true-direction asymmetry that vanishes at zero, near-linear penalties for undershooting or wrong-direction predictions, and divergence for large errors.Convexity supports gradient-boosted training; divergence penalizes extreme outliers.Source: §2 · pp. 4–5
- An adaptive loss floor should raise loss for returns near the distribution mean, reducing their relative weight under log-averaged evaluation.This requirement targets evaluation rather than per-sample prediction-dependent loss.Source: §2 · pp. 4–5
3 CZAR loss function
CZAR is a piecewise-quadratic return loss, convex in the prediction at fixed true value, that penalizes undershoots and wrong-direction predictions more than correct-direction overshoots. Its adaptive floor raises losses for near-zero true returns during evaluation, while correlated defaults reduce four hyperparameters to one practical choice.
3 CZAR loss function
- CZAR is convex in the prediction at fixed true value and discounts correct-direction overshoots relative to undershoots or wrong-direction predictions.An optional pseudo-Huber smoothing extension for undershooting was not used in reported results.Source: §3 · p. 5
3.1 Notation
- β_eff equals 1 at z = 0 and decays toward 0 as |z| grows, strengthening the asymmetry between the two prediction regions.Its complement weights the linear undershoot term, while β_eff scales the quadratic overshoot penalty.Source: §3.1 · p. 5
3.2 Base loss
- For α > 0, the base loss combines a linear undershoot term with quadratic penalties in both regions, ensuring convexity and unbounded growth in prediction error.At α = 0 the correct-direction overshoot penalty disappears, so the loss becomes degenerate and fails the unbounded-growth requirement.Source: §3.2 · p. 5
3.3 Gradient and Hessian
- The base loss is convex because its regional derivatives have nonnegative slopes and its derivative jumps upward at the region boundary.The upward jump concentrates the reward signal near the true value; joint convexity in true and predicted returns is not claimed.Source: §3.3 · p. 6
3.4 Adaptive loss floor
- The adaptive floor raises the minimum loss near z = 0 but contributes nothing to the gradient or Hessian, so its role is evaluation and model ranking.With the correlated default floor, breakeven directional accuracy stays at or above 50% across noise scales.Source: §3.4 · p. 7
3.5 Total loss
- The total loss combines the asymmetric base loss with a floor, producing nearly linear penalties for large-return undershoots and much smaller penalties for correct-direction overshoots.Correlated defaults set β and C from α; the floor raises the z = 0 minimum, while α scales the loss profile.Source: §3.5 · p. 8
4 Evaluation
Idealized tests show that CZAR lowers the directional-accuracy threshold for beating the zero-returns predictor and better aligns loss rankings with directional signal. In intraday BTC experiments, CZAR reduces prediction shrinkage and improves accuracy on large moves, although full-sample accuracy gains are generally not statistically distinguishable from symmetric losses.
4.1 Idealized tests
- Under mean log loss, CZAR’s breakeven directional accuracy stays within ≲5 pp of chance across σN ∈[0, 1.5], unlike the sharply rising symmetric-loss threshold.Under mean linear loss, CZAR’s breakeven is intermediate but improves on the asymmetric-MAE envelope at every noise scale.Source: §4.1 · p. 10, Figure 7 · p. 11
- Under log loss, heavier Student-t tails raise breakeven accuracy for both losses, but CZAR retains a margin over MSE at every tested noise scale and tail index.The tested distributions use ν = 5 and ν = 3; the authors note that Gaussian-calibrated defaults partly account for CZAR’s mild degradation under heavier tails.Source: §4.1 · p. 10, Figure 8 · p. 12
- For noisy positive-signal models, CZAR moves the high-noise, high-|ρ| branch below the zero-return loss baseline, while symmetric losses rank it behind the baseline.At a given directional accuracy, positive-signal cases also fall on essentially one CZAR log-loss track, whereas symmetric losses spread across a wider band.Source: §4.1 · p. 10, Figure 9 · p. 13
- At fixed signal, increasing prediction noise raises log loss under symmetric losses, but CZAR loss is nearly independent of noise for ρ ≲0.5.The symmetric-loss pattern also lets forecasts reduce loss by shrinking prediction magnitude; CZAR rankings instead track directional signal.Source: §4.1 · p. 10, Figure 9 · p. 13
4.2 Model training
- The BTC experiment uses LightGBM at 15-minute and 1-hour horizons with a deliberately restricted feature set, as a controlled comparison of training losses rather than a search for the best forecaster.The test uses one recent split and a 2,000-candle test window at each horizon.Source: §4.2 · pp. 10–11
- CZAR keeps large-move directional accuracy above chance (≈0.50–0.56) across settings, while L1 and L2 shrink predictions roughly an order of magnitude and remain at or below chance.CZAR also raises RP and IC and generally improves naive Sharpe; full-sample directional-accuracy differences are often within sampling error.Source: §4.2 · p. 12, Table 2 · p. 14
- Conditional accuracy gains are less precise than full-sample estimates: DA1σ and DAIQR have standard errors of ≈2 and ≈1.6 pp, respectively.Those metrics use roughly one-third and one-half of the test truths; the direction of the gap is consistent across horizons and conditioning rules.Source: §4.2 · p. 12, Table 2 · p. 14
- Selecting CZAR-trained models with symmetric log-L1 validation loss restores aspect-ratio shrinkage and reduces large-move accuracy to ≈50%, so CZAR is needed for both training and model selection.Predicted spreads shrink from roughly a quarter to a tenth of the true scale under symmetric selection.Source: §4.2 · p. 12
5 Discussion and conclusions
The discussion argues that CZAR addresses the zero-returns attractor in training and evaluation, with near-chance log-loss breakeven accuracy in idealized tests and improved BTC results. It also frames loss choice as a consequential but non-exhaustively tested trade-off that includes forecast bias.
5 Discussion and conclusions
- CZAR’s log-loss breakeven directional accuracy stays near the 50% chance line in idealized tests, while the symmetric-loss threshold rises sharply; the advantage persists under heavy-tailed truths.Its correlated defaults were calibrated on a Gaussian testbed; under heavy-tailed truths, breakeven degrades mildly, and recalibration against the target distribution should recover much of the gap.Source: §5 · p. 14
- In intraday 15-minute and 1-hour BTC returns, CZAR-trained LightGBM models reduce L1/L2 prediction shrinkage and improve naive cost-excluded Sharpe ratio and large-magnitude directional accuracy.The loss floor affects sample-averaged validation and ranking losses, not per-sample gradients; training pressure away from zero comes from the base asymmetry.Source: §5 · p. 14
- Sample-averaged CZAR log-loss is proposed for ranking or scoring forecasters because equal directional accuracy maps to essentially equal loss and the floor prevents near-zero predictors from leading.The proposed uses include hyperparameter tuning, early stopping, model selection, and decentralized inference rewards.Source: §5 · p. 14
- Symmetric losses can reward prediction shrinkage rather than directional skill, so the discussion recommends tracking σˆy/σy and treating the averaging convention as part of loss design.L1- and L2-trained models in Table 2 had predictions shrunk roughly an order of magnitude below truth, with large-move directional accuracy at or below chance.Source: §5 · p. 15
- The authors describe their tests as non-exhaustive and characterize CZAR as trading a zero-returns attractor for a characterizable forecast bias.They argue the compromise is favorable where directional information is the economically relevant output.Source: §5 · p. 15
A Reference implementation
The reference material supplies batched loss, gradient, and Hessian routines, then describes the Gaussian signal-noise model and how directional-accuracy breakeven curves are defined.
A Reference implementation
- The reference implementation provides batched CZAR loss, gradient, and Hessian functions, with numerical guards for degenerate normalization and evaluation-time underflow.Its Hessian is nonnegative in both regions, confirming convexity in the prediction at fixed true value.Source: A Reference implementation · pp. 16, 18
Prediction model and directional accuracy
- Under the stated prediction model, directional accuracy depends only on SNR = ρσ/σN, not on ρ and σN separately.The model expresses predicted returns as a linear combination of signal and independent Gaussian noise.Source: Prediction model and directional… · p. 18
Breakeven conditions
- For each noise scale σN, the minimum directional accuracy that breaks even with a constant-zero forecast traces the breakeven curves under linear or log averaging.The breakeven definition equates the predictor’s expected loss with the zero forecast’s expected loss.Source: Breakeven conditions · p. 18
Symmetric losses share a universal breakeven curve
For the specified class of symmetric losses under the Gaussian linear model, the paper establishes a universal breakeven condition independent of the loss function’s form.
Symmetric losses share a universal breakeven curve
- For strictly increasing positive symmetric losses satisfying the stated finiteness conditions, linear and log breakeven conditions are equivalent and independent of g.The proof reduces each condition to prediction-error scale s equaling return scale σ.Source: Symmetric losses share a universal… · pp. 18–19
- MSE, MAE, Huber loss, and other symmetric losses meeting the conditions share the same breakeven condition.The resulting universal curve applies to both linear and log averaging.Source: Symmetric losses share a universal… · p. 19
Asymmetric losses can decouple the two breakevens
The paper argues that asymmetry is required to improve on the shared symmetric-loss breakeven bound and that it can separate linear from log breakeven behavior.
Asymmetric losses can decouple the two breakevens
- No symmetric loss in the stated class can achieve a breakeven curve below the universal bound under either linear or log averaging.Improving on that bound requires treating correct- and wrong-direction predictions differently.Source: Asymmetric losses can decouple the two… · p. 19
- With asymmetric losses, changing signal strength changes the mix of correct- and wrong-direction samples, so linear and log expectations need not have equivalent breakeven conditions.The two averaging schemes weight the changing loss distribution differently.Source: Asymmetric losses can decouple the two… · p. 19
- CZAR separates its loss by true-return and prediction signs; its log-loss breakeven lies substantially below the symmetric bound, while its linear-loss breakeven tracks that bound more closely.The paper identifies this separation as the central property motivating the design.Source: Asymmetric losses can decouple the two… · p. 19
C Pseudo-Huber smoothing
Pseudo-Huber smoothing replaces the Region A MAE distance to remove its gradient step at the prediction boundary, while preserving convexity in the prediction. The appendix also modifies the loss floor and gradient and Hessian accordingly.
C Pseudo-Huber smoothing
- ε > 0 replaces the Region A MAE term with a pseudo-Huber distance, smoothing the gradient step into a continuous zero-crossing.The unsmoothed step occurs at ẑ = z of magnitude (1 − β_eff)/σ.Source: C Pseudo-Huber smoothing · p. 19
Modified quantities
- The effective smoothing scale is ε_eff(|z|) = ε|z|, making the effective distance quadratic for small errors and linear for large errors.An amplitude boost compensates for the reduced effective distance at small errors.Source: Modified quantities · p. 19
Modified base loss
- Region A replaces (1 − β_eff)Δz with b(1 − β_eff)Δz_eff, while Region B remains unchanged.Source: Modified base loss · p. 19
Modified gradient and Hessian
- For ε > 0, the Region A gradient vanishes continuously at ẑ = z, and its Hessian gains curvature that decays toward the ε = 0 constant Hessian.The Region B gradient and Hessian are unchanged.Source: Modified gradient and Hessian · pp. 19–20
Modified loss floor
- The zero-prediction base loss substitutes the effective distance at Δz = |z|, and the floor formulas otherwise remain unchanged with a redefined deficit.Source: Modified loss floor · p. 20
Convexity
- For all ε ≥ 0, the loss remains convex in ẑ at fixed y; with ε > 0, the gradient is continuous at ẑ = z.The Hessians on both regions are positive, and any residual boundary jump is upward.Source: Convexity · p. 20
D Parameter optimization
The parameter-optimization procedure determines correlated defaults for β*(α) and C*(α), and selects a constant hinge width τ. The floor parameters are calibrated sequentially because their effects are degenerate under the breakeven criterion.
D Parameter optimization
- The section applies the prediction model and breakeven directional accuracy to determine β*(α), C*(α), and a constant hinge width τ.Source: D Parameter optimization · p. 20
- C and τ are chosen so log-loss breakeven directional accuracy stays at or above 50% across noise scales.Source: D Parameter optimization · p. 20
- Because C and τ act degenerately on the floor term, τ is fixed using an independent criterion before C is optimized.Source: D Parameter optimization · p. 20
Optimizing β
The β optimization finds a shallow breakeven-accuracy basin and fits its optimum across a broad range of α. The τ default is selected to keep expected log-loss monotonic in prediction magnitude over the working range.
Optimizing β
- At σ_N = 1, breakeven directional accuracy is evaluated over 50,000 Gaussian-linear-model samples, and β*(α) minimizes it for each α.Source: Optimizing β · p. 20
- The shallow β basin makes the default robust, and the power-law fit tracks β*(α) across more than three decades of α.For α ≤ 0.7 the fit follows the numerical optimum; practical use is recommended for α ≤ 1.Source: Optimizing β · p. 20, Figure D1 · p. 21
Optimizing τ
- τ = 0.5 is adopted as the smallest constant that keeps expected log-loss monotonic across α ≤ 1; lower τ values can create minima near ẑ ≈ ±2.The minimum admissible τ increases with α; values near 0.1 remain monotonic at α = 0.1, while α = 1 requires τ ≳ 0.5.Source: Optimizing τ · p. 21
Optimizing C(α)
C*(α) is calibrated by targeting 50% log-loss breakeven directional accuracy at σ_N = 0.1, using a local linear fit. The resulting values are represented by a smooth asymmetric Hill-bell fit with a linear correction.
Optimizing C(α)
- C* rises from zero at α = 0 to a peak near α ∼ 10^-2, then declines slowly; an asymmetric Hill-bell model with a linear correction fits the curve.Source: Optimizing C(α) · p. 21, Figure D3 · p. 22
- The fitted Hill-bell parameters are (A, t, p, k, R, m) = (7.90, 4.59 × 10^-3, 0.657, 0.684, 2.25, −0.218).Source: Optimizing C(α) · p. 21
- The C*(α) calibration yields breakeven curves clustered tightly around 0.5 across noise scales.C is bisected until a linear fit to nearby noise-scale evaluations equals 0.5 at σ_N = 0.1; τ = 0.5 and β = β*(α).Source: Optimizing C(α) · p. 21, Figure D3 · p. 22