Software implementation of the momentum
DOI: 10.31673/2412-9070.2026.318113
Abstract
The subject of the study is the algorithmic model and software implementation of the Momentum Absorption Score (MAS) indicator as a detector of structural regimes in streaming time series of the "price-volume" type. MAS is formalized as a binary event of the intersection of the lower tail of the standardized price range distribution and the upper tail of the standardized trading volume distribution within a moving statistical window, which allows interpreting the problem as the detection of rare joint extreme events in a two-dimensional stochastic process. The aim of the work is to design, formalize and experimentally validate MAS as a statistical tool for identifying special regimes in the Bit-coin market within the framework of a software implementation of a streaming data processing system. The research tasks include: formal definition of the MAS mathematical model; development of a modular software implementation architecture; implementation of the calculation of moving averages, variances and quantiles; analysis of computational complexity and memory costs; empirical verification of the algorithm on historical BTC/USDT data for timeframes of 1 day, 4 hours and 30 minutes; estimation of conditional mathematical expectations of returns, signal density and asymmetry between position types; using machine learning to filter out unprofitable positions. The obtainned results showed that when using incremental methods of updating statistics, the algorithm has a complexity of (O(n)) in time and (O(W)) in memory, where (W) is the size of the sliding window. MAS events correspond to the shift of the conditional distribution of future returns relative to the unconditional expectation. The dependence between the density of detection and the scale of temporal aggregation, as well as increased stability of implementations based on relative volume indicators, is established. The conclusions confirm that MAS can be considered as a scalable algorithm for detecting modes in streaming stochastic processes.
Keywords: software, software architecture, analytical model, machine learning, information technology, mechanistic approach.