Commit Graph

121 Commits

Author SHA1 Message Date
Miha Kralj 6f0a339c9b fix: resolve build and test errors
- Sar.Quantower.Tests.cs: add missing opening quote on string literal (line 48)
- Exports.cs: rename Correlation.Batch → Correl.Batch (CS0103)
- Ad.Validation.Tests.cs: fix Ooples OutputValues key "Ad" → "Adl"
2026-03-16 12:45:13 -07:00
Miha Kralj 3b0cdca567 fix: add mermaid rendering support to Docsify site
- Add mermaid@11 library with dark theme configuration
- Add custom markdown renderer to convert ```mermaid blocks to <div>
- Add doneEach plugin hook to run mermaid after page navigation
- Fix code fence syntax in architecture.md (remove space before 'mermaid')
2026-03-15 21:10:07 -07:00
Miha Kralj e3bd07aa87 feat: add ADF (Augmented Dickey-Fuller) indicator
- Core implementation with Cholesky OLS, MacKinnon p-value, AIC lag selection
- Three regression models: NoConstant, Constant, ConstantAndTrend
- NormCdf via Abramowitz & Stegun 7.1.26 erf approximation
- Quantower adapter, Python bridge (NativeAOT export + ctypes + wrapper)
- 69 tests (41 unit + 12 validation + 14 Quantower + 2 consistency)
- Documentation with Schwert table, MacKinnon coefficients, PineScript ref
- All 19,095 tests pass, zero warnings
2026-03-15 17:56:54 -07:00
Miha Kralj 0468283d45 Add Python benchmark: quantalib NativeAOT vs pandas-ta comparison
- New python/tests/benchmark.py mirrors C# perf/Benchmark.cs indicators
  (SMA, EMA, WMA, HMA, ADOSC, CORRELATION, SKEW) at 500K bars
- quantalib NativeAOT via ctypes FFI: 2-68x faster than pandas-ta
- Updated docs/benchmarks.md with Python benchmark results section
2026-03-13 22:40:59 -07:00
Miha Kralj 107f64c7c6 docs: rewrite pinescript.md with all 396 .pine indicators
Complete rewrite of docs/pinescript.md to include every .pine file
organized by category (core, FIR trends, IIR trends, filters,
oscillators, dynamics, momentum, volatility, volume, channels,
cycles, reversals, forecasts, statistics, numerics, errors).
Previously listed ~120 indicators with many missing categories.
2026-03-12 14:20:41 -07:00
Miha Kralj 8f387e72b8 docs: rewrite README, add docsify search, reorder sidebar, fix license refs 2026-03-12 14:07:03 -07:00
Miha Kralj b9783f7c03 docs: sweep all indicator references — fix paths, add missing entries, sort alphabetically
_sidebar.md:
- Fix 4 wrong DI/DM paths (minus_di→minusdi, minus_dm→minusdm, plus_di→plusdi, plus_dm→plusdm)
- Sort Dynamics section alphabetically
- Add DECAY and EDECAY to Numerics section

lib/dynamics/_index.md:
- Fix HT_TRENDMODE link (Httrendmode.md→HtTrendmode.md)
- Sort all 25 indicators alphabetically

lib/core/_index.md:
- Sort all 8 indicators alphabetically (HA was out of order)

docs/indicators.md:
- FIR: Replace with all 33 entries sorted
- IIR: Replace with all 36 entries sorted
- Filters: Add SAK (now 37 entries)
- Oscillators: Add 17 missing (BBI, BRAR, COPPOCK, CRSI, CTI, DOSC, ER, ERI, FI, KRI, KST, MSTOCH, PSL, QQE, RVGI, SQUEEZE, TD_SEQ) — now 48 entries
- Dynamics: Sort all 25 entries alphabetically
- Statistics: Add POLYFIT, TRIM, WAVG, WINS — now 35 entries sorted
- Numerics: Add FFT, IFFT — now 31 entries sorted
- Core: Add HA — now 8 entries sorted

Total: 402 indicators across 16 categories, all cross-referenced.
2026-03-11 20:36:36 -07:00
Miha Kralj 7ec79538aa refactor: move Decay/Edecay from trends_IIR to numerics; update filter signatures
- Move lib/trends_IIR/decay/ → lib/numerics/decay/
- Move lib/trends_IIR/edecay/ → lib/numerics/edecay/
- Update Category in Decay.md/Edecay.md from Trends (IIR) to Numerics
- Add DECAY/EDECAY entries to lib/numerics/_index.md and docs/indicators.md
- Update filter signature .md files and .svg assets
- Update trends_IIR signature docs (htit, mama, holt, etc.)
- All 163 tests passing, 0 warnings, 0 errors
2026-03-10 20:33:55 -07:00
Miha Kralj 031f1b5fe6 feat: add new indicators (Decay, Edecay, MinusDi, MinusDm, PlusDi, PlusDm, Maxindex, Minindex, Sarext) and update pine scripts, core libs, validation tests, and python bindings 2026-03-09 13:45:46 -07:00
Miha Kralj f10baa6dfb docs: add license rationale, Python/PineScript guides, API updates
- Add docs/license.md with Apache 2.0 rationale and patent protection analysis
- Add docs/python.md and docs/pinescript.md platform guides
- Expand README license section with disclosure and link to rationale
- Update docs/api.md and docs/architecture.md
- Update Python bindings: helpers, all indicator modules, pyproject.toml
- Add Python tests for Arrow and Polars integration
- Update TValue core type and documentation
- Add fix_length_to_period tooling script
2026-03-03 22:11:35 -08:00
Miha Kralj 1910fdca93 chore: repo cleanup and code quality improvements
- Remove global.json (SDK pinning unnecessary)

- Remove nuget.config, move MyGet source to .csproj RestoreAdditionalProjectSources

- Gitignore ndepend/ entirely, move badges to docs/img/

- Update README.md and docs/ndepend.md badge paths

- Add NDepend project property to QuanTAlib.slnx

- Expand .editorconfig ReSharper/diagnostic suppressions

- Use ArgumentOutOfRangeException instead of ArgumentException

- Use discard _ for unused event sender parameters

- Remove quantalib.code-workspace and sonar-suppressions.json

- Add filter signature SVGs
2026-03-03 09:22:55 -08:00
Miha Kralj 768123d056 minor 2026-02-28 16:05:11 -08:00
Miha Kralj 83e9511261 python wrapper 2026-02-28 14:14:35 -08:00
Miha Kralj 8a1ba95173 validation and profiles 2026-02-26 22:02:52 -08:00
Miha Kralj 9ab37c1200 adding missing validations 2026-02-26 09:59:44 -08:00
Miha Kralj 467a8c1cef filters update 2026-02-23 17:27:35 -08:00
Miha Kralj 7253f61299 Add TRAMA implementation and comprehensive tests
- Implemented the TRAMA (Trend Regularity Adaptive Moving Average) class with adaptive EMA logic.
- Added unit tests for TRAMA functionality, including constructor validation, basic calculations, state management, and robustness checks.
- Created validation tests to ensure consistency across different modes of operation (streaming, batch, and static calculations).
- Enhanced documentation for TRAMA, including performance profiles and quality metrics.
- Updated workspace configuration by removing unnecessary folder references.
2026-02-21 20:45:38 -08:00
Miha Kralj cbeefc9d64 Remove multiple Pine Script indicators: SSFDSP, STARCHANNEL, STBANDS, STC, UBANDS, UCHANNEL, VWAPBANDS, and VWAPSD. These indicators were deleted to streamline the library and remove unused or redundant code. 2026-02-20 18:44:56 -08:00
Miha Kralj 3dd05f23e4 Refactor indicators to include "Ehlers" in names and descriptions for clarity
- Updated the name and description of the Hilbert Trendline (HTIT) to "Ehlers Hilbert Transform Instantaneous Trend (HTIT)".
- Changed the name and description of the MESA Adaptive Moving Average (MAMA) to "Ehlers MESA Adaptive Moving Average".
- Modified the Center of Gravity (CG) indicator to "Ehlers Center of Gravity (CG)".
- Renamed the Detrended Synthetic Price (DSP) to "Ehlers Detrended Synthetic Price (DSP)".
- Updated the Autocorrelation Periodogram (EACP) to "Ehlers Autocorrelation Periodogram (EACP)".
- Changed the Homodyne Discriminator (HOMOD) to "Ehlers Homodyne Discriminator (HOMOD)".
- Updated the Hilbert Transform Dominant Cycle Period and Phase indicators to include "Ehlers" in their names.
- Renamed the Hilbert Transform Phasor Components to "Ehlers Hilbert Transform Phasor Components (HT_PHASOR)".
- Updated the SineWave indicator to "Ehlers Hilbert Transform SineWave (HT_SINE)".
- Changed the Phasor Analysis indicator to "Ehlers Hilbert Transform Phasor Components (HT_PHASOR)".
- Updated the SSF-Based Detrended Synthetic Price to "Ehlers SSF Detrended Synthetic Price (SSFDSP)".
- Renamed the Ultimate Channel to "Ehlers Ultimate Channel (UCHANNEL)".
- Added new indicators: Moving Average Variable Period (MAVP), Ehlers Predictive Moving Average (PMA), Ehlers Reverse EMA (REVERSEEMA), and Ehlers Trendflex Indicator (TRENDFLEX).
- Updated various SVG badges to reflect changes in classes, comments, source files, lines of code, methods, and public types.
2026-02-18 19:08:15 -08:00
Miha Kralj 24e86d762a Add documentation links for various volatility indicators and channels
- Updated BBWN, BBWP, CCV, CV, CVI, EWMA, GKV, HLV, HV, Jvolty, JVOLTYN, MASSI, NATR, RSV, RV, RVI, TR, UI, VOV, VR, YZV indicators with documentation links.
- Added documentation links for Aberration, Acceleration Bands, Andrews' Pitchfork, Adaptive Price Zone, ATR Bands, Bollinger Bands, Center of Gravity, Donchian Channels, Decay Min-Max Channel, Detrended Synthetic Price, EACP, EBSW, HOMOD, Jurik Volatility Bands, Keltner Channel, MA Envelope, Min-Max Channel, Price Channel, Regression Channels, Standard Deviation Channel, Stoller Average Range Channel, Super Trend Bands, Ultimate Bands, Ultimate Channel, VWAP Bands, and VWAP with Standard Deviation Bands.
2026-02-18 11:55:48 -08:00
Miha Kralj 63ae2c9ab2 Add TTM Scalper indicator implementation in C# and Pine Script; update Blma class for average calculation; remove missing indicators report and oscillator docs rewrite plans. 2026-02-16 21:26:44 -08:00
Miha Kralj b3a64f18fa Implement ZTEST: One-Sample t-Test Statistic with validation tests
- Added Ztest class to compute the one-sample t-statistic using sample standard deviation with Bessel correction.
- Implemented validation tests for Ztest to ensure accuracy against manual calculations and PineScript.
- Updated documentation for Ztest, detailing its mathematical foundation, performance profile, and common pitfalls.
- Adjusted NDepend badges to reflect changes in code metrics after implementation.
- Updated missing indicators report to reflect the completion of statistical indicators, including ZTEST.
2026-02-16 16:54:36 -08:00
Miha Kralj 09ffd31a40 Update SVG badges and missing indicators report
- Updated class count in classes.svg from 938 to 1078.
- Adjusted comments percentage in comments.svg from 33.06 to 33.02.
- Revised average cyclomatic complexity in complexity.svg from 2.19 to 2.12.
- Increased source files count in files.svg from 1099 to 1275.
- Updated lines of code in loc.svg from 114549 to 129859.
- Increased methods count in methods.svg from 12035 to 14066.
- Updated public types count in public-api.svg from 1086 to 1225.
- Revised missing indicators report with updated counts and categories, reflecting recent implementations and planned additions.
2026-02-15 21:59:03 -08:00
Miha Kralj dfeb23bf3d 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.
2026-02-13 21:44:45 -08:00
Miha Kralj 951842acca Add validation tests for various volume and momentum indicators
- Introduced Massi validation tests to ensure mathematical properties hold for the Mass Index indicator.
- Added Va validation tests for Volume Accumulation, checking for finite outputs and correct accumulation behavior.
- Implemented Vf validation tests for Volume Force, verifying outputs for rising and falling prices, and ensuring batch and streaming results match.
- Created Vo validation tests for Volume Oscillator, confirming behavior with constant, increasing, and decreasing volumes.
- Developed Vroc validation tests for Volume Rate of Change, validating outputs for constant volume and changes in volume.
- Updated project file to include new momentum indicators (MACD and RSI) in the compilation.
2026-02-12 19:43:09 -08:00
Miha Kralj 92709ef2ed 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.
2026-02-12 14:29:54 -08:00
Miha Kralj 75c6a9f135 Enhance validation tests for various indicators with external library comparisons
- Added detailed comments explaining the validation limitations for MMA and ZLEMA due to differences in algorithm implementations.
- Implemented validation tests for True Range against TALib and Tulip, ensuring directional agreement.
- Updated Ulcer Index validation to clarify differences in algorithmic approaches between QuanTAlib and Skender.
- Enhanced Ease of Movement tests to verify directional agreement with Tulip's EMV, noting differences in volume scaling.
- Expanded Klinger Volume Oscillator tests to validate against Skender and Tulip, focusing on directional agreement across multiple period configurations.
- Improved Negative Volume Index tests to compare percentage changes with Tulip, addressing differences in starting values.
- Updated Positive Volume Index tests to validate against Tulip, emphasizing percentage change comparisons.
- Enhanced Williams Accumulation/Distribution tests to verify directional agreement with Tulip, highlighting formula differences.
2026-02-11 14:46:56 -08:00
Miha Kralj 6d6259a47d normalization of methods 2026-02-10 21:33:16 -08:00
Miha Kralj 95838a6435 Add SSF-DSP implementation with validation tests and documentation
- Implemented the SSF-DSP (Super Smooth Filter Detrended Synthetic Price) indicator using dual Super Smooth Filters.
- Added validation tests to ensure correctness against PineScript implementation and mathematical properties.
- Created comprehensive documentation outlining the architecture, mathematical foundation, performance profile, and common pitfalls.
- Included batch processing capabilities for efficient calculations on time series data.
2026-02-04 20:58:05 -08:00
Miha Kralj 3e854eac3f Refactor documentation links in numerics, oscillators, reversals, and statistics modules to use relative paths; update Bias class to handle division by zero more robustly; remove obsolete CUMMEAN Pine script; enhance trend indicators documentation; add Visual Studio Code workspace configuration. 2026-02-04 11:43:59 -08:00
Miha Kralj c034cbd5e5 Add Yang-Zhang Volatility (YZV) Indicator Implementation
- Introduced YZV class for calculating Yang-Zhang Volatility, a comprehensive volatility measure that incorporates overnight, open-to-close, and high-low components.
- Implemented calculation methods, including batch processing for TBarSeries and spans.
- Added documentation for YZV, detailing its mathematical foundation, performance profile, and trading applications.
- Updated volume index documentation to reflect changes in file paths.
- Refactored VWMA calculation method to use a more generic source parameter instead of price.
2026-02-02 19:47:21 -08:00
Miha Kralj a03d7aa0ce more volatilty 2026-02-02 13:42:47 -08:00
Miha Kralj dde19f2226 volatility indicators 2026-02-01 17:48:16 -08:00
Miha Kralj 51e885a4a6 volume category touchup 2026-01-31 11:21:09 -08:00
Miha Kralj 7b3a6520d2 volume indicators 2026-01-30 12:47:25 -08:00
Miha Kralj 76d2b50cbb Add Price Volume Trend (PVT) Indicator and Tests
- Implemented the PvtIndicator class for calculating Price Volume Trend in Quantower.
- Created unit tests for the Pvt class to validate calculations and state management.
- Added validation tests to ensure consistency with OoplesFinance's implementation.
- Developed a comprehensive documentation (Pvt.md) explaining the PVT concept, calculations, and usage.
- Included methods for batch calculations and streaming updates for PVT.
2026-01-28 17:54:43 -08:00
Miha Kralj dc1902f4d5 Add Negative Volume Index (NVI) implementation and tests
- Implemented NVI indicator in Nvi.Quantower.cs with configurable start value and cold value display option.
- Created unit tests for NVI functionality in Nvi.Tests.cs, covering various scenarios including initialization, updates, and edge cases.
- Added validation tests in Nvi.Validation.Tests.cs to ensure NVI matches expected behavior against known implementations.
- Developed comprehensive documentation for NVI in Nvi.md, detailing its historical context, mathematical foundation, and interpretation guide.
- Included error handling for invalid input values and ensured compatibility with volume data.
2026-01-28 15:33:47 -08:00
Miha Kralj c7e55c2f1e Add Intraday Intensity Index (III) implementation and tests
- Implemented the III indicator in Iii.Quantower.cs, measuring buying/selling pressure based on close price within the day's range, weighted by volume.
- Added unit tests for III functionality in Iii.Tests.cs, covering various scenarios including default parameters, updates, and cumulative mode.
- Created validation tests in Iii.Validation.Tests.cs to ensure consistency between streaming, batch, and span calculations.
- Developed comprehensive documentation for III in Iii.md, detailing its historical context, mathematical foundation, and common pitfalls.
2026-01-28 08:56:41 -08:00
Miha Kralj 744d680435 Add VWAPSD (Volume Weighted Average Price with Standard Deviation Bands) implementation and validation tests
- Implemented Vwapsd class for calculating VWAP with configurable standard deviation bands.
- Added methods for updating the indicator with new bars and calculating VWAPSD using both bar series and span arrays.
- Created comprehensive validation tests for VWAPSD, including checks for consistency between streaming and batch modes, mathematical correctness, and handling of edge cases such as NaN values and zero volume bars.
- Ensured that the implementation adheres to performance standards with tests for large datasets and fractional numDevs values.
2026-01-24 19:07:52 -08:00
Miha Kralj fd6c80e8db Add Chaikin Money Flow (CMF) Indicator Implementation and Tests
- Implemented CMF indicator in Cmf.cs with detailed calculations and methods.
- Created unit tests for CMF validation against Skender, Ooples, and batch processing.
- Added documentation for CMF in Cmf.md, explaining its purpose, calculations, and usage.
- Updated project files to include new statistics library.
- Updated NDepend badges to reflect changes in classes, methods, and lines of code.
2026-01-23 18:40:20 -08:00
Miha Kralj fdfbfd98f0 Add Starchannel indicator implementation and validation tests
- Implemented the Starchannel class, which calculates a volatility-based envelope using SMA as the middle line and ATR for band width.
- Added methods for updating the indicator with new data, batch calculations, and state management.
- Created comprehensive unit tests for the Starchannel indicator, validating various scenarios including manual calculations, consistency across modes, eventing, and handling of large datasets.
- Ensured that the indicator's outputs are finite and that band widths are consistent across different calculation modes.
2026-01-21 17:21:29 -05:00
Miha Kralj 3eae9a76fe Add Standard Deviation Channel (SDCHANNEL) implementation and documentation
- Implemented Sdchannel class for calculating standard deviation channels based on linear regression.
- Added detailed documentation for SDCHANNEL, including overview, calculation methods, and interpretation.
- Updated project files to include new numerics library components in Channels and Volatility projects.
2026-01-21 14:41:31 -05:00
Miha Kralj 86fe32a682 SIMD Refactor: Merge simd-dev into dev (#55)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
Co-authored-by: Warp <agent@warp.dev>
2026-01-18 19:02:03 -08:00
Miha Kralj 11fc798517 CTI - Ehler's Correlation Trend - calc and chart 2024-11-08 08:24:51 -08:00
Miha Kralj 0bae9ce15b sonar fixes 2024-11-05 15:51:29 -08:00
Miha Kralj c5b583cd0d Create EFI - Elder Ray's Force Index - add tests and xml comments
---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mihakralj/QuanTAlib?shareId=XXXX-XXXX-XXXX-XXXX).
2024-11-05 06:42:31 -08:00
Miha Kralj c58a054a28 Add DOSC - Derivative Oscillator
---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mihakralj/QuanTAlib?shareId=XXXX-XXXX-XXXX-XXXX).
2024-11-04 14:28:47 -08:00
Miha Kralj 5d086a1473 new indicators 2024-11-03 18:16:42 -08:00
Miha Kralj 7b41d84c66 Bband, Ccv, Ce, Cv, Cvi, Ewma, Fcb, Gkv, Hlv 2024-11-03 15:52:25 -08:00
Miha Kralj f519594371 Adr, Ap, Atrp, Atrs, Vp, Vwap, Vwma 2024-11-01 18:36:01 -07:00