207 Commits

Author SHA1 Message Date
Miha Kralj 37854fc7fa Merge dev: RRSI docs rewrite + PineScript 2026-03-17 09:48:54 -07:00
Miha Kralj 75bcc12529 docs(rrsi): rewrite Rrsi.md to match template, rename to Ehlers Rocket RSI
- Full template: property table, tagline, key takeaways, historical context,
  architecture & physics with code references, mathematical foundation,
  interpretation & signal zones, related indicators, validation table,
  performance profile, common pitfalls, FAQ, references
- Title changed from "Rocket RSI" to "Ehlers Rocket RSI" across all indexes
- Updated _sidebar.md, lib/_index.md, lib/oscillators/_index.md
2026-03-17 09:48:32 -07:00
Miha Kralj 1780a90de6 Merge dev: RRSI PineScript reference 2026-03-17 09:44:41 -07:00
Miha Kralj db6bb86fe6 feat(rrsi): add PineScript reference implementation
Ehlers TASC May 2018 algorithm: Momentum → Super Smoother (2-pole
Butterworth IIR) → Ehlers RSI (summation CU/CD) → Fisher Transform.
Inputs: smoothLength=10, rsiLength=10, source=close.
2026-03-17 09:44:16 -07:00
Miha Kralj 3eb861307e Merge branch 'main' of https://github.com/mihakralj/QuanTAlib 2026-03-17 09:39:10 -07:00
Miha Kralj 346d4434e2 Merge dev: RRSI validation tests 2026-03-17 09:38:48 -07:00
Miha Kralj 4cc4c1a0c4 feat(rrsi): add validation tests — manual Ehlers algorithm cross-check
- Manual step-by-step reference implementation of Ehlers TASC May 2018
- Theory tests across 5 parameter combinations (5/5, 8/10, 10/10, 10/20, 20/10)
- arctanh mathematical identity verification
- Streaming/batch/span consistency validation
- Event-based vs streaming agreement check
- All-outputs-finite verification across 4 parameter sets
- Super Smoother coefficient unity DC gain validation
- 18 new tests, 15981 total passing, 0 warnings
2026-03-17 09:38:18 -07:00
codefactor-io 314201ee5c [CodeFactor] Apply fixes to commit c661fee 2026-03-17 16:26:54 +00:00
Miha Kralj 3901bfdaf1 Merge branch 'main' of https://github.com/mihakralj/QuanTAlib 2026-03-17 09:26:27 -07:00
Miha Kralj c661fee606 Merge branch 'dev' 2026-03-17 09:25:55 -07:00
Miha Kralj eb9e41fc2e feat: add RRSI (Rocket RSI) — Ehlers TASC May 2018
Algorithm: SuperSmoother-filtered momentum → Ehlers RSI → Fisher Transform
- 2-pole Butterworth IIR pre-filter removes noise
- Ehlers RSI (raw summation, not Wilder) outputs [-1,1]
- arctanh produces Gaussian-distributed zero-mean oscillator

Files: Rrsi.cs, Rrsi.Quantower.cs, Rrsi.md, 31+7 tests
Integration: sidebar, indices, Python bridge (Exports, _bridge, oscillators, SPEC)
Build: 0 warnings, 0 errors | Tests: 15,963 passed, 0 failed
2026-03-17 09:25:32 -07:00
codefactor-io 75ad4a936f [CodeFactor] Apply fixes to commit ce654ca 2026-03-17 15:36:50 +00:00
Miha Kralj ce654ca670 feat: add 8 new indicators with full integration
New indicators:
- HWC (Holt-Winters Channel) — channels, 27 tests
- VWMACD (Volume-Weighted MACD) — momentum, 38 tests
- Squeeze Pro — oscillators, 69 tests
- BW_MFI (Bill Williams MFI) — oscillators
- DSTOCH (Double Stochastic) — oscillators
- ATRSTOP (ATR Trailing Stop) — reversals
- VSTOP (Volatility Stop) — reversals
- Convexity (Beta Convexity) — statistics, 23 tests

Integration:
- Python bridge: Exports.cs, _bridge.py, wrapper modules
- Documentation: _sidebar.md, _index.md pages, SPEC.md
- All analyzer warnings fixed (MA0074, xUnit2013, S2699)

