iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📖

re:Invent 2025: Building Agentic AI and Optimized LLM Inference for Digital Asset HFT Analytics

に公開
2025/12/10

Introduction

By transcribing various overseas lectures into Japanese articles, we aim to make hidden, high-quality information more accessible. This project introduces the following presentation!

For transcription articles of re:Invent 2025, please check the information summarized in this Spreadsheet.

📖 re:Invent 2025: AWS re:Invent 2025 - How FSI Revolutionized HFT Analytics with Agentic AI (GBL302)

In this video, AWS Solutions Architect David and independent researcher Wes explain how digital asset market makers leverage AWS macro services to build an agentic news analysis platform. After describing the role of market makers, the importance of volatility management, and the immediate impact tweets from individuals like Trump or Elon Musk have on the market, they introduce the evolution from dictionary matching to machine learning and LLM-based approaches. They detail the implementation shift from SageMaker Jumpstart to vLLM and SGLang, which improved inference speeds from 80 tokens/sec to 180 tokens/sec, the optimization of the deduplication pipeline through fine-tuning BGE-M3 embedding models, and an architecture combining Lambda, Aurora PostgreSQL, and OpenSearch.

https://www.youtube.com/watch?v=TCJPcVhlQns
※ This article was automatically generated while maintaining the content of the original lecture as much as possible. Please be aware that there may be typos or incorrect content.

Main Content

Thumbnail 0

Market Makers and the Importance of News Analysis: Challenges in the Digital Asset Market

Hello everyone, and thank you for having me. I am David, an AWS Solutions Architect specializing in financial services and digital asset trading systems. Today, I would like to talk a little bit about how digital asset market makers are building agentic news analysis platforms using AWS macro services. Before we begin, I would like to hand it over to Wes for a walkthrough on what market making in the financial industry entails.

Thank you, David. I am Wes, an independent researcher studying the microstructures of digital asset markets. Before diving into the topic, please allow me to state a brief disclaimer. The views expressed today are my own and do not necessarily reflect the official views of AWS or any organization I may be affiliated with. This is for informational purposes only and does not constitute financial or professional advice. That is the disclaimer.

Thumbnail 70

Let's start with the big picture: the trading ecosystem. In the trading ecosystem, there are buyers and sellers in the financial markets. Buyers and sellers place orders on exchanges, indicating their intention to buy or sell something. However, there is not always sufficient liquidity in the market. That is where market makers come in.

It is the responsibility of a market maker to ensure there is always sufficient liquidity in the market by continuously providing buy or sell orders. There is always a counterparty in the market to trade with. Whenever you enter the market, you can always buy from or sell to someone.

Thumbnail 110

This is an abstract representation of an order book. The left side shows bid orders, and the right side shows ask orders. The Y-axis represents the cumulative size at that price level, and the closer to the right, the higher the price. You can imagine that in the daily operations of a market maker, they are placing multiple bid orders on one side and multiple ask orders on the other.

Suppose there is a news announcement coming up. The market could move significantly, and if it does, all your sell orders might be taken by other market participants. This is a risk for a market maker. As a market maker, we need to manage our inventory appropriately and ensure we have enough stock to fulfill sell orders. If the market suddenly rises and does not return, only the sell orders will be executed, and the buy orders will not.

In that case, the market maker would need to buy back inventory at a higher price to replenish their stock. In other words, the market maker ends up selling at a low price and buying at a high price, which could result in a loss for the market maker's portfolio.

Thumbnail 190

The ideal situation for a market maker is for the market to fluctuate slightly within a range of controlled volatility. In an ideal case, buy and sell orders are executed in a very short period of time. The profit from each trade might be small, but if the market keeps fluctuating, the turnover rate can be extremely high.

So, you might wonder, why don't market makers widen the spread significantly to get better profits from each trade? This is the trade-off between turnover and P&L. Typically, market makers choose to execute trades more frequently, even if the profit per trade is small. For example, if the spread is set too high, you might not get a single order executed in a day. To maximize profit, market makers tend to favor high-frequency execution.

Thumbnail 280

Volatility is a very important factor in the pricing formula, so as a market maker, if we know the market is going to become highly volatile, we can widen the spread before the event occurs. There are many factors that affect market volatility. For example, suppose the FOMC is scheduled to discuss the federal funds rate next week. As market makers, we listen to the news and try to analyze how that news will impact the market as quickly as possible.

