扩展指标

This commit is contained in:
2026-07-09 05:08:16 +08:00
commit 308c46ab9a
537 changed files with 152299 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
{
"metadata": {
"suite": "batch",
"runtime": {
"generated_at_utc": "2026-03-24T09:13:04.010216+00:00",
"python_version": "3.13.5",
"python_implementation": "CPython",
"python_executable": "/Users/pratikbhadane/Work/Projects/ferro-ta/.venv/bin/python3",
"platform": "macOS-26.3.1-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.3.0",
"machine": "arm64",
"processor": "arm",
"cpu_model": "Apple M3 Max",
"cpu_count_logical": 14,
"total_memory_bytes": 38654705664
},
"git": {
"commit": "53566b9d82898fa4f95c5190156c969a0bd8e8e3",
"dirty": true,
"branch": "main"
},
"build": {
"rustc": "rustc 1.93.1 (01f6ddf75 2026-02-11)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8",
"cargo": "cargo 1.93.1 (083ac5135 2025-12-15)",
"cargo_release_profile": {
"lto": true,
"codegen-units": 1
},
"rustflags": null,
"cargo_build_rustflags": null,
"maturin_flags": null
},
"packages": {
"numpy": "2.2.6",
"ferro-ta": "1.0.4"
},
"dataset": {
"n_samples": 20000,
"n_series": 32,
"total_bars": 640000,
"seed": 42
}
},
"results": [
{
"indicator": "SMA",
"parallel_ms": 7.9306,
"sequential_ms": 2.4832,
"loop_ms": 1.0238,
"parallel_speedup_vs_loop": 0.1291,
"sequential_speedup_vs_loop": 0.4123
},
{
"indicator": "RSI",
"parallel_ms": 3.9307,
"sequential_ms": 5.0938,
"loop_ms": 3.6883,
"parallel_speedup_vs_loop": 0.9383,
"sequential_speedup_vs_loop": 0.7241
},
{
"indicator": "ATR",
"parallel_ms": 9.2546,
"sequential_ms": 7.768,
"loop_ms": 5.2669,
"parallel_speedup_vs_loop": 0.5691,
"sequential_speedup_vs_loop": 0.678
},
{
"indicator": "ADX",
"parallel_ms": 9.5489,
"sequential_ms": 9.1403,
"loop_ms": 7.1578,
"parallel_speedup_vs_loop": 0.7496,
"sequential_speedup_vs_loop": 0.7831
}
],
"grouped_results": [
{
"case": "close_bundle_3",
"grouped_ms": 0.466,
"separate_ms": 0.2003,
"speedup_vs_separate": 0.4298
},
{
"case": "hlc_bundle_3",
"grouped_ms": 1.2538,
"separate_ms": 0.6999,
"speedup_vs_separate": 0.5582
}
]
}
@@ -0,0 +1,185 @@
{
"metadata": {
"suite": "indicator_latency",
"runtime": {
"generated_at_utc": "2026-03-24T09:13:02.973728+00:00",
"python_version": "3.13.5",
"python_implementation": "CPython",
"python_executable": "/Users/pratikbhadane/Work/Projects/ferro-ta/.venv/bin/python3",
"platform": "macOS-26.3.1-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.3.0",
"machine": "arm64",
"processor": "arm",
"cpu_model": "Apple M3 Max",
"cpu_count_logical": 14,
"total_memory_bytes": 38654705664
},
"git": {
"commit": "53566b9d82898fa4f95c5190156c969a0bd8e8e3",
"dirty": true,
"branch": "main"
},
"build": {
"rustc": "rustc 1.93.1 (01f6ddf75 2026-02-11)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8",
"cargo": "cargo 1.93.1 (083ac5135 2025-12-15)",
"cargo_release_profile": {
"lto": true,
"codegen-units": 1
},
"rustflags": null,
"cargo_build_rustflags": null,
"maturin_flags": null
},
"packages": {
"numpy": "2.2.6",
"ferro-ta": "1.0.4"
},
"fixtures": [
{
"path": "/Users/pratikbhadane/Work/Projects/ferro-ta/benchmarks/fixtures/canonical_ohlcv.npz",
"size_bytes": 75586,
"sha256": "60192f8349fb06cd59ef7f70fd77aa8280399e819d7cc5eed3ca95cf5ee1a89c"
}
],
"dataset": {
"fixture": "/Users/pratikbhadane/Work/Projects/ferro-ta/benchmarks/fixtures/canonical_ohlcv.npz",
"bars": 2000,
"rounds": 5
}
},
"results": [
{
"name": "VAR_20",
"inputs": "close",
"kwargs": {
"timeperiod": 20
},
"elapsed_ms": 0.0233
},
{
"name": "WILLR_14",
"inputs": "hlc",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0207
},
{
"name": "STOCH",
"inputs": "hlc",
"kwargs": {},
"elapsed_ms": 0.0202
},
{
"name": "ADX_14",
"inputs": "hlc",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0171
},
{
"name": "CCI_14",
"inputs": "hlc",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0164
},
{
"name": "MACD",
"inputs": "close",
"kwargs": {},
"elapsed_ms": 0.015
},
{
"name": "ATR_14",
"inputs": "hlc",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0116
},
{
"name": "RSI_14",
"inputs": "close",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.011
},
{
"name": "STDDEV_20",
"inputs": "close",
"kwargs": {
"timeperiod": 20
},
"elapsed_ms": 0.0103
},
{
"name": "BETA_5",
"inputs": "pair_hl",
"kwargs": {
"timeperiod": 5
},
"elapsed_ms": 0.0091
},
{
"name": "CORREL_30",
"inputs": "pair_hl",
"kwargs": {
"timeperiod": 30
},
"elapsed_ms": 0.0078
},
{
"name": "BBANDS_20",
"inputs": "close",
"kwargs": {
"timeperiod": 20
},
"elapsed_ms": 0.0062
},
{
"name": "TSF_14",
"inputs": "close",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0056
},
{
"name": "EMA_20",
"inputs": "close",
"kwargs": {
"timeperiod": 20
},
"elapsed_ms": 0.0055
},
{
"name": "LINEARREG_14",
"inputs": "close",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.0054
},
{
"name": "LINEARREG_SLOPE_14",
"inputs": "close",
"kwargs": {
"timeperiod": 14
},
"elapsed_ms": 0.005
},
{
"name": "SMA_20",
"inputs": "close",
"kwargs": {
"timeperiod": 20
},
"elapsed_ms": 0.0032
}
]
}
+69
View File
@@ -0,0 +1,69 @@
{
"metadata": {
"suite": "perf_contract",
"runtime": {
"generated_at_utc": "2026-03-24T09:13:08.787230+00:00",
"python_version": "3.13.5",
"python_implementation": "CPython",
"python_executable": "/Users/pratikbhadane/Work/Projects/ferro-ta/.venv/bin/python3",
"platform": "macOS-26.3.1-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.3.0",
"machine": "arm64",
"processor": "arm",
"cpu_model": "Apple M3 Max",
"cpu_count_logical": 14,
"total_memory_bytes": 38654705664
},
"git": {
"commit": "53566b9d82898fa4f95c5190156c969a0bd8e8e3",
"dirty": true,
"branch": "main"
},
"build": {
"rustc": "rustc 1.93.1 (01f6ddf75 2026-02-11)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8",
"cargo": "cargo 1.93.1 (083ac5135 2025-12-15)",
"cargo_release_profile": {
"lto": true,
"codegen-units": 1
},
"rustflags": null,
"cargo_build_rustflags": null,
"maturin_flags": null
},
"packages": {
"numpy": "2.2.6",
"ferro-ta": "1.0.4"
},
"fixtures": [
{
"path": "/Users/pratikbhadane/Work/Projects/ferro-ta/benchmarks/fixtures/canonical_ohlcv.npz",
"size_bytes": 75586,
"sha256": "60192f8349fb06cd59ef7f70fd77aa8280399e819d7cc5eed3ca95cf5ee1a89c"
}
],
"output_dir": "perf-contract"
},
"artifacts": {
"indicator_latency": {
"path": "perf-contract/indicator_latency.json",
"size_bytes": 4041,
"sha256": "564027c7abed7ecd4ae2ac1720217d96e1e31807f8ac7d5c5393c8fd974f13ed"
},
"batch": {
"path": "perf-contract/batch.json",
"size_bytes": 2507,
"sha256": "c50f242a138a0c358a6fa86c420954b4b11a2200598ca2942bcd0fd2bc456fb2"
},
"streaming": {
"path": "perf-contract/streaming.json",
"size_bytes": 2766,
"sha256": "d271d3219ec098e443e84ef648ab4220cd2a38e6dc998bc6c9fc545d7fc77716"
},
"runtime_hotspots": {
"path": "perf-contract/runtime_hotspots.json",
"size_bytes": 3197,
"sha256": "96eafc9a61ac410e47fcdfee6a9db1123cdee0ec05f49a85c631a3975063deed"
}
}
}
@@ -0,0 +1,118 @@
{
"metadata": {
"suite": "runtime_hotspots",
"runtime": {
"generated_at_utc": "2026-03-24T09:13:08.521805+00:00",
"python_version": "3.13.5",
"python_implementation": "CPython",
"python_executable": "/Users/pratikbhadane/Work/Projects/ferro-ta/.venv/bin/python3",
"platform": "macOS-26.3.1-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.3.0",
"machine": "arm64",
"processor": "arm",
"cpu_model": "Apple M3 Max",
"cpu_count_logical": 14,
"total_memory_bytes": 38654705664
},
"git": {
"commit": "53566b9d82898fa4f95c5190156c969a0bd8e8e3",
"dirty": true,
"branch": "main"
},
"build": {
"rustc": "rustc 1.93.1 (01f6ddf75 2026-02-11)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8",
"cargo": "cargo 1.93.1 (083ac5135 2025-12-15)",
"cargo_release_profile": {
"lto": true,
"codegen-units": 1
},
"rustflags": null,
"cargo_build_rustflags": null,
"maturin_flags": null
},
"packages": {
"numpy": "2.2.6",
"ferro-ta": "1.0.4"
},
"dataset": {
"price_bars": 20000,
"iv_bars": 50000,
"window": 252
}
},
"results": [
{
"category": "python_analysis",
"name": "iv_zscore",
"fast_ms": 32.5847,
"reference_ms": 990.4233,
"speedup_vs_reference": 30.3954,
"share_of_suite_pct": 69.27
},
{
"category": "python_analysis",
"name": "iv_rank",
"fast_ms": 12.2974,
"reference_ms": 233.0671,
"speedup_vs_reference": 18.9525,
"share_of_suite_pct": 26.14
},
{
"category": "python_analysis",
"name": "iv_percentile",
"fast_ms": 0.9511,
"reference_ms": 90.5663,
"speedup_vs_reference": 95.2202,
"share_of_suite_pct": 2.02
},
{
"category": "ffi_grouping",
"name": "feature_matrix",
"fast_ms": 0.6619,
"reference_ms": 0.6155,
"speedup_vs_reference": 0.9299,
"share_of_suite_pct": 1.41
},
{
"category": "ffi_grouping",
"name": "compute_many_close",
"fast_ms": 0.3175,
"reference_ms": 0.2437,
"speedup_vs_reference": 0.7675,
"share_of_suite_pct": 0.67
},
{
"category": "rust_kernel",
"name": "BETA",
"fast_ms": 0.0742,
"reference_ms": 188.6048,
"speedup_vs_reference": 2541.5695,
"share_of_suite_pct": 0.16
},
{
"category": "rust_kernel",
"name": "CORREL",
"fast_ms": 0.0638,
"reference_ms": 215.973,
"speedup_vs_reference": 3387.8115,
"share_of_suite_pct": 0.14
},
{
"category": "rust_kernel",
"name": "TSF",
"fast_ms": 0.0441,
"reference_ms": 49.6108,
"speedup_vs_reference": 1125.3954,
"share_of_suite_pct": 0.09
},
{
"category": "rust_kernel",
"name": "LINEARREG",
"fast_ms": 0.044,
"reference_ms": 57.9675,
"speedup_vs_reference": 1318.7009,
"share_of_suite_pct": 0.09
}
]
}
+285
View File
@@ -0,0 +1,285 @@
{
"metadata": {
"suite": "simd",
"runtime": {
"generated_at_utc": "2026-03-23T21:09:13.028473+00:00",
"python_version": "3.12.11",
"platform": "macOS-26.3.1-arm64-arm-64bit",
"machine": "arm64",
"processor": "arm"
},
"git": {
"commit": "2d5000262f0f1439546bd4872235aae0333880a4",
"dirty": true,
"branch": "feat/performace-1.0.2"
},
"dataset": {
"price_bars": 20000,
"iv_bars": 50000,
"window": 252
},
"variants": [
"portable_release",
"simd_release"
]
},
"results": [
{
"name": "compute_many_close",
"category": "ffi_grouping",
"portable_ms": 0.1711,
"simd_ms": 0.1618,
"speedup_simd_vs_portable": 1.0575
},
{
"name": "iv_percentile",
"category": "python_analysis",
"portable_ms": 0.9126,
"simd_ms": 0.9096,
"speedup_simd_vs_portable": 1.0033
},
{
"name": "iv_zscore",
"category": "python_analysis",
"portable_ms": 29.0039,
"simd_ms": 28.9123,
"speedup_simd_vs_portable": 1.0032
},
{
"name": "iv_rank",
"category": "python_analysis",
"portable_ms": 10.8629,
"simd_ms": 10.862,
"speedup_simd_vs_portable": 1.0001
},
{
"name": "BETA",
"category": "rust_kernel",
"portable_ms": 0.0696,
"simd_ms": 0.0696,
"speedup_simd_vs_portable": 1.0
},
{
"name": "CORREL",
"category": "rust_kernel",
"portable_ms": 0.0555,
"simd_ms": 0.0556,
"speedup_simd_vs_portable": 0.9982
},
{
"name": "TSF",
"category": "rust_kernel",
"portable_ms": 0.0414,
"simd_ms": 0.0415,
"speedup_simd_vs_portable": 0.9976
},
{
"name": "LINEARREG",
"category": "rust_kernel",
"portable_ms": 0.0413,
"simd_ms": 0.0416,
"speedup_simd_vs_portable": 0.9928
},
{
"name": "feature_matrix",
"category": "ffi_grouping",
"portable_ms": 0.2543,
"simd_ms": 0.2634,
"speedup_simd_vs_portable": 0.9655
}
],
"reports": {
"portable_release": {
"metadata": {
"suite": "runtime_hotspots",
"runtime": {
"generated_at_utc": "2026-03-23T21:08:38.698373+00:00",
"python_version": "3.12.11",
"platform": "macOS-26.3.1-arm64-arm-64bit",
"machine": "arm64",
"processor": "arm"
},
"git": {
"commit": "2d5000262f0f1439546bd4872235aae0333880a4",
"dirty": true,
"branch": "feat/performace-1.0.2"
},
"dataset": {
"price_bars": 20000,
"iv_bars": 50000,
"window": 252
}
},
"results": [
{
"category": "python_analysis",
"name": "iv_zscore",
"fast_ms": 29.0039,
"reference_ms": 903.5384,
"speedup_vs_reference": 31.1523,
"share_of_suite_pct": 70.04
},
{
"category": "python_analysis",
"name": "iv_rank",
"fast_ms": 10.8629,
"reference_ms": 201.621,
"speedup_vs_reference": 18.5606,
"share_of_suite_pct": 26.23
},
{
"category": "python_analysis",
"name": "iv_percentile",
"fast_ms": 0.9126,
"reference_ms": 80.0849,
"speedup_vs_reference": 87.7523,
"share_of_suite_pct": 2.2
},
{
"category": "ffi_grouping",
"name": "feature_matrix",
"fast_ms": 0.2543,
"reference_ms": 0.2222,
"speedup_vs_reference": 0.874,
"share_of_suite_pct": 0.61
},
{
"category": "ffi_grouping",
"name": "compute_many_close",
"fast_ms": 0.1711,
"reference_ms": 0.1413,
"speedup_vs_reference": 0.8257,
"share_of_suite_pct": 0.41
},
{
"category": "rust_kernel",
"name": "BETA",
"fast_ms": 0.0696,
"reference_ms": 162.9168,
"speedup_vs_reference": 2341.2971,
"share_of_suite_pct": 0.17
},
{
"category": "rust_kernel",
"name": "CORREL",
"fast_ms": 0.0555,
"reference_ms": 163.8589,
"speedup_vs_reference": 2950.1793,
"share_of_suite_pct": 0.13
},
{
"category": "rust_kernel",
"name": "TSF",
"fast_ms": 0.0414,
"reference_ms": 49.2846,
"speedup_vs_reference": 1189.9901,
"share_of_suite_pct": 0.1
},
{
"category": "rust_kernel",
"name": "LINEARREG",
"fast_ms": 0.0413,
"reference_ms": 47.5241,
"speedup_vs_reference": 1149.7853,
"share_of_suite_pct": 0.1
}
]
},
"simd_release": {
"metadata": {
"suite": "runtime_hotspots",
"runtime": {
"generated_at_utc": "2026-03-23T21:08:57.755423+00:00",
"python_version": "3.12.11",
"platform": "macOS-26.3.1-arm64-arm-64bit",
"machine": "arm64",
"processor": "arm"
},
"git": {
"commit": "2d5000262f0f1439546bd4872235aae0333880a4",
"dirty": true,
"branch": "feat/performace-1.0.2"
},
"dataset": {
"price_bars": 20000,
"iv_bars": 50000,
"window": 252
}
},
"results": [
{
"category": "python_analysis",
"name": "iv_zscore",
"fast_ms": 28.9123,
"reference_ms": 909.2586,
"speedup_vs_reference": 31.4489,
"share_of_suite_pct": 69.98
},
{
"category": "python_analysis",
"name": "iv_rank",
"fast_ms": 10.862,
"reference_ms": 198.2076,
"speedup_vs_reference": 18.2478,
"share_of_suite_pct": 26.29
},
{
"category": "python_analysis",
"name": "iv_percentile",
"fast_ms": 0.9096,
"reference_ms": 78.1232,
"speedup_vs_reference": 85.889,
"share_of_suite_pct": 2.2
},
{
"category": "ffi_grouping",
"name": "feature_matrix",
"fast_ms": 0.2634,
"reference_ms": 0.2219,
"speedup_vs_reference": 0.8425,
"share_of_suite_pct": 0.64
},
{
"category": "ffi_grouping",
"name": "compute_many_close",
"fast_ms": 0.1618,
"reference_ms": 0.155,
"speedup_vs_reference": 0.9583,
"share_of_suite_pct": 0.39
},
{
"category": "rust_kernel",
"name": "BETA",
"fast_ms": 0.0696,
"reference_ms": 161.4576,
"speedup_vs_reference": 2320.3601,
"share_of_suite_pct": 0.17
},
{
"category": "rust_kernel",
"name": "CORREL",
"fast_ms": 0.0556,
"reference_ms": 162.6189,
"speedup_vs_reference": 2923.4861,
"share_of_suite_pct": 0.13
},
{
"category": "rust_kernel",
"name": "LINEARREG",
"fast_ms": 0.0416,
"reference_ms": 48.029,
"speedup_vs_reference": 1155.0143,
"share_of_suite_pct": 0.1
},
{
"category": "rust_kernel",
"name": "TSF",
"fast_ms": 0.0415,
"reference_ms": 47.55,
"speedup_vs_reference": 1145.783,
"share_of_suite_pct": 0.1
}
]
}
}
}
@@ -0,0 +1,95 @@
{
"metadata": {
"suite": "streaming",
"runtime": {
"generated_at_utc": "2026-03-24T09:13:04.351797+00:00",
"python_version": "3.13.5",
"python_implementation": "CPython",
"python_executable": "/Users/pratikbhadane/Work/Projects/ferro-ta/.venv/bin/python3",
"platform": "macOS-26.3.1-arm64-arm-64bit-Mach-O",
"system": "Darwin",
"release": "25.3.0",
"machine": "arm64",
"processor": "arm",
"cpu_model": "Apple M3 Max",
"cpu_count_logical": 14,
"total_memory_bytes": 38654705664
},
"git": {
"commit": "53566b9d82898fa4f95c5190156c969a0bd8e8e3",
"dirty": true,
"branch": "main"
},
"build": {
"rustc": "rustc 1.93.1 (01f6ddf75 2026-02-11)\nbinary: rustc\ncommit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf\ncommit-date: 2026-02-11\nhost: aarch64-apple-darwin\nrelease: 1.93.1\nLLVM version: 21.1.8",
"cargo": "cargo 1.93.1 (083ac5135 2025-12-15)",
"cargo_release_profile": {
"lto": true,
"codegen-units": 1
},
"rustflags": null,
"cargo_build_rustflags": null,
"maturin_flags": null
},
"packages": {
"numpy": "2.2.6",
"ferro-ta": "1.0.4"
},
"dataset": {
"n_bars": 20000,
"seed": 2026
}
},
"results": [
{
"indicator": "StreamingSMA",
"inputs": "close",
"stream_total_ms": 0.9927,
"batch_total_ms": 0.0166,
"stream_ns_per_update": 49.63,
"batch_ns_per_bar": 0.83,
"updates_per_second": 20147763.43,
"stream_over_batch_ratio": 59.7092
},
{
"indicator": "StreamingEMA",
"inputs": "close",
"stream_total_ms": 0.9459,
"batch_total_ms": 0.0435,
"stream_ns_per_update": 47.3,
"batch_ns_per_bar": 2.18,
"updates_per_second": 21143503.9,
"stream_over_batch_ratio": 21.7247
},
{
"indicator": "StreamingRSI",
"inputs": "close",
"stream_total_ms": 1.0059,
"batch_total_ms": 0.0991,
"stream_ns_per_update": 50.3,
"batch_ns_per_bar": 4.95,
"updates_per_second": 19882356.06,
"stream_over_batch_ratio": 10.1523
},
{
"indicator": "StreamingATR",
"inputs": "hlc",
"stream_total_ms": 2.1574,
"batch_total_ms": 0.0992,
"stream_ns_per_update": 107.87,
"batch_ns_per_bar": 4.96,
"updates_per_second": 9270525.53,
"stream_over_batch_ratio": 21.746
},
{
"indicator": "StreamingVWAP",
"inputs": "hlcv",
"stream_total_ms": 2.6935,
"batch_total_ms": 0.0252,
"stream_ns_per_update": 134.68,
"batch_ns_per_bar": 1.26,
"updates_per_second": 7425170.07,
"stream_over_batch_ratio": 106.8484
}
]
}