FreqAI : généraliser la modélisation adaptative pour les prévisions de marché chaotiques en séries chronologiques

Statement of need

Forecasting chaotic time-series based systems, such as equity/cryptocurrency markets, requires a broad set of tools geared toward testing a wide range of hypotheses. Fortunately, a recent maturation of robust machine learning libraries (e.g. scikit-learn), has opened up a wide range of research possibilities. Scientists from a diverse range of fields can now easily prototype their studies on an abundance of established machine learning algorithms. Similarly, these userfriendly libraries enable “citizen scientists” to use their basic Python skills for data-exploration.


However, leveraging these machine learning libraries on historical and live chaotic data sources can be logistically difficult and expensive. Additionally, robust data-collection, storage, and handling presents a disparate challenge. FreqAI aims to provide a generalized and extensible open-sourced framework geared toward live deployments of adaptive modeling for market forecasting. The FreqAI framework is effectively a sandbox for the rich world of open-source machine learning libraries. Inside the FreqAI sandbox, users find they can combine a widevariety of third-party libraries to test creative hypotheses on a free live 24/7 chaotic datasource – cryptocurrency exchange data.

Summary

FreqAI evolved from a desire to test and compare a range of adaptive time-series forecasting methods on chaotic data. Cryptocurrency markets provide a unique data source since they are operational 24/7 and the data is freely available via a variety of open-sourced exchange APIs. Luckily, an existing open-source software, Freqtrade, had already matured under a range of talented developers to support robust data collection/storage, as well as robust live environmental interactions for standard algorithmic trading. Freqtrade also provides a set of data analysis/visualization tools for the evaluation of historical performance as well as live environmental feedback. FreqAI builds on top of Freqtrade to include a user-friendly well tested interface for integrating external machine learning libraries for adaptive timeseries forecasting. Beyond enabling the integration of existing libraries, FreqAI hosts a range of custom algorithms and methodologies aimed at improving computational and predictive performances. Thus, FreqAI contains a range of unique features which can be easily tested in combination with all the existing Python-accessible machine learning libraries to generate novel research on live and historical data.

The high-level overview of FreqAI algorithm is depicted in Figure:

Connecting machine learning libraries

Although the FreqAI framework is designed to accommodate any Python library in the “Model training” and “Feature set engineering” portions of the software (Figure), it already boasts a wide range of well documented examples based on various combinations of:

  • scikit-learn (Pedregosa et al., 2011), Catboost (Prokhorenkova et al., 2018), LightGBM (Ke et al., 2017), XGBoost (Chen & Guestrin, 2016), stable_baselines3 (Raffin et al., 2021), openai gym (Brockman et al., 2016), tensorflow (Abadi et al., 2015), pytorch (Paszke et al., 2019), Scipy (Virtanen et al., 2020), Numpy (Harris et al., 2020), and pandas (McKinney & others, 2010).

These mature projects contain a wide range of peer-reviewed and industry standard methods, including:

  • Regression, Classification, Neural Networks, Reinforcement Learning, Support Vector Machines, Principal Component Analysis, point clustering, and much more.

which are all leveraged in FreqAI for users to use as templates or extend with their own methods.

Furnishing novel methods and features

Beyond the industry standard methods available through external libraries – FreqAI includes novel methods which are not available anywhere else in the open-source (or scientific) world.

Of particular interest for researchers, FreqAI provides the option of large scale experimentation via an optimized websocket communications interface.

Optimizing the back-end

FreqAI aims to make it simple for users to combine all the above tools to run studies based in two distinct modules:

  • live-deployments
  • backtesting studies

Both of these modules and their respective data management systems are built on top of Freqtrade, a mature and actively developed cryptocurrency trading software. This means that FreqAI benefits from a wide range of tangential/disparate feature developments such as:

  • FreqUI, a graphical interface for backtesting and live monitoring
  • telegram control
  • robust database handling
  • futures/leverage trading
  • dollar cost averaging
  • trading strategy handling
  • a variety of free data sources via CCXT (OKX, Binance, Bybit etc.)

These features derive from a strong external developer community that shares in the benefit and stability of a communal CI (Continuous Integration) system. Beyond the developer community, FreqAI benefits strongly from the userbase of Freqtrade, where most FreqAI beta-testers/developers originated. This symbiotic relationship between Freqtrade and FreqAI ignited a thoroughly tested beta, which demanded a four month beta and comprehensive documentation containing:

  • numerous example scripts
  • a full parameter table
  • methodological descriptions
  • high-resolution diagrams/figures
  • detailed parameter setting recommendations

Providing a reproducible foundation for researchers

FreqAI provides an extensible, robust, framework for researchers and citizen data scientists. The FreqAI sandbox enables rapid conception and testing of exotic hypotheses. From a research perspective, FreqAI handles the multitude of logistics associated with live deployments, historical backtesting, and feature engineering. With FreqAI, researchers can focus on their primary interests of feature engineering and hypothesis testing rather than figuring out how
to collect and handle data. Further – the well maintained and easily installed open-source framework of FreqAI enables reproducible scientific studies. This reproducibility component is essential to general scientific advancement in time-series forecasting for chaotic systems.

Technical details

https://www.theoj.org/joss-papers/joss.04864/10.21105.joss.04864.pdf

  • Catégorie de message :Publiquement
  • Dernière modification de la publication :22.10.2024
  • Temps de lecture :7 min de lecture
  • Auteur/autrice de la publication :
  • Commentaires de la publication :0 commentaire
une représentation artistique de données complexes transformées en graphiques colorés
Emergent Methods, based in Arvada CO, is actively using FreqAI to perform large scale experiments aimed at comparing machine learning libraries in live and historical environments. Past projects include backtesting parametric sweeps, while active projects include a 3 week live deployment comparison between CatboostRegressor, LightGBMRegressor, and XGBoostRegressor.

Laisser un commentaire

Sprey.Win™

Les dieux du commerce croient en nous