If the federal funds rate cut is more than expected, the market will rise. In that case, the market maker needs to revise their orders as quickly as possible. Otherwise, other market participants or competitors might take all the sell orders, resulting in a loss for the market maker.

All analysis must be done as quickly as possible. We are talking about perhaps just a few seconds to finish all the analysis, determine how the market will be affected, and take action in the market immediately.

Thumbnail 340

According to Chris Beauchamp of IG Group, the immediate effect of market-moving tweets by Trump usually lasts about 30 minutes. You probably know that Trump was tweeting a lot about tariffs a few months ago, but actually, it's not just Trump; Elon Musk is also a very good example. A few years ago, there was a period when Elon Musk kept tweeting about cryptocurrencies. Sometimes, when he would tweet about how much he liked a dog, the price of Dogecoin would rise immediately.

Thumbnail 390

Compared to traditional market news like the results of an FOMC meeting, Elon Musk's tweets are much harder to interpret. We know when FOMC meetings are held and when the results will be announced. Since the result is just a number regarding the interest rate, we know how to compare it. Depending on whether that number is higher or lower than market expectations, the market direction will be up or down.

However, in the world of digital assets, the situation can be a bit different. Taking Elon Musk as an example, his tweets might just be words. Today, he might say he likes a specific cryptocurrency very much, and another day, he might express an opinion about a different cryptocurrency and say it might not be very good. Interpreting tweets from key opinion leaders and influencers is one of the difficult tasks for market makers. This is because it is neither predictable nor numerical. You have to interpret the tweets intelligently.

Even if you try to make a manual judgment on a tweet, human judgment can sometimes take time to process. When incorporating this into the world of programmed or algorithmic trading, waiting for human intervention to determine whether a tweet or news will have an upward or downward impact on the market is unacceptable. That is why we need the help of LLMs to determine whether news will impact the market, and whether that news will have a positive or negative impact. Now, I would like to hand it over to David.

Thumbnail 510

Evolution of News Sentiment Analysis: From Dictionary Matching to LLMs, and Optimization of Inference Performance

Thank you, Wes. Before we dive into the solution, let's understand what came before it. In the industry, the initial approach to tackling this news sentiment analysis began with dictionary approaches or dictionary matching. Typically, you prepare industry sentiment vocabularies like 'bearish', 'bullish', or 'crash' and incorporate them into simple pattern-matching algorithms. However, as you can imagine, the problem here is that limited vocabularies cannot handle context well.

For example, if there was a news headline like 'Massive Short Liquidation Event', it would likely be classified as negative sentiment. However, in reality, it should be positive. The industry began to shift from dictionary matching to statistical matching and machine learning. Using labeled data and supervised learning, models like Naive Bayes or FinBERT are used in financial corpora. In this case, you get better generalization and can understand the context of the news. However, this requires training on massive amounts of labeled data, which means it is very costly in terms of both money and time to market for these solutions.

Nowadays, we all have Large Language Models and use transformer-based multimodal inference. Now, with these LLMs like Claude or DeepSeek, we can achieve context awareness even with minimal or no fine-tuning.

Thumbnail 630

We can reason about specific news headlines, and this is even possible for domain-specific events. For example, if a protocol exploit is exposed, you can ask an LLM with a reasoning model whether this has caused cross-chain impacts. This is the foundation of the agentic approach. However, with this LLM, inference performance is critical. Remember what Wes said earlier: this is news sentiment analysis in a market that moves dynamically within a very short timeframe. Since we need to react, we must optimize inference.

Thumbnail 660

Let me share the history of this initiative. Earlier this year, in February 2025, we started our deployment using SageMaker Jumpstart. When we ran it on P5EN instances, the result was 80 tokens of output per second. That was not enough. Later, in April 2025, we replaced it with vLLM. This allowed us to enable DeepSeek Multi-Token Prediction, mixed-precision linear attention, and distributed parallel processing together. As a result, we improved to 140 tokens of output per second. That was still not enough. In August, we replaced vLLM with SGLang, and with the help of speculative decoding, we finally achieved 180 tokens of output per second.

Now, why is this important? Imagine if there are 10,000 events per minute. Every millisecond of inference latency adds up. Improving from 80 to 180 means we can double our news ingestion processing within the same timeframe. With these optimizations, we can keep end-to-end latency within 10 seconds, avoiding the possibility of adverse selection.

Thumbnail 750

