Discussing the article: "Integrate Your Own LLM into EA (Part 5): Develop and Test Trading Strategy with LLMs(II)-LoRA-Tuning"

 

Check out the new article: Integrate Your Own LLM into EA (Part 5): Develop and Test Trading Strategy with LLMs(II)-LoRA-Tuning.

With the rapid development of artificial intelligence today, language models (LLMs) are an important part of artificial intelligence, so we should think about how to integrate powerful LLMs into our algorithmic trading. For most people, it is difficult to fine-tune these powerful models according to their needs, deploy them locally, and then apply them to algorithmic trading. This series of articles will take a step-by-step approach to achieve this goal.

In the previous article, we introduced how to fine-tune the GPT-2 pre-trained model using our own financial data with a full-parameter fine-tuning method and evaluated the model's output results. In this article and the following ones, we will further discuss how to implement other fine-tuning methods with code examples (we will only discuss the fine-tuning methods introduced in the previous article, and of course, it is impossible to implement every method. I will only select a few commonly used methods for implementation). This article will take the LoRA-tuning method as an example for discussion.

Additionally, we have a task to try to compare the models trained with these different fine-tuning methods horizontally, and then find the best-performing model under the current currency pair (of course, the model's performance may also vary under different market conditions, such as upward trends, downward trends, or oscillating trends). This can more clearly guide us on which model training method to use in practice to achieve better results. Of course, if we are more rigorous, we should not only compare these different processing methods horizontally, but also compare the performance of the fine-tuned models of different currency pairs under different data processing methods and fine-tuning methods. This seems to be a simple but extremely tedious task. I, personally, believe that if we really want to apply this series of methods in trading, this step is crucial. However, I do not intend to introduce this part in detail in this series of articles because I believe everyone can easily expand based on our examples. Just replace the training data with different currency pairs and then compare the model performance horizontally. Although this is tedious, it is easy to achieve.

Author: Yuqiang Pan