bio_img_deep-learning

Artificial Intelligence

Apply machine learning and deep learning

MATLAB MCP servers to develop and deploy a quant agent

This Monday, we are releasing the new MCP framework for MATLAB Production Server on GitHub:
https://github.com/matlab/mcp-framework-matlab-production-server
Guest Writer: Lawrence Johny
To demonstrate this new feature, I've collaborated with my dear colleague Lawrence Johny. Lawrence is an application engineer working with our Finance customers, quants, asset managers, and economists in Europe. He presented in September how customers in Finance can leverage AI assisted coding, in their software dev workflow, like testing and documentation.
Building on the previous blog on MATLAB MCP Core Server introducing the Model Context Protocol (MCP) – a standard to integrate into agentic workflows, Lawrence is exploring how to simplify the development and deployment of AI agents with the use of natural language – no glue code required.
Before I let Lawrence dive into the process of developing his quant agent, let me demo to you the result of calling his agent from Claude Desktop (I’m not an expert in Finance!)
 

Quant agent in action

 
"Given a 10-year investment horizon, how should portfolio aggressiveness be adjusted each year to achieve the target objective?"
I asked my quant agent this question in plain English. Within seconds, it simulated scenarios, adjusted aggressiveness dynamically, and returned a plot showing the probability of hitting that goal - without me writing a single line of glue code.
Let’s look at a simulation of the portfolio of 100 USD with an objective of 200 USD:
 
The simulation shows that adjusting portfolio aggressiveness significantly improves the probability of reaching that target. Based on the results, the simulated ending wealth ranges from a minimum of 228.04 USD to a maximum of 502.52 USD.
 

MCP: the magic behind agentic integrations

The magic behind this workflow lies in MCP servers. During development, the MATLAB MCP Core server gives you an interactive environment to prototype and test functions quickly. When it’s time to scale, the MATLAB Production Server takes over, hosting compiled MATLAB functions and exposing them as MCP tools through web handlers. This means the same logic you tested locally can run in a secure, multi-user production setting.
Why does MCP matter? It provides a standardized interface for AI assistants, creating a seamless path from local debugging to enterprise-grade deployment.
To build your quant agent, start by wrapping the Goal-Based Wealth Management model in a MATLAB function. Test it locally. Once validated, compile it into a CTF package and deploy on MATLAB Production Server, where web handlers make it accessible to multiple users or accessible via websites such as chatgpt.com, chat.mistral.com or claude.ai or any other LLM provider.
MCP servers make natural-language quant modeling practical – from prototype to production. Ready to try? Start by wrapping your first MATLAB model and deploying it on MATLAB Production Server. Your agent is just a prompt away!
 
|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.