Dtw algo (#9)

* feat: implement Dynamic Time Warping (DTW) functionality

- Added DTW distance computation and optimal warping path functions in Rust.
- Introduced corresponding Python bindings for DTW, DTW_DISTANCE, and BATCH_DTW.
- Enhanced WASM support with a new dtw_distance function.
- Included comprehensive unit tests for DTW functionality, validating against the dtaidistance library and ensuring mathematical properties.

* chore: update ferro-ta version to 1.1.4

- Bumped version number of ferro-ta to 1.1.4 in uv.lock and Cargo.lock files.
- Ensured consistency across package dependencies for the updated version.
This commit is contained in:
Pratik Bhadane
2026-04-07 23:38:36 +05:30
committed by GitHub
parent 388dc05c89
commit fd1bb137d6
19 changed files with 703 additions and 46 deletions
+63 -7
View File
@@ -1,8 +1,8 @@
{
"surfaces": {
"python": {
"indicator_count": 208,
"method_count": 464,
"indicator_count": 211,
"method_count": 467,
"categories": [
"aggregation",
"alerts",
@@ -131,6 +131,13 @@
"doc": "",
"params": []
},
{
"name": "BATCH_DTW",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "BBANDS",
"category": "overlap",
@@ -656,6 +663,20 @@
"doc": "",
"params": []
},
{
"name": "DTW",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "DTW_DISTANCE",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "DX",
"category": "momentum",
@@ -3283,6 +3304,13 @@
"doc": "",
"params": []
},
{
"name": "BATCH_DTW",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "BETA",
"category": "statistic",
@@ -3297,6 +3325,20 @@
"doc": "",
"params": []
},
{
"name": "DTW",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "DTW_DISTANCE",
"category": "statistic",
"module": "ferro_ta.indicators.statistic",
"doc": "",
"params": []
},
{
"name": "LINEARREG",
"category": "statistic",
@@ -4735,7 +4777,7 @@
]
},
"rust_core": {
"public_function_count": 349,
"public_function_count": 351,
"functions": [
{
"module": "aggregation",
@@ -6187,6 +6229,16 @@
"function": "correl",
"file": "statistic.rs"
},
{
"module": "statistic",
"function": "dtw_distance",
"file": "statistic.rs"
},
{
"module": "statistic",
"function": "dtw_path",
"file": "statistic.rs"
},
{
"module": "statistic",
"function": "linearreg",
@@ -6485,7 +6537,7 @@
]
},
"wasm_node": {
"export_count": 221,
"export_count": 222,
"exports": [
"ad",
"adosc",
@@ -6546,6 +6598,7 @@
"digital_price",
"donchian",
"drawdown_series",
"dtw_distance",
"dx",
"early_exercise_premium",
"ema",
@@ -6712,9 +6765,9 @@
}
},
"parity_summary": {
"python_indicator_count": 207,
"wasm_export_count": 221,
"common_python_wasm_count": 91,
"python_indicator_count": 210,
"wasm_export_count": 222,
"common_python_wasm_count": 92,
"common_python_wasm": [
"ad",
"adosc",
@@ -6743,6 +6796,7 @@
"dema",
"detect_breaks_cusum",
"donchian",
"dtw_distance",
"dx",
"ema",
"ht_dcperiod",
@@ -6817,6 +6871,7 @@
"asin",
"atan",
"batch_apply",
"batch_dtw",
"beta",
"cdl2crows",
"cdl3blackcrows",
@@ -6886,6 +6941,7 @@
"cosh",
"div",
"drawdown",
"dtw",
"exp",
"feature_matrix",
"floor",
+1 -1
View File
@@ -1,7 +1,7 @@
Release Notes
=============
These docs track package version ``1.1.3``.
These docs track package version ``1.1.4``.
1.1.0-audit (2026-03-28)
------------------------
+1 -1
View File
@@ -180,7 +180,7 @@ For source builds, packaging details, and platform notes, see
Release status
--------------
These docs track package version ``1.1.3``.
These docs track package version ``1.1.4``.
- Release notes by version: :doc:`changelog`
- Canonical project changelog: `CHANGELOG.md <https://github.com/pratikbhadane24/ferro-ta/blob/main/CHANGELOG.md>`_