"Looking Back at AI Development in 2024" (12/30) Investment in AI Development Struggles Log
The year is coming to an end once again, so I would like to reflect on the AI development in 2024.
This is a struggle that has begun recently, and honestly is not even a complete compilation yet, but please understand that it will be a retrospective roundup.
EA and Generative AI Collaboration
At the beginning of this year, I created an EA that analyzes economic indicators and trades using OpenAI's API.
There were several challenges to the groundbreaking aspects of the EA.
① Hurdles via API
Using the API required procedures and credit purchases, which I think were particularly high hurdles for beginners.
The credit used per run was about 5 yen with GPT-4 at that time. If the model grade is lowered to 3.5, it was about 1 yen.
Backtesting becomes very costly, so the only way to confirm an edge was real forward testing.
② Reproducibility of Generative AI
Even with the same prompt, responses varied from time to time, causing reproducibility issues.
There were rare cases where the way positions were taken differed.
I expect reproducibility of generative AI to improve as models evolve in the future.
③ Model selection
We used OpenAI for text and image analysis, and Perplexity AI for web searches.
Machine Learning, First Challenge
From around February, there were challenges with backtesting.Complete learning and prediction inside the EAto be able to do so, I started to explore how to make it happen!
The first ML EA I created was an EA that would regularly learn from past charts, update the prediction model, and trade, but
the past chart data available before the start of backtesting was only about 1,000 bars, so there was insufficient learning data for proper validation.
This was a random forest, but I was able to make it capable of saving and loading the model.
This style of machine learning hit a wall due to the limited history available at the start of backtesting.
Establishing the Current Style
In April, I began studying the Onnx function in the standard MQL5 library and how to use it concretely.
I had previously thought of the Onnx name as something vague, but I never imagined I would start using it here.
Onnx is a file format used to load AI models trained in Python into an EA.
As I studied the Onnx function, I was able to use GPUs with Python, and because generative AI excels at Python, I could create more complex models.
From this, I established a workflow that outputs to Onnx files and then integrates with MQL.
A drawback is that, unlike the online learning EA that learns from past charts, this approach is not online learning.
The Journey of Information Gathering
By June, I had a reasonable understanding of how to use Onnx and AI models.
From there, I deepened my research, buying GPUs, books, and courses, and began investing in AI-relatedinvestments of around 1,000,000 yenapproaching?
As I gathered various information, I realized that simpler models are better and that gradient boosting models are favored in the investment AI space, but
I felt the lack of information about investment AI keenly.
The Pitfall of Overfitting
After completing most of the learning, I was excited to apply it to trading.
However, whether I built an AI, tweaked the model, or adjusted features, the validation (data outside the training set) did not improve
and I found myself completely stuck in the pit of overfitting.
If the model is determined by simple gradient boosting, the only variables left to improve are the features themselves.
At that time, I completely believed features were important and tried to craft them as if building a proper EA logic.
(If that were the case, it would be far more efficient to build the EA manually.)
A Saving Grace Arrives
In October, I received an invitation to zoom with Mr. Aizaki, who is known to those developing systematic trading,
and I was able to gain important latest information and ideas about machine learning in the finance field.
There are too many details to write here, and Mr. Aizaki's social media, blog, and books provide detailed explanations, so I will omit them here.
Beyond Overfitting
In November, I began to move beyond simply overfitting toward real improvements.
The evaluation values for validation and test data became clearly higher than those for training data.
Breaking through this barrier further increased my interest in machine learning.
The Next Stage
Over the past year, I studied decision trees and deep learning every morning until the next day, starting from when I woke up.
I may not understand complex formulas, but I learned many detailed steps and feel I roughly understand them.
What remains is to actually implement it as an EA.
However, there is still an undeveloped area.Reinforcement LearningI am currently able to implement general approaches for Q-learning and DQN.
To achieve extraordinary AI trading, I believe reinforcement learning is essential.
Supervised learning like deep learning is still predictive trading.
Indeed, entering when the probability of price movement is high is fine.
However, closing positions is not always aligned with the opposite signal.
I believe reinforcement learning will help make closings more optimal.
New Year’s Resolutions
Next year, in addition to the supervised learning I have learned and researched so far, I will seriously study reinforcement learning.
My goal is to become the AlphaZero of the FX world.AlphaZeroIs that correct?
In Closing
The year is coming to an end, but I would like to thank you all for your continued support.
I am sincerely grateful to everyone who uses PEACE, MQLCAMP, EA creation outsourcing, and more.
I look forward to your continued support next year as well.
Have a wonderful new year?