Add Stochastic Oscillator implementation and validation tests

- Implemented Stochastic Oscillator (%K and %D) in Stoch.cs with streaming and batch processing capabilities.
- Added validation tests for the Stochastic Oscillator in Stoch.Validation.Tests.cs, ensuring consistency with Skender.Stock.Indicators.
- Created documentation for the Stochastic Oscillator in Stoch.md, detailing its mathematical formula, architecture, parameters, and common pitfalls.
- Updated project file to include necessary numeric libraries for highest and lowest calculations.
This commit is contained in:
Miha Kralj
2026-02-12 14:29:54 -08:00
parent 653aafacd8
commit 92709ef2ed
73 changed files with 14721 additions and 35 deletions
+11 -11
View File
@@ -6,19 +6,19 @@ Oscillators fluctuate above and below a centerline or within bounded ranges. Use
| Indicator | Full Name | Description |
| :--- | :--- | :--- |
| AC | Acceleration Oscillator | Second derivative of AO. Measures acceleration of market driving force. |
| [AC](ac/Ac.md) | Acceleration Oscillator | Second derivative of AO. Measures acceleration of market driving force. |
| [AO](ao/Ao.md) | Awesome Oscillator | 5-period SMA minus 34-period SMA of bar midpoint. Bill Williams creation. |
| [APO](apo/Apo.md) | Absolute Price Oscillator | Raw currency difference between fast and slow EMAs. Unbounded. |
| BBB | Bollinger %B | Position within Bollinger Bands. 0=lower band, 1=upper band. |
| BBS | Bollinger Band Squeeze | BB width < KC width indicates consolidation. Breakout imminent. |
| CFO | Chande Forecast Oscillator | Percentage difference between price and linear regression forecast. |
| DPO | Detrended Price Oscillator | Removes trend via displaced SMA. Reveals cycles. |
| FISHER | Fisher Transform | Converts prices to Gaussian distribution. Sharp reversals. |
| INERTIA | Inertia | Trend strength from distance to linear regression line. |
| KDJ | KDJ Indicator | Enhanced Stochastic. J = 3K - 2D provides leading signal. |
| PGO | Pretty Good Oscillator | Distance from SMA normalized by ATR. Units: ATR multiples. |
| SMI | Stochastic Momentum Index | Distance from range midpoint. More sensitive than classic Stochastic. |
| STOCH | Stochastic Oscillator | Close position within N-period high-low range. Classic overbought/oversold. |
| [BBB](bbb/Bbb.md) | Bollinger %B | Position within Bollinger Bands. 0=lower band, 1=upper band. |
| [BBS](bbs/Bbs.md) | Bollinger Band Squeeze | BB width < KC width indicates consolidation. Breakout imminent. |
| [CFO](cfo/Cfo.md) | Chande Forecast Oscillator | Percentage difference between price and linear regression forecast. |
| [DPO](dpo/Dpo.md) | Detrended Price Oscillator | Removes trend via displaced SMA. Reveals cycles. |
| [FISHER](fisher/Fisher.md) | Fisher Transform | Converts prices to Gaussian distribution. Sharp reversals. |
| [INERTIA](inertia/Inertia.md) | Inertia | Linear regression residual. Raw deviation from trend forecast. |
| [KDJ](kdj/Kdj.md) | KDJ Indicator | Enhanced Stochastic. J = 3K - 2D provides leading signal. |
| [PGO](pgo/Pgo.md) | Pretty Good Oscillator | Distance from SMA normalized by ATR. Units: ATR multiples. |
| [SMI](smi/Smi.md) | Stochastic Momentum Index | Distance from range midpoint. More sensitive than classic Stochastic. |
| [STOCH](stoch/Stoch.md) | Stochastic Oscillator | Close position within N-period high-low range. Classic overbought/oversold. |
| STOCHF | Stochastic Fast | Unsmoothed Stochastic. Faster but noisier. |
| STOCHRSI | Stochastic RSI | Stochastic applied to RSI. More sensitive than either alone. |
| TRIX | Triple Exponential Average | ROC of triple EMA. Filters noise through three smoothings. |