Recap Series
- Recap 01: Coinbase re:Invent Recap (IND3312)
- Recap 02: Building the Future Trading Platform Leveraging AI and AWS
- Recap 03: Trading Innovation: Jefferies' AI Assistant on Amazon Bedrock (IND3315)
- Recap 04: How FSI Revolutionized HFT Analytics with Agentic AI (GBL302)
- Recap 05: Improving Distributed Systems with Amazon Time Sync Featuring Nasdaq
- Recap 06: Amazon Aurora HA and DR Design Patterns for Global Resilience (DAT442)
- Recap 07: Building Agentic AI: Amazon Nova Act and Strands Agents in Practice (DEV327)
- Recap 08: Deep Dive into Amazon Aurora and Its Innovations (DAT441)
- Recap 09: Deep dive on Amazon S3 (STG407)
- Recap 10: Nasdaq: Build Resilient Infrastructure for Global Financial Services (HMC327)
- Recap 11: What's New with AWS Lambda (CNS376)
- Recap 12: Spec-Driven Development with Kiro (DEV314)
- Recap 13: Amazon's finops: Cloud cost lessons from a global e-commerce giant (AMZ308)
- Recap 14: Tick to trade latency trading platforms on aws
Session Notes
Introduction
- Disclaimer: Views expressed are personal and not official AWS or affiliated organization positions. Informational purpose only, not financial or professional advice.
- Trading Ecosystem Overview
- Participants: Buyers and sellers place orders on exchanges.
- Market Liquidity: May lack sufficient liquidity.
- Role of Market Makers: Ensure continuous buy and sell orders, providing liquidity and counterparties.
- Order Book Abstraction
- Bid Orders (Left): Buyers' orders.
- Ask Orders (Right): Sellers' orders.
- Y-Axis: Cumulative size at each price level.
- Price Levels: Higher prices closer to the right-hand side.
- Market Maker's Daily Work
- Place multiple bid and ask orders.
- Risk Management: News or announcements can cause significant market movements.
- Inventory Management: Critical to avoid losses from sudden market shifts.
- Ideal Market Conditions for Market Makers
- Controlled Volatility: Small market swings.
- Quick Execution: Bid and ask orders executed rapidly.
- High Turnover Rate: Despite small profits per trade, high frequency of trades can lead to significant overall profit.
Market Maker Strategies and Volatility Factors
Spread and Profit Trade-Off
- Increasing Spread: Market makers may consider widening the spread for higher profit per trade.
- Trade-Off: Higher spreads may result in fewer executions, reducing overall profit.
- High Frequency Trading: Market makers often opt for frequent trades with smaller profits to maximize turnover.
- Volatility and Spread Adjustment
- Volatility Impact: Volatility is a key factor in pricing; market makers adjust spreads based on expected volatility.
- Event-Driven Volatility: Examples include FOMC meetings on Fed fund rates.
- Rapid Analysis and Action: Market makers must quickly analyze news and adjust orders to avoid losses.
- Examples of Market-Moving Events
- FOMC Meetings: Predictable events with known release times and outcomes.
- Social Media Influence: Unpredictable events like tweets from influential figures (e.g., Trump, Elon Musk) can cause immediate market reactions.
- Dogecoin Example: Elon Musk's tweets about cryptocurrencies can lead to rapid price changes, illustrating the unpredictability and difficulty in interpreting social media-driven news.
Challenges in Digital Asset Market Sentiment Analysis
Influencer Impact in Digital Assets
- Unpredictable Nature: Tweets from influencers like Elon Musk can rapidly impact cryptocurrency prices.
- Interpretation Difficulty: Tweets are often subjective and require intelligent interpretation.
- Speed of Analysis: Human judgment is too slow for real-time trading; automated solutions are necessary.
- Evolution of Sentiment Analysis Approaches
- Dictionary Approach: Initial method using industry lexicons (e.g., bearish, bullish) and pattern matching.
- Limitations:
- Limited vocabulary and poor context handling (e.g., misinterpreting "Massive Short liquidation event" as negative).
- Statistical Matching and Machine Learning:
- Transition to supervised learning with models like Naive Bayes or FinBERT.
- Advantages: Better generalization and context understanding.
- Challenges: Requires extensive labeled data, leading to high costs and longer time to market.
- Need for Advanced Solutions
- Real-Time Analysis: Necessity for rapid, automated sentiment analysis to keep up with market movements.
- Context Awareness: Solutions must accurately interpret context to provide reliable sentiment analysis.
Advancements in Sentiment Analysis with Large Language Models (LLMs)
Transformer-Based Multimodal Reasoning
- Modern LLMs like LLM, Claude, and DeepSeek enable context-aware sentiment analysis with minimal fine-tuning.
- Capable of reasoning on specific news titles and domain-specific events (e.g., protocol exploits).
- Inference Performance Optimization
- Critical for real-time sentiment analysis in dynamic markets with short time windows.
- Journey of Optimization:
- February 2025: Initial deployment using SageMaker Jumpstart on P5EN instances, achieving 80 output tokens per second.
- April 2025: Switched to VLLM, enabling multi-token predictions, mixed precision, linear attention, and distributed parallelism, boosting performance to 140 output tokens per second.
- August 2025: Replaced VLLM with SGLN, utilizing speculative decoding to achieve 180 output tokens per second.
- Importance of Optimization
- High Event Volume: With 10,000 events per minute, every millisecond of inference latency compounds.
- Doubling Processing Capacity: Increasing output tokens per second from 80 to 180 doubles news ingestion processing within the same time window.
- End-to-End Latency: Achieved under 10 seconds, avoiding adverse selection.
- Implementation Overview
- Day One Architecture: Initial setup and components used for deploying the optimized sentiment analysis solution.
Day One Architecture and Duplication Handling in Sentiment Analysis
Day One Architecture
- News Ingestion: News streaming API feeds data into an X-ray bucket, triggering a Lambda function for classification based on asset, urgency, and sentiment.
- Metadata Tagging: Lambda function triggers a deepseek model to tag metadata into databases like Aurora Prospects and OpenSearch.
- User Interaction: QCLI terminal allows traders and analysts to query news sources using LLMs like Claude for specific information (e.g., latest news on Trump announcements or Elon Musk's tweets).
- Duplication Challenge in Crypto News
- Issue: Same news reported multiple times across various platforms (Twitter, Reddit, Discord, Telegram) within minutes.
- Cost and Latency: Processing every duplicate through expensive LLMs increases costs and latency.
Duplication Pipeline
Step 1: Embeddings
- Calculate embeddings in Lambda using embedding models like VGEM3.
- Step 2: Similarity Check:
- If similarity > 0.75: Mark as duplicate and insert into duplicated collections in OpenSearch to avoid processing.
- If similarity < 0.5: Likely unique; check against unique collections in OpenSearch for historical news.
- Step 3: Analysis:
- If truly unique, perform near real-time predictions, spread widening recommendations, asset impact assessment, and price movement probability.
- Step 4: Generate Prediction Report:
- Send a report to the trader deck select channel for human decision on action.
Fine-Tuning Embeddings
- Generic embedding models may not effectively handle crypto-specific duplicates.
- Importance of Fine-Tuning: Illustrated by a scatter plot showing the performance of an out-of-the-box BGEM3 on thousands of query document pairs from crypto news.
Fine-Tuning Embeddings and Agentic Architectures
Initial Scatter Plot
- Green Dots: Duplicate news articles with high similarity scores (>0.75).
- Red Dots: Non-duplicate news articles with low similarity scores (<0.5).
- Muddy Middle (Orange): Overlap between 0.5 and 0.75 indicating ineffective separation.
- Fine-Tuned BGEM3:
- After fine-tuning on thousands of labeled crypto news articles, clear separation between green and red dots.
- Clean separation between 0.3 to 0.6 similarity scores, eliminating the muddy middle.
- Fine-tuned tiny embedding models with 560 million parameters.
- Agentic Architectures and Prompt Engineering
- No need for fine-tuning LLMs; prompt engineering suffices.
- Power of Agentic Architectures:
- Hierarchical task decomposition using general reasoning models like Cock.
- Specialized embedding layer for cost-effective and faster time-to-market results.
- Bias elimination through architecture.
- Teaching system to reason about novel events.
- Quick Demo
- Trader Decks: Right-hand side shows news channels.
- Left-hand side: Streaming news analyzed by the pipeline.
- Examples:
- SEC filings: Analyzed but not sent to traders as not market-moving.
- Routine news: Classified as non-impactful.
- Impactful news: E.g., Trump's tweet about China becoming hostile, identified as impactful and sent to traders for decision on spread adjustment.
- Key Takeaways
- Use of agentic architectures over fine-tuning.
- Hierarchical task decomposition with general reasoning models.
- Specialized embedding layer for cost-effectiveness and faster results.
- Human-in-the-loop with trader feedback loop for continuous system improvement.
- 24/7 real-time coverage with human oversight.
Digital Asset Market Makers Using AWS Macro Services for Agentic News Analysis
Disclaimer: Views expressed are personal and not official AWS or affiliated organization
positions. Informational purpose only, not financial or professional advice.
Trading Ecosystem Overview
Participants: Buyers and sellers place orders on exchanges. Market Liquidity: May lack sufficient liquidity. Role of Market Makers: Ensure continuous buy and sell orders, providing liquidity and counterparties.
Order Book Abstraction
Bid Orders (Left): Buyers' orders. Ask Orders (Right): Sellers' orders. Y-Axis: Cumulative size at each price level. Price Levels: Higher prices closer to the right-hand side.
Market Maker's Daily Work
Place multiple bid and ask orders. Risk Management: News or announcements can cause significant market movements. Inventory Management: Critical to avoid losses from sudden market shifts.
Ideal Market Conditions for Market Makers
Controlled Volatility: Small market swings. Quick Execution: Bid and ask orders executed rapidly. High Turnover Rate: Despite small profits per trade, high frequency of trades can lead to significant overall profit.
Market Maker Strategies and Volatility Factors
Spread and Profit Trade-Off
- Increasing Spread: Market makers may consider widening the spread for higher profit per
- Trade-Off: Higher spreads may result in fewer executions, reducing overall profit. trade.
- High Frequency Trading: Market makers often opt for frequent trades with smaller profits to maximize turnover.
Volatility and Spread Adjustment
- Volatility Impact: Volatility is a key factor in pricing; market makers adjust spreads based on
- Event-Driven Volatility: Examples include FOMC meetings on Fed fund rates. expected volatility.
- Rapid Analysis and Action: Market makers must quickly analyze news and adjust orders to avoid losses.
Examples of Market-Moving Events
- FOMC Meetings: Predictable events with known release times and outcomes.
- Social Media Influence: Unpredictable events like tweets from influential figures (e.g., Trump,
- Dogecoin Example: Elon Musk's tweets about cryptocurrencies can lead to rapid price Elon Musk) can cause immediate market reactions.
changes, illustrating the unpredictability and difficulty in interpreting social media-driven news.
Challenges in Digital Asset Market Sentiment Analysis
Influencer Impact in Digital Assets
- Unpredictable Nature: Tweets from influencers like Elon Musk can rapidly impact
- Interpretation Difficulty: Tweets are often subjective and require intelligent interpretation. cryptocurrency prices.
- Speed of Analysis: Human judgment is too slow for real-time trading; automated solutions are necessary.
Evolution of Sentiment Analysis Approaches
- Dictionary Approach: Initial method using industry lexicons (e.g., bearish, bullish) and pattern
- Limitations: Limited vocabulary and poor context handling (e.g., misinterpreting "Massive matching.
Short liquidation event" as negative).
Statistical Matching and Machine Learning
- Transition to supervised learning with models like Naive Bayes or FinBERT.
- Advantages: Better generalization and context understanding.
- Challenges: Requires extensive labeled data, leading to high costs and longer time to market.
Need for Advanced Solutions
- Real-Time Analysis: Necessity for rapid, automated sentiment analysis to keep up with
- Context Awareness: Solutions must accurately interpret context to provide reliable sentiment market movements.
analysis.
Advancements in Sentiment Analysis with Large Language Models (LLMs)
Transformer-Based Multimodal Reasoning
- Modern LLMs like LLM, Clock, and DeepSeek enable context-aware sentiment analysis with minimal fine-tuning.
- Capable of reasoning on specific news titles and domain-specific events (e.g., protocol exploits).
Inference Performance Optimization
- Critical for real-time sentiment analysis in dynamic markets with short time windows.
Journey of Optimization:
- February 2025: Initial deployment using SageMaker Jumpstart on P5EN instances,
- April 2025: Switched to VLLM, enabling multi-token predictions, mixed precision, linear achieving 80 output tokens per second.
- August 2025: Replaced VLLM with SGLN, utilizing speculative decoding to achieve 180 attention, and distributed parallelism, boosting performance to 140 output tokens per second.
output tokens per second.
Importance of Optimization
- High Event Volume: With 10,000 events per minute, every millisecond of inference latency
- Doubling Processing Capacity: Increasing output tokens per second from 80 to 180 doubles compounds.
- End-to-End Latency: Achieved under 10 seconds, avoiding adverse selection. news ingestion processing within the same time window.
Implementation Overview
- Day One Architecture: Initial setup and components used for deploying the optimized sentiment analysis solution.
Day One Architecture and Duplication Handling in Sentiment Analysis
Day One Architecture
- News Ingestion: News streaming API feeds data into an X-ray bucket, triggering a Lambda
- Metadata Tagging: Lambda function triggers a deepse model to tag metadata into databases function for classification based on asset, urgency, and sentiment.
- User Interaction: QCLI terminal allows traders and analysts to query news sources using like Aurora Prospects and OpenSearch.
LLMs like Clock for specific information (e.g., latest news on Trump announcements or Elon
Musk's tweets).
Duplication Challenge in Crypto News
- Issue: Same news reported multiple times across various platforms (Twitter, Reddit, Discord,
- Cost and Latency: Processing every duplicate through expensive LLMs increases costs and Telegram) within minutes.
latency. Duplication Pipeline
- Step 1: Embeddings
Calculate embeddings in Lambda using embedding models like VGEM3.
- Step 2: Similarity Check:
If similarity > 0.75: Mark as duplicate and insert into duplicated collections in OpenSearch to If similarity < 0.5: Likely unique; check against unique collections in OpenSearch for avoid processing.
- Step 3: Analysis: historical news.
If truly unique, perform near real-time predictions, spread widening recommendations, asset
- Step 4: Generate Prediction Report: impact assessment, and price movement probability.
Send report to trader deck select channel for human decision on action. Fine-Tuning Embeddings
- Generic embedding models may not effectively handle crypto-specific duplicates.
- Importance of Fine-Tuning: Illustrated by a scatter plot showing the performance of an out-of-the-box BGEM3 on thousands of query document pairs from crypto news.
🔧 Fine-Tuning Embeddings and Agentic Architectures
Initial Scatter Plot:
- Green Dots: Duplicate news articles with high similarity scores (>0.75).
- Red Dots: Non-duplicate news articles with low similarity scores (<0.5).
- Muddy Middle (Orange): Overlap between 0.5 and 0.75 indicating ineffective separation.
Fine-Tuned BGEM3:
- After fine-tuning on thousands of labeled crypto news articles, clear separation between
- Clean separation between 0.3 to 0.6 similarity scores, eliminating the muddy middle. green and red dots.
- Fine-tuned tiny embedding models with 560 million parameters.
Agentic Architectures and Prompt Engineering
- No need for fine-tuning LLMs; prompt engineering suffices.
Power of Agentic Architectures:
- Hierarchical task decomposition using general reasoning models like Cock.
- Specialized embedding layer for cost-effective and faster time-to-market results.
- Bias elimination through architecture.
- Teaching system to reason about novel events.
Quick Demo
- Trader Decks: Right-hand side shows news channels.
- Left-hand side: Streaming news analyzed by the pipeline.
- Examples:
SEC filings: Analyzed but not sent to traders as not market-moving. Routine news: Classified as non-impactful. Impactful news: E.g., Trump's tweet about China becoming hostile, identified as impactful and sent to traders for decision on spread adjustment.
Key Takeaways
- Use of agentic architectures over fine-tuning.
- Hierarchical task decomposition with general reasoning models.
- Specialized embedding layer for cost-effectiveness and faster results.
- Human-in-the-loop with trader feedback loop for continuous system improvement.
- 24/7 real-time coverage with human oversight.
AWS re:Invent recap (GBL302)
Agentic News Analysis for Digital Asset Market Makers Using AWS Macro Services
Disclaimer: The views expressed are personal and do not represent the official position of AWS or any affiliated organization. This content is for informational purposes only and does not constitute financial or professional advice.
Trading Ecosystem Overview
- Participants: Buyers and sellers place orders on exchanges.
- Market liquidity: Sufficient liquidity may be unavailable.
- Role of market makers: Maintain continuous buy and sell orders while providing liquidity and counterparties.
Order Book Abstraction
- Bid orders (left): Buyers' orders.
- Ask orders (right): Sellers' orders.
- Y-axis: Cumulative size at each price level.
- Price levels: Higher prices appear closer to the right.
Market Makers' Daily Work
- Place multiple bid and ask orders.
- Risk management: News or announcements can cause significant market movements.
- Inventory management: Critical for avoiding losses from sudden market changes.
Ideal Market Conditions for Market Makers
- Controlled volatility: Small market swings.
- Quick execution: Bid and ask orders execute rapidly.
- High turnover: Despite small profits per trade, frequent trading can generate significant overall profit.
Market Maker Strategies and Volatility Factors
Spread and Profit Trade-Off
- Increasing the spread: Market makers may widen spreads to earn more profit per trade.
- Trade-off: Wider spreads may result in fewer executions and lower overall profit.
- High-frequency trading: Market makers often choose frequent trades with smaller profits to maximize turnover.
Volatility and Spread Adjustment
- Volatility impact: Volatility is a key pricing factor, and market makers adjust spreads according to expected volatility.
- Event-driven volatility: One example is the effect of FOMC meetings on the federal funds rate.
- Rapid analysis and action: Market makers must quickly analyze news and adjust orders to avoid losses.
Examples of Market-Moving Events
- FOMC meetings: Predictable events with known release times and anticipated outcomes.
- Social media influence: Unpredictable events, such as posts from influential figures like Donald Trump or Elon Musk, can cause immediate market reactions.
- Dogecoin example: Elon Musk's cryptocurrency posts can cause rapid price changes, illustrating how difficult social-media-driven news is to predict and interpret.
Challenges in Digital Asset Market Sentiment Analysis
Influencer Impact on Digital Assets
- Unpredictability: Posts from influencers such as Elon Musk can rapidly affect cryptocurrency prices.
- Interpretation difficulty: Posts are often subjective and require intelligent interpretation.
- Speed of analysis: Human judgment is too slow for real-time trading, so automated solutions are necessary.
Evolution of Sentiment Analysis Approaches
- Dictionary approach: An initial method using industry vocabulary, such as bearish and bullish, with pattern matching.
- Limitations: Restricted vocabulary and poor context handling can, for example, misinterpret a "massive short liquidation event" as negative.
Statistical Matching and Machine Learning
- Moves to supervised learning with models such as Naive Bayes or FinBERT.
- Advantage: Better generalization and contextual understanding.
- Challenge: Requires extensive labeled data, leading to high costs and a longer time to market.
Need for Advanced Solutions
- Real-time analysis: Fast, automated sentiment analysis is needed to keep pace with market movements.
- Context awareness: Solutions must interpret context accurately to provide reliable sentiment analysis.
Advances in Sentiment Analysis with Large Language Models (LLMs)
Transformer-Based Multimodal Reasoning
- Modern LLMs such as LLM, Clock, and DeepSeek enable context-aware sentiment analysis with minimal fine-tuning.
- They can reason about specific news headlines and domain-specific events, such as protocol exploits.
Inference Performance Optimization
- Real-time sentiment analysis is essential in dynamic markets with short time windows.
Optimization journey:
- February 2025: Initial deployment with SageMaker JumpStart on P5EN instances achieved 80 output tokens per second.
- April 2025: Switching to VLLM enabled multi-token prediction, mixed precision, linear attention, and distributed parallelism, increasing performance to 140 output tokens per second.
- August 2025: Replacing VLLM with SGLN and using speculative decoding achieved 180 output tokens per second.
Importance of Optimization
- High event volume: At 10,000 events per minute, every millisecond of inference latency accumulates.
- Doubled processing capacity: Increasing output throughput from 80 to 180 tokens per second doubles news-ingestion processing within the same time window.
- End-to-end latency: Achieved latency below 10 seconds, avoiding adverse selection.
Implementation Overview
- Day-one architecture: The initial setup and components used to deploy the optimized sentiment analysis solution.
Day-One Architecture and Duplicate Handling in Sentiment Analysis
Day-One Architecture
- News ingestion: A news-streaming API sends data to an X-ray bucket and triggers a Lambda function to classify it by asset, urgency, and sentiment.
- Metadata tagging: The Lambda function invokes a deepse model to tag metadata in databases such as Aurora Prospects and OpenSearch.
- User interaction: A QCLI terminal allows traders and analysts to query news sources with LLMs such as Clock for specific information, including the latest news about Trump announcements or Elon Musk posts.
Duplicate News Challenge
- Problem: The same news may be reported repeatedly across Twitter, Reddit, Discord, and Telegram within minutes.
- Cost and latency: Sending every duplicate through expensive LLMs increases both cost and latency.
Deduplication Pipeline
- Step 1—Embeddings: Calculate embeddings in Lambda with an embedding model such as VGEM3.
- Step 2—Similarity check:
- Similarity > 0.75: Mark the item as a duplicate and insert it into the duplicate collection in OpenSearch to avoid processing.
- Similarity < 0.5: Treat the item as likely unique and compare it with the unique collection in OpenSearch for historical news.
- Step 3—Analysis: If the item is genuinely unique, perform near-real-time prediction, recommend spread widening, assess asset impact, and calculate price-movement probability.
- Step 4—Prediction report: Send the report to the trader deck selection channel for a human decision.
Fine-Tuning Embeddings
- Generic embedding models may not handle crypto-specific duplicates effectively.
- A scatter plot illustrates the out-of-the-box performance of BGEM3 across thousands of query-document pairs from crypto news and demonstrates the importance of fine-tuning.
Fine-Tuning Embeddings and Agentic Architectures
Initial Scatter Plot
- Green dots: Duplicate news articles with high similarity scores (> 0.75).
- Red dots: Non-duplicate news articles with low similarity scores (< 0.5).
- Muddy middle (orange): Overlap between 0.5 and 0.75 indicates ineffective separation.
Fine-Tuned BGEM3
- Fine-tuning on thousands of labeled crypto news articles clearly separates the green and red points.
- Clean separation between similarity scores of 0.3 and 0.6 eliminates the muddy middle.
- The fine-tuned small embedding model has 560 million parameters.
Agentic Architectures and Prompt Engineering
- LLM fine-tuning is unnecessary; prompt engineering is sufficient.
The power of agentic architectures:
- Hierarchical task decomposition using general reasoning models such as Cock.
- A specialized embedding layer for cost-effective results and faster time to market.
- Bias reduction through architecture.
- Teaching the system to reason about novel events.
Quick Demo
- Trader deck: News channels appear on the right.
- Left side: Streaming news analyzed by the pipeline.
- Examples:
- SEC filings: Analyzed but not sent to traders because they were not market-moving.
- Routine news: Classified as non-impactful.
- Impactful news: For example, a Trump post about China becoming hostile was identified as impactful and sent to traders to decide whether to adjust spreads.
Key Takeaways
- Use agentic architectures instead of fine-tuning.
- Apply hierarchical task decomposition with general reasoning models.
- Use a specialized embedding layer for cost-effectiveness and faster results.
- Keep humans in the loop through trader feedback for continuous system improvement.
- Provide 24/7 real-time coverage with human oversight.
