iTranslated by AI
The Essence of Project Management for Market AI Development Projects
Makedeko ( https://discord.gg/xg6P5RXwaa ) is a community of botters who mainly utilize stock-related market APIs to build analysis and prediction models, and it is operated with the sponsorship of JPX Market Innovation & Research and AlpacaJapan. Today, as part of its advent calendar, I would like to summarize the essence of project management in the market AI development projects I have conducted in the past.
What I have done
Between 2016 and 2020, since the founding of Alpaca, I have been in charge of various market AI development projects. Our main clients were diverse, including institutional investors, mega-banks, robo-advisors, and hedge funds. I believe I conducted about 20 projects in total over those five years until 2020. Below are some of the projects that have been made public.
Short-term FX prediction model construction in "Construction of market prediction models" on page 54 of the above financial results document.

From the design of robo-advisors to the development of short-term FX prediction models and one-week-ahead prediction models with institutional investors, I have served as the PM for a wide range of projects.
Some yielded results, while others were difficult with the technology of the time, or projects where we struggled for several years but could not achieve satisfactory performance in live environments. I tackled each project with all my heart and soul. However, the ones that actually produced stable results were high-frequency (ultra-short-term) models or portfolio-based models. Models focused on predicting price movements (up/down) almost never yielded satisfactory results. Having managed about 20 of these market AI development projects, I would like to summarize what I have learned.
Currently, I am mainly in charge of overseeing securities system development and product design at the company. I only serve as a PM for data science projects like J-Quants when specifically requested by certain clients.
What to do first when starting a project
As can likely be said for machine learning projects in general, goal setting for the project is extremely important.
I believe there are basically two patterns for what is required of machine learning: one is a pattern of automating what humans can do with effort, and the other is a pattern of realizing what humans cannot do even with effort. In the case of market AI development, it is almost certainly the latter.
In recent years, I have the strong impression that results that could not be achieved by humans have emerged, but during the 2016-2020 period, it was often difficult to make models that good. Also, looking back, the so-called "machine learning know-how"—such as how to solve these problems more effectively—had not spread widely yet. We were particularly trial-and-error oriented when it came to feature engineering and creating training labels.
However, through conducting multiple projects, I have come to realize something. The first thing you should do is metric design. As you know, as long as metrics can be properly defined, the know-how on how to solve them has spread considerably through platforms like Kaggle and various research papers. Even back in 2016-2017 when this know-how was scarce, the importance of metric design remained unchanged. I have also described this know-how in the context of Kaggle problem design.
The sequence of steps is as follows:
- Make metric design the first task of the project; do not proceed until this is determined to some extent.
- Decide on the visualization methods to evaluate the agreed-upon metrics. Since it is extremely difficult for humans to intuitively grasp movements over time, visualization is essential to intuitively understand if it is a "good model."
- Consider the decision thresholds for live deployment. Decide how the model will be used in a live environment when it is completed—whether it will be used just for reference, to change positions, and so on.
What does "metric design" mean? Depending on whether the problem you are trying to solve is related to portfolios, direction prediction, risk management, or interest rate sign management, the approach changes. It starts with organizing the mapping of which metrics (e.g., rank correlation, simple correlation, up/down accuracy, complex scores, non-linear similarity—the latter often being a research area) will contribute to the business and to what extent if they are improved. If you don't do this properly, you will likely encounter setbacks in the latter half of the project.
And then, there's visualization. This is incredibly important. Imagine creating a report that allows you to check backtesting visualizations—like those in this article—as well as the overall state of the market and the intensity of past predictions in terms of quantiles.
It is very efficient to make this so that it can always be output in a Notebook format, taking the model output and market data as inputs.
How to create a baseline
Once the metric design and various visualizations are decided, we finally start developing the model. Intuitively, I often find that about 30-40% of the project time has already been spent by this point. That is how important the preparation before model development is.
In model development, first create a baseline. This is to understand what is effective and to what extent, and what methods should be pursued in the project. It also serves as a compass when you get lost.
As for how to create a baseline, the best way is to have the client share the various models they currently use for operations, but basically, they won't share them. Models currently in operation are a crystallization of know-how that has withstood rigorous live testing, no matter how simple they may be.
Therefore, you first design the baseline yourself. Speaking of baselines, stop making machine learning models the baseline. Introducing machine learning models into actual operations brings the following challenges:
- Compared to when you use features that can be calculated statically for operations, it becomes extremely difficult to explain the logic to others.
- If the features are designed based on a hypothesis, it is easy to think of some reason when things don't go well. However, it is not easy to guess the reason when a prediction model built through complex machine learning steps stops working correctly.
- If you utilize a machine learning model without obtaining good results in feature engineering, it becomes difficult to distinguish whether the hypothesis was good or if the model tuning was the reason for success.
- When using machine learning models, it becomes necessary to split the data into three parts for training, validation, and testing. This is fine if you have a massive amount of historical data, but in practice, you may not be able to prepare data for such a long period.
- In actual operations, you need to consider issues unique to machine learning models, such as the timing of re-training.
Utilizing machine learning for operations causes at least the problems mentioned above. Research on prediction models using machine learning must prove that it is worth using even after considering these factors. At this time, by making the baseline a feature-engineering-based model rather than a machine learning model, it becomes much easier to compare what has improved and what has worsened. In other words, the project as a whole is easier to advance if you first put as much effort as possible into hypothesis construction and feature engineering and then use machine learning models to build upon those results.
By the way, until around 2020, I had never blindly applied deep learning in an actual project, but now in 2022, I feel like it might work out well if done correctly. Also, I would personally love to try a project utilizing ChatGPT.
How to Proceed After the Baseline is Complete
By this point, it feels like about 60% of the project is finished. Once the metrics, visualization, and baseline are done, we finally get to the fun part: model construction. Note that because the remaining 20% involves summarizing materials, the actual model-building part only takes up about 20-30% of the total time.
This is just like a research plan. You summarize each idea by documenting what you implemented and how specific metrics improved. First, list as many independent ideas as possible, then compile improvements in metrics and visualizations for each idea into a document. I take an approach similar to a spreadsheet for measuring performance against features and labels, like the one I showed in past J-Quants materials.

In the J-Quants problem design, we also verified various patterns with features and labels and observed the trends of metrics (e.g., increase range and variance).
This is an important part of a machine learning research plan. There are many books available, so please study how to create an effective research plan.
And how to interpret the project results
It is a happy outcome if the project results in clear operational use cases or commercialization. In my experience, about one in three or four projects ends this way. The projects I introduced above are examples of this.
However, unfortunately, some projects do not go well. These unsuccessful projects can arise, for example, if the COVID-19 shock occurs the month after launch, causing all market regimes to shift. It's heartbreaking. In such cases, honestly, you can only feel like you've done your best and leave the rest to fate. Nonetheless, without getting discouraged, you should check the actual market data drift using tools like Q-Q plots or investigate the impact on the model using SHAP. Sometimes, even that isn't enough.
No matter how hard you try, if the model idea itself becomes obsolete, you just have to give up and apologize to the client. Additionally, depending on the model, it can sometimes take six months just to verify that the model has stopped working, which is also heartbreaking. In these situations, I recommend facing the existing model while verifying new ideas in the background 😎
Finally
Whenever I start writing a blog post, it always tends to get long, and this one turned out to be very long as well.
However, the reason I wrote about this is that I thought my experience in actually carrying out projects would be helpful for the basic way to proceed—such as how to build models or how to think of ideas—which are common topics in Makedeko.
If you are interested in these kinds of prediction models, please join Makedeko ( https://discord.gg/xg6P5RXwaa ) and mention @tomo to start a discussion. We look forward to your participation!
Discussion