Build: 0 warnings, 0 errors | Tests: 15,933 passed, 0 failed
2026-03-17 08:36:23 -07:00
Miha Kralj 15f4bb90f3 feat: add 8 new indicators with full integration
New indicators:
- HWC (Holt-Winters Channel) — channels, 27 tests
- VWMACD (Volume-Weighted MACD) — momentum, 38 tests
- Squeeze Pro — oscillators, 69 tests
- BW_MFI (Bill Williams MFI) — oscillators
- DSTOCH (Double Stochastic) — oscillators
- ATRSTOP (ATR Trailing Stop) — reversals
- VSTOP (Volatility Stop) — reversals
- Convexity (Beta Convexity) — statistics, 23 tests

Integration:
- Python bridge: Exports.cs, _bridge.py, wrapper modules
- Documentation: _sidebar.md, _index.md pages, SPEC.md
- All analyzer warnings fixed (MA0074, xUnit2013, S2699)

Build: 0 warnings, 0 errors | Tests: 15,933 passed, 0 failed
2026-03-17 08:35:29 -07:00
codefactor-io 49e67dac30 [CodeFactor] Apply fixes to commit 03fb54b 2026-03-16 19:46:41 +00:00
Miha Kralj 03fb54b7c8 Merge branch 'dev' into main 2026-03-16 12:46:19 -07:00
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 af799813aa fix: relax BBB streaming/batch tolerance for cross-platform FP precision 2026-03-15 18:16:37 -07:00
Miha Kralj 57e69721f5 fix: relax BBB streaming/batch tolerance for cross-platform FP precision 2026-03-15 18:15:47 -07:00
codefactor-io c0dad33d95 [CodeFactor] Apply fixes to commit d2fa0fc 2026-03-16 00:57:48 +00:00
Miha Kralj d2fa0fc845 Merge branch 'dev' 2026-03-15 17:57:28 -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
codefactor-io e35ff7fa3f [CodeFactor] Apply fixes to commit 9697fac 2026-03-14 05:03:08 +00:00
Miha Kralj 9697facfb4 Merge dev into main: v0.8.7 Kahan compensated summation 2026-03-13 22:01:52 -07:00
Miha Kralj 67ad6f0cba v0.8.7: Replace periodic ResyncInterval with Kahan compensated summation
Comprehensive refactor across all indicators replacing the periodic
ResyncInterval-based drift correction (every 1000 ticks recalculate
from scratch) with Kahan compensated summation for running sums.

Key changes:
- Remove ResyncInterval constants and TickCount fields from all State records
- Add Kahan compensation fields (SumComp, SumSqComp, etc.) to State records
- Replace naive sum += val - removed with Kahan delta pattern
- Remove Resync()/RecalculateSum() methods that did O(N) recalculation
- Update batch/SIMD paths to use Kahan compensation instead of resync loops
- IIR filters (EMA, REMA, RGMA) simplified: inherently self-correcting
- Version bump to 0.8.7
- Build system: README version stamping via Directory.Build.props
- Minor doc/test tolerance adjustments for new numerical characteristics

Affected modules: channels, core, cycles, dynamics, errors, momentum,
oscillators, statistics, trends_FIR, trends_IIR, volatility, volume
2026-03-13 22:01:31 -07:00
Miha Kralj 86a1db286c Merge branch 'dev' 2026-03-13 13:47:10 -07:00
Miha Kralj c75135ab14 v0.8.6: update indicator docs, ndepend tooling, ALMA refactor, gitignore cleanup 2026-03-13 13:46:52 -07:00
Miha Kralj e3e9555fc1 feat(python): add pure-Python EMA fallback per PYTHON_FALLBACK_SPEC
Single-function API: ema(source, period=10, *, alpha=None)
- Bias-compensated EMA matching C# Ema.Batch exactly
- NaN/Inf safe with last-valid substitution
- 65 lines, pseudocode-readable reference implementation
- Co-located ema_test.py (15 tests) + tests/test_ema.py (37 tests)
- All 50 tests pass, 2 cross-validation skipped (no native lib)
2026-03-12 21:02:52 -07:00
codefactor-io 8f79257155 [CodeFactor] Apply fixes to commit 0606491 2026-03-12 19:37:50 +00:00
Miha Kralj 060649192f docs: remove C# Implementation Considerations sections, clean up temp scripts, reorganize test files
- Remove 'C# Implementation Considerations' sections from 34 indicator .md files
- Delete 29 temp PowerShell scripts (_fix_mojibake.ps1, _hex_scan.ps1, etc.)
- Move test files into tests/ subdirectories for consistent project structure
- Add trader-focused bullet points to indicator documentation
2026-03-12 12:34:16 -07:00
Miha Kralj 8937b0c0fa fix: CI checkout auth + Wrmse test failure
- Publish.yml: Change workflow permissions from {} to contents:read
  to fix GITHUB_TOKEN having no scopes for actions/checkout@v4
