Fast Exact Nearest-Neighbor Learning for High-Frequency Financial Time Series

📅 2026-06-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenge of simultaneously achieving real-time performance and efficient learning from large-scale historical data in high-frequency financial time series. The authors propose the first Mojo SIMD-accelerated k-d tree architecture tailored for financial AI, integrating variance-based splitting, contiguous flat memory layout, and compile-time vectorized distance computation to enable exact nearest neighbor search in high-dimensional spaces. The approach achieves up to a 43.5× speedup on both x86 and ARM64 platforms. When applied to an implied volatility pricing model, it enables a tenfold increase in training data volume and reduces the RMSE of put option implied volatility by 8.0%, substantially enhancing model accuracy and scalability.
📝 Abstract
AI efficiency at scale is becoming critical in finance as market data volumes surge across equities, ETFs, FX, options, and high-frequency trading streams. This growth creates a core challenge for mature financial AI systems: models must learn from larger historical corpora while still meeting real-time latency constraints in trading, risk management, and derivative pricing. We use exact nearest-neighbor learning for high-frequency financial time series as a concrete case study to show that Mojo-based financial AI can address this challenge. We introduce a Mojo SIMD k-d tree with variance-based splitting, contiguous flat-buffer storage, and compile-time vectorized distance computation. We also provide a runtime result showing that, under standard pruning and implementation-cost assumptions, the Mojo SIMD k-d tree asymptotically dominates Mojo SIMD brute force and scikit-learn's k-d tree in the fixed-stock, large-$n$, moderate-dimensional regime. Empirically, across eight financial datasets on x86 and ARM64 with up to 277K training samples, the method achieves 17.5--21.6$\times$ speedup over scikit-learn's k-d tree on x86 and 28.1--43.5$\times$ over scikit-learn brute force on ARM64 equity/ETF datasets, while preserving exact outputs. Beyond nearest-neighbor inference, Mojo's compiled execution enables an Extra Trees-based implied-volatility pricing model to train on $10\times$ more options data, reducing put-IV RMSE by 8.0\%. These results position Mojo as a scalable, production-ready stack for financial AI and a promising foundation for efficient AI in other data-intensive fields. \keywords{Financial AI \and AI Efficiency \and Mojo \and SIMD \and K-D Trees \and KNN \and High-Frequency Trading \and Financial Time Series \and Scaling}
Problem

Research questions and friction points this paper is trying to address.

Financial AI
AI Efficiency
High-Frequency Trading
Financial Time Series
Scaling
Innovation

Methods, ideas, or system contributions that make the work stand out.

Mojo
SIMD
K-D Trees
Exact Nearest Neighbor
Financial Time Series
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
H
Henry Han
Data Science and Artificial Intelligence Innovation Laboratory, School of Engineering and Computer Science, Baylor University, Waco, TX 76798, USA
D
Diane Li
Department of Business, Management and Accounting, University of Maryland Eastern Shore, USA