mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-07-27 17:27:43 +00:00
33d20f2a18
Complete thin Dx-composition wrapper indicators with full test coverage: - PlusDi/MinusDi: Directional Indicator wrappers (DiPlus/DiMinus from Dx) - PlusDm/MinusDm: Directional Movement wrappers (DmPlus/DmMinus from Dx) - Individual validation tests per indicator directory (TALib, Skender, bounds) - Combined unit tests (DiDm.Tests.cs) and validation tests (DiDm.Validation.Tests.cs) - Quantower wrappers + tests for all 4 indicators - PineScript v6 implementations with compensated RMA - Normalized .md documentation for all indicators and categories - 182 tests passing, 0 failures
2.9 KiB
2.9 KiB
Errors
Error metrics and loss functions for model/strategy evaluation. All error indicators accept two input series (actual and predicted values) and compute rolling error metrics over a configurable period.
Indicators
| Indicator | Full Name | Description |
|---|---|---|
| HUBER | Huber Loss | Combines MSE and MAE. Configurable outlier threshold δ. |
| LOGCOSH | Log-Cosh Loss | Smooth approximation to MAE. Twice-differentiable. |
| MAAPE | Mean Arctangent APE | Bounded percentage error using arctangent. Range: 0 to π/2. |
| MAE | Mean Absolute Error | Average of absolute differences. Robust baseline. |
| MAPD | Mean Absolute % Deviation | Percentage error relative to mean of actual and predicted. |
| MAPE | Mean Absolute % Error | Percentage error relative to actual. Unbounded when actual≈0. |
| MASE | Mean Absolute Scaled Error | Scale-free. Uses naive forecast as baseline. |
| MDAE | Median Absolute Error | Median of absolute differences. Outlier-robust. O(n log n). |
| MDAPE | Median Absolute % Error | Median percentage error. Outlier-robust. O(n log n). |
| ME | Mean Error | Signed average. Detects systematic bias. |
| MPE | Mean Percentage Error | Signed percentage. Shows directional bias. |
| MRAE | Mean Relative Absolute Error | Error relative to naive forecast. |
| MSE | Mean Squared Error | Squared differences. Penalizes large errors heavily. |
| MSLE | Mean Squared Log Error | MSE on log-transformed values. For multiplicative errors. |
| PSEUDOHUBER | Pseudo-Huber Loss | Smooth Huber approximation. Fully differentiable. |
| QUANTILELOSS | Quantile Loss | Asymmetric loss for quantile regression. Pinball loss. |
| RAE | Relative Absolute Error | Absolute error relative to mean predictor. |
| RMSE | Root Mean Squared Error | √MSE. Same units as input. Penalizes outliers. |
| RMSLE | Root Mean Squared Log Error | √MSLE. For multiplicative error structures. |
| RSE | Relative Squared Error | Squared error relative to mean predictor. |
| RSQUARED | R² (Coefficient of Determination) | Variance explained. 1 = perfect. Can be negative. |
| SMAPE | Symmetric MAPE | Bounded 0-200%. Symmetric around zero. |
| THEILU | Theil's U Statistic | Forecast vs naive. <1 beats naive. >1 worse than naive. |
| TUKEYBIWEIGHT | Tukey Biweight Loss | Hard-rejects outliers beyond threshold. Redescending. |
| WMAPE | Weighted MAPE | Volume-weighted percentage error. For heterogeneous data. |
| WRMSE | Weighted RMSE | Weighted root mean squared error. Custom observation weighting. |