Add Savitzky-Golay Moving Average (SGMA) Indicator Implementation

- Implemented SgmaIndicator class in C# with properties for Period, Degree, and Source.
- Added unit tests for SgmaIndicator covering constructor defaults, initialization, and various update scenarios.
- Created a new Quantower adapter for the SGMA indicator, including input parameters and line series setup.
- Removed legacy SGMA implementation and tests to streamline the codebase.
- Updated project files to include new indicator and tests in the build process.
- Generated a missing indicators report and outlined a plan for oscillator documentation rewrite.
This commit is contained in:
Miha Kralj
2026-02-13 21:44:45 -08:00
parent 951842acca
commit dfeb23bf3d
81 changed files with 13629 additions and 2041 deletions
+14
View File
@@ -20,6 +20,7 @@ QuanTAlib provides technical indicators organized into mathematical families. Un
| [**Errors**](../lib/errors/_index.md) | Measurement accuracy and model fit quality | MAE, RMSE, Residuals, R² | Model validation and forecast assessment. Quantifying wrongness before production quantifies losses. |
| [**Forecasts**](../lib/forecasts/_index.md) | Future price prediction and projection | Linear regression extrapolation, adaptive prediction | Projecting price based on historical patterns. Predictions that invite humility. |
| [**Cycles**](../lib/cycles/_index.md) | Periodic patterns and dominant frequencies | Hilbert Transform, Dominant Cycle | Identifying cyclical market behavior. Markets exhibit cycles; detecting them reliably remains hard. |
| [**Reversals**](../lib/reversals/_index.md) | Turning points and stop levels | Pivot Points, PSAR, Chande Kroll Stop | Identifying potential trend reversals, computing adaptive stops, and defining support/resistance. |
## Selection by Experience Level
@@ -137,6 +138,7 @@ Indicators measuring trend strength, regime, and directional movement quality.
| [**AROON**](../lib/dynamics/aroon/Aroon.md) | Aroon | High/low recency |
| [**AROONOSC**](../lib/dynamics/aroonosc/AroonOsc.md) | Aroon Oscillator | Aroon Up minus Down |
| [**DMX**](../lib/dynamics/dmx/Dmx.md) | Jurik DMX | Enhanced directional movement |
| [**IMPULSE**](../lib/dynamics/impulse/Impulse.md) | Elder Impulse System | EMA + MACD-H trend/momentum fusion |
| [**SUPER**](../lib/dynamics/super/Super.md) | SuperTrend | ATR-based trend bands |
### Momentum
@@ -210,6 +212,9 @@ Mathematical and statistical computations on price series.
| [**CORRELATION**](../lib/statistics/correlation/Correlation.md) | Pearson Correlation | Linear relationship between two series [-1, +1] |
| [**CMA**](../lib/statistics/cma/Cma.md) | Cumulative Moving Average | Expanding window average |
| [**COVARIANCE**](../lib/statistics/covariance/Covariance.md) | Covariance | Joint variability |
| [**ENTROPY**](../lib/statistics/entropy/Entropy.md) | Shannon Entropy | Normalized information entropy via histogram binning |
| [**GEOMEAN**](../lib/statistics/geomean/Geomean.md) | Geometric Mean | Rolling geometric mean via log-sum approach |
| [**GRANGER**](../lib/statistics/granger/Granger.md) | Granger Causality | F-statistic testing if X helps predict Y |
| [**LINREG**](../lib/statistics/linreg/LinReg.md) | Linear Regression | Best-fit line |
| [**MEDIAN**](../lib/statistics/median/Median.md) | Rolling Median | 50th percentile |
| [**SKEW**](../lib/statistics/skew/Skew.md) | Skewness | Distribution asymmetry |
@@ -262,3 +267,12 @@ Error metrics and loss functions for model evaluation, forecast assessment, and
| Indicator | Full Name | Notes |
| :-------- | :-------- | :---- |
| [**WRMSE**](../lib/errors/wrmse/Wrmse.md) | Weighted Root Mean Squared Error | Custom observation weighting for error emphasis |
### Reversals
Reversal indicators identify potential turning points, compute adaptive stop levels, and define support/resistance zones. Where trend indicators tell you what is happening, reversal indicators warn you when it might stop.
| Indicator | Full Name | Notes |
| :-------- | :-------- | :---- |
| [**CHANDELIER**](../lib/reversals/chandelier/Chandelier.md) | Chandelier Exit | ATR-based trailing stops from HH/LL; dual ExitLong/ExitShort |
| [**CKSTOP**](../lib/reversals/ckstop/Ckstop.md) | Chande Kroll Stop | ATR-based adaptive trailing stops; dual StopLong/StopShort levels |
+6
View File
@@ -70,6 +70,8 @@ No external reference exists. Implementation verified through unit tests, edge c
| **Bollinger Bands** | Bbands | ✔️ | ✔️ | ✔️ | ❔ |
| **Butterworth Filter** | [Butter](../lib/trends/butter/Butter.md) | - | - | - | ✔️ |
| **Camarilla Pivot Points** | Pivotcam | - | - | - | ❔ |
| **Chandelier Exit** | [Chandelier](../lib/reversals/chandelier/Chandelier.md) | - | ✔️ | - | - |
| **Chande Kroll Stop** | [Ckstop](../lib/reversals/ckstop/Ckstop.md) | - | - | - | - |
| **Chaikin Money Flow** | Cmf | - | - | ✔️ | ❔ |
| **Chaikin Volatility** | [Cvi](../lib/volatility/cvi/Cvi.md) | - | ✔️ | - | ❔ |
| **Chande Forecast Oscillator** | [Cfo](../lib/oscillators/cfo/Cfo.md) | - | ✔️ | - | ❔ |
@@ -143,6 +145,7 @@ No external reference exists. Implementation verified through unit tests, edge c
| **Hull Moving Average** | [Hma](../lib/trends/hma/hma.md) | - | ✔️ | ✔️ | [⚠️](../lib/trends/hma/hma.md#external-library-discrepancies) |
| **Hurst Exponent** | Hurst | - | - | ✔️ | ❔ |
| **Ichimoku Cloud** | Ichimoku | - | - | ✔️ | ❔ |
| **Impulse (Elder)** | [Impulse](../lib/dynamics/impulse/Impulse.md) | - | - | - | - |
| **Inertia** | [Inertia](../lib/oscillators/inertia/Inertia.md) | - | - | - | ❔ |
| **Interquartile Range** | Iqr | - | - | - | - |
| **Intraday Intensity Index** | [Iii](../lib/volume/iii/Iii.md) | - | - | - | - |
@@ -310,6 +313,9 @@ No external reference exists. Implementation verified through unit tests, edge c
| :-------- | :-------- | :-----: | :----: | :---: | :-----: |
| **Autocorrelation Function** | [Acf](../lib/statistics/acf/Acf.md) | - | - | - | - |
| **Covariance** | [Covariance](../lib/statistics/covariance/Covariance.md) | - | - | - | - |
| **Entropy (Shannon)** | [Entropy](../lib/statistics/entropy/Entropy.md) | - | - | - | - |
| **Geometric Mean** | [Geomean](../lib/statistics/geomean/Geomean.md) | ✔️ | - | - | - |
| **Granger Causality** | [Granger](../lib/statistics/granger/Granger.md) | - | - | - | - |
| **Median (Statistical)** | [Median](../lib/statistics/median/Median.md) | ✔️ | - | - | - |
| **Skewness** | [Skew](../lib/statistics/skew/Skew.md) | ✔️ | - | - | - |
| **Standard Deviation** | [StdDev](../lib/statistics/stddev/StdDev.md) | ✔️ | ✔️ | ✔️ | ✔️ |