AI - Building a Real-Time FOREX Position Risk Manager with VLLM, AWS, and Bedrock

A behind-the-scenes look at how internal FOREX trading teams can use large language models (LLMs) to answer questions about customer onboarding, trades, and currency risk - served in real time using VLLM and AWS.

Introduction

A behind-the-scenes look at how internal FOREX trading teams can use large language models (LLMs) to answer questions about customer onboarding, trades, and currency risk — served in real time using VLLM and AWS.

What Kind of AI Agent Are We Building in This Post?

This blog post covers the foundation of a chat-based AI assistant for internal FOREX traders and operations teams.

  • Built to respond in real time to complex questions

  • Trained to understand user roles and limit access to only their assigned books and customers

  • Designed to extend easily into future voice input or document-based workflows

  • Operates within enterprise-grade security and latency requirements

This is not a general chatbot. It’s a task-specific, scoped, and high-performance agent for decision-makers in FOREX risk management.

Business Context

FOREX trading desks manage fast-moving, high-value currency trades across global markets. Each trader or operations user works on specific books and manages customers with different risk profiles, trade types, and compliance needs.

They need to:

  • Instantly access relevant data

  • Get summarized risk, exposure, and trade answers

  • Ask questions in natural language without learning a new interface

  • Only see the data they’re authorized for

Instead of clicking through dashboards or writing SQL queries, they simply ask:

“What’s my GBP/USD exposure today?”
“Did Cust104 complete onboarding for options?”
“Who added trades over $10M this morning?”

To enable this, we use LLMs deployed with VLLM for high-speed inference and AWS Bedrock for secure enterprise integrations.

Users

Trader

Responsible for managing positions, executing trades, and monitoring book-level performance.

Risk Analyst

Oversees overall exposure, compliance thresholds, market shifts, and forward-looking simulations.

Onboarding and Compliance Ops

Manages KYC, AML, and internal approval workflows for new or updated customers.

Their Needs

Trader Prompts (30+ Examples)

  1. What’s my EUR/USD exposure today?

  2. List customers trading USD/INR in the last 24 hours.

  3. Show all spot trades over $10 million.

  4. Did anyone open a GBP forward contract today?

  5. Summarize book-level trade volume this week.

  6. Which customers have unhedged positions?

  7. What is my current margin requirement?

  8. Show mark-to-market values by customer.

  9. Who traded the most JPY options today?

  10. Compare today’s exposure with yesterday’s.

  11. Are all trades in the FX-G10 book within limits?

  12. Show active positions set to expire this week.

  13. Who has the largest risk in USD/CHF?

  14. What is my unrealized gain or loss in FX-EM?

  15. Which customers opened EUR/JPY trades?

  16. Give me my top 5 risk contributors today.

  17. Show new trades from Cust104.

  18. List books where USD exposure increased.

  19. Who placed the most leveraged trade today?

  20. Did anyone trade during the Tokyo session?

  21. What’s the average position size today?

  22. Which book has the highest open interest?

  23. Who added or closed positions today?

  24. Compare FX-G10 and FX-EM performance.

  25. What’s the total exposure to Latin American currencies?

  26. Identify customers breaching internal risk policy.

  27. Show my desk’s net exposure by currency.

  28. Who canceled trades today?

  29. Show open forward contracts by maturity.

  30. List all options exercised today.

Risk Analyst Prompts (30+ Examples)

  1. List customers over VAR threshold.

  2. Show current exposure by trading desk.

  3. Who’s carrying risk over the weekend?

  4. Compare risk limits with actual exposure.

  5. Who received a margin call today?

  6. Summarize today’s risk alerts.

  7. Show books with leverage > 5x.

  8. Which currencies had the largest position delta?

  9. Identify books impacted by USD volatility.

  10. Show all positions tied to external events.

  11. Which customers have highly correlated positions?

  12. List trades triggering compliance warnings.

  13. Who added high-risk exotic currency positions?

  14. Show position decay trends over the last 7 days.

  15. Which books would be affected by a Fed rate change?

  16. What are the most volatile books right now?

  17. Highlight trades not fully collateralized.

  18. Identify risk clusters by customer type.

  19. Show the delta of options by currency.

  20. Forecast exposure in case of 100bps USD move.

  21. Who is operating near their credit limit?

  22. Are any VAR models out of tolerance?

  23. Show drawdown trends by region.

  24. Highlight suspicious trade patterns.

  25. Show risk-weighted exposure by sector.

  26. What would happen if EUR drops 2%?

  27. Identify gaps in risk coverage.

  28. Show customer concentration risk.

  29. What’s the exposure to Chinese Yuan?

  30. List traders with over-limit activity.

Onboarding and Compliance Ops Prompts (30+ Examples)

  1. Who is pending onboarding?

  2. Show onboarding timeline for Cust302.

  3. Who passed AML but failed credit check?

  4. List customers cleared for spot but not options.

  5. Who has missing tax documentation?

  6. Show onboarding SLAs per region.

  7. List all KYC documents still pending.

  8. Who was manually approved?

  9. Which accounts are in review?

  10. Show the average onboarding time.

  11. List high-risk customers approved this week.

  12. Identify duplicates in onboarding logs.

  13. Who missed the onboarding deadline?

  14. Which customers are waiting on legal review?

  15. Show latest onboarding comments.

  16. Who is cleared for forwards only?

  17. Who failed sanction screening?

  18. Show onboarding health by book.

  19. List customers needing updated docs.

  20. Show margin agreement status by customer.

  21. Who is blocked from trading today?

  22. Show onboarding dropouts.

  23. List all customers in FX-G10 book with incomplete KYC.

  24. Who had risk override approved manually?

  25. Which customers were escalated to compliance?

  26. Who is restricted to specific currency pairs?

  27. Show approval workflow logs for Cust1005.

  28. Identify customers without ID verification.

  29. Show time to trade approval per customer.

  30. List onboarding cases reopened after closure.

Tech Stack

Layer

Tools

Auth & Roles

AWS Cognito

API Gateway

Lambda + FastAPI

LLM Inference

VLLM (on G5 spot) and AWS Bedrock

Models

Claude, Titan, LLaMA, Mixtral, T5

Storage

S3 + Parquet + Athena

Mapping

DynamoDB

Caching

Redis (ElastiCache)

Monitoring

CloudWatch + Prometheus

Prompt Access Control

Each user’s JWT token includes:

{ "user_id": "trader_jane", "books": ["FOREX-G10", "FOREX-EM"], "customers":["Cust123", "Cust401"] }

The agent injects context automatically:

System prompt: You are assisting a FOREX trader responsible for FOREX-G10 and FOREX-EM books. Only use data for Cust123 and Cust401. User prompt: Show my currentEUR/CHF risk.

Cost Optimization Strategies

Component

Optimization

GPU Hosting

G5 Spot with autoscaling

Model Routing

Use Haiku/Titan for standard Q&A, Sonnet for heavy prompts

RAG Indexing

Nightly refresh only

Storage

S3 (Parquet) with Athena instead of Redshift

Prompt Caching

Redis for high-frequency prompts

Blog Post Value Proposition

This blog post helps you:

– Build a real-time chat-based assistant for FOREX trading desks

– Serve scoped LLM answers to hundreds of trader and ops queries

– Use VLLM and Bedrock to deliver fast, scalable responses

– Maintain strict access control at the prompt level

– Optimize cost using AWS-native strategies