- Wrmse.cs: Use DateTime.UtcNow instead of DateTime.MinValue in
  Update(double,double,double) to match Beta/Covariance pattern
- Bump version to 0.8.5
2026-03-11 20:54:16 -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 33d20f2a18 feat(dynamics): add PlusDI, MinusDI, PlusDM, MinusDM indicators
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
2026-03-11 20:21:52 -07:00
Miha Kralj 19f956521d docs: add PineScript links to all indicator .md files, docsify .pine renderer with comprehensive Prism v6 syntax highlighting
- Added PineScript row to property tables in 375 .md files linking to companion .pine files
- Docsify plugin intercepts .pine link clicks, fetches and renders content as syntax-highlighted code blocks
- Comprehensive Prism.languages.pine grammar covering 18 token categories: annotations, types, qualifiers, namespaces, OHLCV builtins, functions, keywords, operators
- Custom CSS tokens using GitHub dark palette for Pine-specific visual differentiation
2026-03-11 15:36:23 -07:00
codefactor-io 567fa89465 [CodeFactor] Apply fixes to commit 4a01f03 2026-03-11 03:35:12 +00:00
Miha Kralj 4a01f03cb4 Merge branch 'dev' 2026-03-10 20:34:18 -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 35a6702b06 fix(docs): correct .md documentation across errors, dynamics, filters, forecasts, momentum, numerics, oscillators, reversals, statistics, trends, volatility, volume
Deep review of all indicator categories verified .md headers against .cs WarmupPeriod, parameters, inputs, and outputs. Fixes include warmup corrections, parameter documentation, output type accuracy, and Pine Script alignment.
2026-03-10 18:38:23 -07:00
Miha Kralj 8906c62dcf fix(docs): correct warmup values in cycles/channels .md files
Cycles:
- ebsw: warmup 1 bar → Math.Max(hpLength, ssfLength) + 3 (default 43)
- homod: warmup 1 bar → maxPeriod * 2 (default 100)

Channels:
- apchannel: warmup 1 bar → ⌈3/alpha⌉ (default 15); params None → alpha; outputs Single → Multiple
- jbands: warmup 1 bar → ⌈20 + 80 × period^0.36⌉
- uchannel: warmup 1 bar → Math.Max(strPeriod, centerPeriod)"
2026-03-10 18:37:19 -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 f192b6d014 merge: bump version to 0.8.4 2026-03-04 08:50:31 -08:00
Miha Kralj 4f22062f78 chore: bump version to 0.8.4 2026-03-04 08:50:29 -08:00
Miha Kralj 6ae79525f6 merge: dev into main - license docs, Python/PineScript guides, API updates 2026-03-03 22:12:25 -08: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
codefactor-io 5957ef065c [CodeFactor] Apply fixes to commit 7737098 2026-03-03 20:43:16 +00:00
Miha Kralj 7737098a54 fix: suppress MA0077 on ref struct types and fix variable shadowing
ref struct types (BatchOutputs, BatchInputs, ScalarState, WorkBuffers)
cannot implement IEquatable<T> — C# prohibits interface implementation
on ref structs. Added #pragma warning disable/restore MA0077 at type
declaration level in AccBands.cs, Aberr.cs, Apz.cs (9 ref structs).

Renamed local 'output' to 'result' in Wma.Coverage.Tests.cs to avoid
shadowing the primary constructor ITestOutputHelper parameter (S1117/MA0084).
2026-03-03 12:42:42 -08:00
Miha Kralj 3e858ca39e chore: bump version to 0.8.2 2026-03-03 10:37:45 -08:00
Miha Kralj 50711933e1 chore: remove gitignored files from tracking, update channels
- Remove .vscode/, __pycache__/, publish binaries, and .dll/.pdb files from git tracking (now covered by .gitignore)
2026-03-03 10:33:23 -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 e1a6743bda fix: add .md extension to signature links in indicator docs 2026-03-03 08:45:25 -08:00