Implementing an Agentic News Analysis Platform: Deduplication and Fine-Tuning Embeddings

Now, let's talk about the implementation. Here is the architecture from day one. Looking from the bottom up, we continuously ingest news using a news streaming API, put it directly into an S3 bucket, and trigger events. This triggers a Lambda, which performs classification based on asset, urgency, and sentiment. This Lambda function triggers the DeepSeek model, which tags all these metadata into databases, including Aurora PostgreSQL and OpenSearch. We also utilize the Q CLI for the terminal, allowing traders and business analysts to interact with these news sources and query the back-end Claude LLM. For example, they can look up the latest news on Trump's announcements or what Elon Musk has been saying or posting on his X feed over the past 10 hours.

Thumbnail 820

However, there is a hidden challenge here. In the world of crypto-assets and digital assets, the same news gets reported 50 times. For example, news about an Ethereum upgrade delay appears everywhere—Twitter, Reddit, Discord, Telegram, and so on. And all within minutes. If we processed every duplicate with an expensive LLM, we would keep burning money and also worsen latency. Therefore, we have a separate deduplication pipeline to address this issue.

Thumbnail 850

First, as step 1, we calculate embeddings within the Lambda and call the embedding model BGE-M3. Then we perform a similarity check. If it is greater than 0.75, meaning it's a duplicate, we insert it into the OpenSearch duplicate collection and stop there to avoid wasting LLM tokens. If the similarity is less than 0.5, it means it is likely unique, so we check it against the unique collection and compare it with past news stored in OpenSearch to confirm that it is also historically unique. The third step is to proceed to analysis. If it is truly unique, a second Lambda makes a near-real-time prediction and attempts to implement spread expansion recommendations, asset impact assessment, and price fluctuation probability analysis.

In the final step, we generate a prediction report and send it to the trader desk via a Slack channel, allowing humans to decide whether to take action. However, there is a subtle point here. Generic embedding models are not very suitable for crypto-asset-specific duplicate detection. That is why fine-tuning the embedding is so important.

Thumbnail 940

Here is a scatter plot. It shows the results of testing an out-of-the-box BGE-M3 model with thousands of query-document pairs from crypto news. The green dots represent duplicate news articles. We want a high similarity score, ideally 0.75 or greater. The red dots indicate negative pairs, i.e., non-duplicate news articles, where we want a low score, ideally 0.5 or lower. The problem is the large overlap in the ambiguous middle zone between 0.5 and 0.75, shown in the orange zone. Therefore, we need to fine-tune it to get a better understanding.

Thumbnail 990

Here are the results after fine-tuning BGE-M3 with thousands of labeled crypto-asset news pairs. As you can see, the green and red dots are much further apart. The ambiguous middle zone is gone. There is a clean separation between 0.3 and 0.6. This is wonderful. We were able to fine-tune a small embedding model with only 560 million parameters. As for the language model, no fine-tuning is required, just prompt engineering. This is the power of the agentic architecture.

Thumbnail 1030

Thumbnail 1040

Thumbnail 1050

Thumbnail 1060

Thumbnail 1070

Now, let me show you a quick demo. On the right, you see where the trader desk is receiving news channels, and on the left, we are streaming news while the pipeline analyzes whether each is an important and impactful news item. The first thing you see is an SEC filing. This is not sent to the trader desk because, from the inference model's perspective, it does not contain signs of information that would move the market. This is not an important regulatory filing.

Thumbnail 1080

Thumbnail 1090

Thumbnail 1100

Moving on, we continue to ingest news and perform analysis. Still, this is classified as just routine news. When a new item comes in saying Trump has stated that China is becoming very hostile, this type of information is sent to the Telegram feed. Our pipeline identifies this as a highly impactful piece of news and sends it to the trader desk so the trader can decide whether to widen spreads to protect their portfolio.

Thumbnail 1120

This is the demo for today. And here are the key points we would like to share: Use agentic architectures instead of fine-tuning. This allows you to use general reasoning models like Claude for hierarchical task decomposition. As for specialized embedding layers, this approach provides more cost-effective results with a shorter time to market. You can eliminate bias through the architecture. You can teach the system how to reason about new events. Human-in-the-loop is still non-negotiable, but now you can use trader feedback loops to change the system over time. As a result, 24/7 real-time coverage is achieved under human supervision. That is all for today's sharing. I hope this was helpful. Thank you.

Discussion