online Moment-Based Adaptive Detection

For TradingView users: this entity would truly unleash its true potential for you ‘only’ if you work with tick-based & seconds-based resolutions, otherwise I recommend to keep using original non-online MBAD. Otherwise it may only help with a much faster backtesting & strategy development processes.
...
Main features :
- O(1) time complexity: the whole method works @ O(1) time complexity, it’s lighting fast and cheap
- HFT-ready: frequency, amount and magnitude of data points are irrelevant
- Axiomatic: no need to optimize or to provide arbitrary hyperparameters, adaptive thresholds are completely data-driven and based on combination of higher-order central moments
- Accepts weights: the method can gain additional information by accepting weights (e.g. volume weighting)
Example use cases for high-frequency trading:
- Ordeflow analysis: can be applied on non-aggregated flow of market orders to gauge its imbalance and momentum
- Liquidity provision: can be applied to high-resolution || tick data to place and dynamically adjust prices of limit orders
- ML-based signals: online estimates of higher-order central moments can be used as features & in further feature engineering for trading signal generation
- Operation & control: can be applied on PnL stream of your strategy for immediate returns analysis and equity control
Abstract:
This method is the online version of originally O(n) MBAD (Moment-Based Adaptive Detection). It uses higher-order central & standardized moments to naturally estimate data’s extremums using all data while not touching order-statistics (i.e. current min and max) at all. By the same principles it also estimates “ever-possible” values given the data-generating process stays the same.
This online version achieves reduced time complexity to O(1) by using weighted exponential smoothing, and in particular is based on Pebay et al (2008) work, which provides mathematically correct results for the moments, and is numerically stable, unlike the raw sum-based estimates of moments.
Additionally, I provide adjustments for non-continuous lattice geometry of orderbooks, and correct re-quantization math, allowing to artificially increase the native tick size.
The guidelines of how to adjust alpha (smoothing parameter of exponential smoothing) in order to completely match certain types of moving averages, or to minimize errors with ones when it’s impossible to match; are also provided.
Mathematical correctness of the realization was verified experimentally by observing the exact match with the original non-recursive MBAD in expanding window mode, and confirmed by 2 AI agents independently. Both weighted and non-weighted versions were tested successfully.
...
^^ On micro level with moving window size 1
^^ With artificial tick size increase, moving window size 64
^^ Expanding window mode anchored to session start
^^ Demonstrates numerical stability even on very large inputs
...
∞
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con gorx1.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
t.me/synchro1_channel
linkedin.com/company/synchro1
Exención de responsabilidad
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con gorx1.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
t.me/synchro1_channel
linkedin.com/company/synchro1