Automated Trading Strategies
Automated Trading Strategies Podcast
AI and Agentic Workflows in Algorithmic Trading Systems (Part 2)
0:00
Current time: 0:00 / Total time: -17:04
-17:04

Paid episode

The full episode is only available to paid subscribers of Automated Trading Strategies

AI and Agentic Workflows in Algorithmic Trading Systems (Part 2)

Unearthing Alpha: The Race Is On

Important: There is no guarantee that ATS strategies will have the same performance in the future. I use backtests and forward tests to compare historical strategy performance. Backtests are based on historical data, not real-time data so the results shared are hypothetical, not real. Forward tests are based on live data, however, they use a simulated account. Any success I have with live trading is untypical. Trading futures is extremely risky. You should only use risk capital to fund live futures accounts and if you do trade live, be prepared to lose your entire account. There are no guarantees that any performance you see here will continue in the future. This is for educational purposes only. I recommend using ATS strategies in simulated trading until you/we find the holy grail of trade strategy.


I am looking for a few people to help refine Strategy 91: Applying Complex Systems Theory to Automated Trading. Please let me know if you have any interest.


Some Context…

Around the early 2010s, companies like Orbital Insight and RS Metrics began analyzing satellite photos at scale. They initially focused on counting cars in big-box retailer parking lots—think Walmart or Home Depot—to predict foot traffic before quarterly earnings were released. Oil traders also latched onto this technique by monitoring the shadows cast by oil storage tanks, which provided a hint as to how full the tanks really were. Meanwhile, agriculture-focused outfits such as Descartes Labs and Tellus Labs used similar images to assess farmland health and crop yields.

At first, hedge funds enjoyed a near-exclusive edge. They could, for example, spot surging consumer traffic or unexpectedly high oil inventories days or even weeks before traditional government reports confirmed the trends. By 2016 numerous data providers were packaging these same metrics. The imagery—once a carefully guarded secret—became widely available, so the signal became less unique. At that point, any firm wanting an edge had to develop proprietary algorithms and special insights rather than rely on the data alone.

Even before satellite imagery hit the mainstream, a small group of macro traders began leveraging the Automatic Identification System (AIS), which large vessels use to broadcast their positions and routes. By 2008, hedge funds realized these shipping signals could offer a powerful early read on global trade. By the early 2010s it had become a standard component of professional research rather than a ‘secret weapon’.

These examples illustrate a life cycle common to many alternative data sources, especially if they are the product of new technology. Over the past two decades, hedge funds and proprietary trading firms have tapped into even more creative and granular sources of information to gain an edge and now they’re doing it with AI agents.

If we scale back and look at this along a timeline, the pattern seems to be: 1) new technology creates new data streams, 2) early adopters find unique signals, 3) the advantage exists until wider adoption, and then 4) the market becomes efficient. So there’s an arms race of sorts going on right now among traders and unlike the early 2010s, you don’t need teams of analysts to get in the race. AI agents allow you to create your own team of agentic analysts.

Whether you're a trader or tech enthusiast, or simply curious about how AI is shaping our future, you're in the right place. Part 1 of this series was an introduction to AI agents. In Part 2, we talk about some best practices for agentic workflow. It isn’t just about the agentic ‘goal’, it’s about using the best workflow to meet that goal.

Agentic Workflows & Goals

There's a difference between agentic workflows and goals. They are usually fused together, but it’s helpful to think about them as separate parts: both are important to the development of an accurate and cost efficient AI agent.

When I say workflow, what do I mean?

Here’s one example that shows data coming from data sources (Yahoo Finance, Options Data and RSS Feeds), flowing into some data aggregators, and then on to LLMs for analysis and signal generation:

This is a generalized overview of agentic workflow, but it doesn’t really take the agent’s goal into consideration.

Anthropic, the creator of the LLM Claude, recently published one of my favorite overviews on agentic workflows titled: Building Effective Agents. It contains several examples of different workflow “types” and when to use them.

This is an example of a workflow referred to as “Prompt Chaining”:

Prompt chaining decomposes a task into a series of steps or modules, where each LLM processes the output of the previous one.

This is useful for decomposing a goal into smaller tasks.

And this is an example of the routing workflow:

Routing classifies an input and directs it to a follow-up task. This workflow allows for separation of task which can to build more specialized prompts.

Routing is useful for when you have a complex goal that might be handled better by multiple LLMs. You may want to route easy questions to ChatGPT4 and harder questions to the o1 model. Or you may use the o1 model for analysis, Claude 3.5 for evaluation, and Gemini for validation. This could help to optimize costs and speed—not every question needs the latest model.

Here’s an example of the parallelization workflow which might be used when there’s a need for several perspectives on the same piece of data.

Here’s one of my favorite, the evaluator-optimizer workflow:

This is great for validating and auditing generated data because in general, agents are better at evaluating data than generating it. It is especially useful between two agents with the same or similar goals.

All of these show different ways of pulling data together, processing the data and then sending that data on for analysis or evaluation in an effort to reach a goal.

Now let’s talk about getting the “goal” right because it’s critical—personally, I think it’s more important (and difficult to create) than the workflow. It involves knowing the output that you want and crafting that request into the most effective prompt.

Agentic Goals: Unearthing Alpha

The following are just a few examples of the creative goal oriented workflows that are allowing traders and hedge funds to unearth alpha from new data, manage risk more proactively, and better justify decisions in a world where regulatory scrutiny and complexity are ever-growing:

This post is for paid subscribers