
By Carlos Velasco
This content is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities or cryptocurrencies. Any strategies discussed are illustrative only and may not be suitable for all investors. This article reflects the experience of an individual user, is not representative of all customers, and should not be considered an endorsement or guarantee of future performance. The views and opinions expressed are those of the author and do not reflect or represent the views and opinions of Alpaca. Alpaca does not recommend any specific securities or investment strategies.The author was not compensated for this content but did receive nominal promotional items from Alpaca.
AI Trading Hype
If you’ve been on X recently, you’ve probably seen it.
Online discussions often feature claims of agents making money overnight or discovering 'alpha.'
I’ve been building in fintech for years, and every time a wave like this appears, I get the same question stuck in my head:
Is this real, or are we just watching a new version of the same old hype?
So instead of debating it, I decided to test it myself.
Not by asking an agent to trade for me, but by trying to understand where AI actually adds value in trading.
The Problem With Most “AI Trading Agents”
The first thing that became obvious is that most “AI trading agents” people talk about today are not really systems. They are prompts asking about what to invest and hope the LLM’s knowledge is enough to build a strategy. Also, you can connect to the OpenAI API and ask to fetch data, generate opinions, sometimes even execute trades, but it lacks something fundamental: an understanding of how these models actually work.
LLMs are probabilistic machines that use trained models to predict the next token based on patterns learned from large datasets. They don’t “understand” the market or optimize for profit; they generate responses that are statistically likely given the input.There is no validation layer. No deterministic logic. No real understanding of risk. And most importantly, no process for testing whether an idea makes sense before money is involved.
That’s where things break because If you’re using a probabilistic model to decide when to buy and sell without understanding the logic behind it, you’re doing exactly what every piece of trading advice tells you to avoid, you’re gambling. It might look sophisticated because it’s powered by AI, but without a real strategy or validation, you’re still just placing bets, not making informed decisions.
Where AI Actually Adds Value
This is where I think the framing needs to change.
We should not be asking AI to trade just because we want an autonomous money printer. In my experience, AI has been most useful as a research assistant for exploring and structuring trading hypotheses more efficiently.
Instead of using AI to make trading decisions, I used it to help organize questions, translate ideas into testable rules, and speed up the research process.I began experimenting with agents like Codex, Claude, and OpenClaw. The goal was not to get a prediction, but to force the model to think in terms of trading logic: indicators, conditions, thresholds, market context, and failure cases.
For example, instead of asking “what should I buy?”, I would ask:
- “Analyze historical periods of large ETH drawdowns and summarize recurring patterns that could be studied further.”
- “Outline a hypothesis using RSI and volatility compression, and identify the assumptions and limitations that should be tested.”
The agent translates vague ideas into something more tangible: indicators, thresholds, conditions, and constraints. It gives you a first version of a strategy you can actually work with.
That's what I found most useful.
Why Alpaca
The next step is where most people stop, not because it’s impossible, but because it becomes overwhelming. You suddenly need to understand programming, connect to APIs, learn what technical trading even means, and figure out how to turn an idea into a real strategy. This is where things actually start to matter, and also where most people drop off.For my workflow, I chose Alpaca because it provided access to market data and paper trading that fit my development process.
An idea generated by an agent could be backtested, then deployed into paper trading, observed in real time, and fed back into the system for improvement.
That made it easier to take an idea from an initial hypothesis into backtesting and paper trading, then review the results and iterate on the original assumptions.
That closed the loop in a practical way.
Turning Ideas Into Real Strategies
Every strategy generated by AI has to become something executable and testable. That is where I started integrating these ideas using Lumibot, an open-source AI backtesting agent for algorithmic trading, with Alpaca as the execution layer.
The workflow became easier to manage.
An agent generates a hypothesis. That hypothesis becomes code. That code gets backtested on historical data and compared against benchmarks like SPY or BTC. Only after that can it move into paper trading.
I use Lumibot because it allows me to take the same backtested strategy and run it live without redesigning everything. It is already structured to connect directly with Alpaca’s APIs and paper trading environment.
from lumiq.platform.runtime.app_runtime import CoreRuntime
runtime = CoreRuntime(strategies_path="lumiq/lumibot/strategies/live")
# Tool-backed access to Alpaca account state and strategy operations
account = runtime.strategy_service.get_alpaca_account_status(mode="paper")
running = runtime.strategy_service.list_running_strategies()
started = runtime.strategy_service.start_strategy(
strategy_name="LiveCryptoMeanReaversionStrategy",
mode="paper",
parameters={
"symbols": ["ETH", "BTC", "SOL"],
"zscore_entry": 1.1,
"zscore_exit": 0.2,
"base_position_pct": 0.20,
"max_open_positions": 3,
},
)
status = runtime.strategy_service.get_strategy_status("LiveCryptoMeanReaversionStrategy")
print(account)
print(running)
print(started)
print(status)
Most of the time, the strategy fails. Sometimes it overfits. Sometimes it only works under specific conditions. But occasionally, something interesting appears.
At the beginning, I was trying to test my own ideas. I am not a professional trader, but like anyone with a portfolio, I started wondering how to automate decisions: when to enter, when to exit, how to use indicators, and how to improve edge over time.
Eventually, I realized it was better to let the AI help explore that search space with me rather than pretend I could outsmart the market alone.
From Strategy Testing to Research Loops
And that’s where iteration begins.
With tools like Codex and Claude, you can keep pushing on strategies: ask them to search for models to test against benchmarks like SPY, analyze hypothetical outcomes, or model drawdowns over time. Not perfectly, but systematically.
They keep refining until the idea breaks down, the code stops improving, or the limits of the model become obvious.
At that point, it stopped feeling like “AI gambling” and started feeling like a practical research loop, almost like having a trading lab running on my own machine.I start with this skill:
## Workflow (the process we used)
1. **Extract the hypothesis as measurable rules**
- Convert narrative into entries/exits/risk.
- Example: “ETH oscillates 2%-5% before moves” became regime filters + pullback/breakout rules.
2. **Choose the first test shape**
- `signal/backtest study` if hypothesis is unclear.
- `tradable strategy` if entry/exit/risk are already concrete.
- For aggressive ETH target return work, we moved to a tradable momentum strategy.
3. **Create a backtest strategy file in**
- `lumiq/core/strategies/backtesting/`
- Prefer copying structure from an existing strategy in this repo for logging/style.
4. **Handle Lumibot/Alpaca backtesting constraints**
- In this environment, `AlpacaBacktesting` only accepts `timestep="day"` or `timestep="minute"`.
- If hypothesis is hourly, fetch `minute` and aggregate locally to synthetic hourly bars.
- For crypto quote issues (e.g., `USDC` valuation problems), use `ETH/USD` proxy in backtest and document it.
5. **Run a target-period backtest**
- Usually YTD or user-specified period first.
- Save the run and inspect generated files in `lumiq/logs`.
6. **Review logs, not just the headline return**
- Check:
- `*_tearsheet.csv`
- `*_trades.csv`
- `*_trade_events.csv`
- `*_settings.json`
- Evaluate win rate, avg win/loss, drawdown, time in market, trade count, and whether the strategy is behaving as intended.
7. **Iterate one axis at a time**
- Examples:
- entry strictness (signals too few / too many)
- stop/trailing behavior
- position sizing (risk amplification)
- trend/regime filters
- Avoid changing everything at once unless doing a deliberate reframe (e.g., “drop mean reversion, use momentum”).
8. **Validate across regimes (required before live)**
- Run multiple periods (e.g., 2023, 2024, 2025 YTD).
- If performance is regime-dependent, add a regime gate instead of forcing one strategy to work everywhere.
9. **Assess live risk separately from backtest metrics**
- Slippage, fees, data quality, infra reliability, leverage/margin behavior, and stop behavior in crypto volatility.Over time, you also begin to understand concepts like algorithmic trading and technical analysis in a much more practical way, because the AI is actively helping you explore and refine ideas rather than just explain them abstractly. This gives you potential ideas for a real strategy that can be iterated and studied to evaluate whether it behaves as expected under different assumptions.
What I Built to Support My Research Workflow
This is what eventually led me to build an AI trading assistant.
I built Lumiq as an internal framework to help me organize research, data, alerts, and testing workflows in one place.
The real shift is understanding that intelligence does not live in a single model or a single signal. It emerges from the system that connects everything: market data, news, technical indicators, fundamentals, alerts, and execution into something you can actually use.
tools = []
if alert_system is not None:
tools.extend(build_alert_tools(alert_system))
tools.extend(build_technical_tools(alert_system))
if news_service is not None:
tools.extend(build_news_tools(news_service))
if strategy_ops is not None:
tools.extend(build_trading_tools(strategy_ops, allow_strategy_control=False))
if gateway is not None:
tools.extend(_build_live_trading_tools(gateway))
tools.extend(
build_context_tools(
orchestrator=strategy_ops,
alert_system=alert_system,
watchlist_store=watchlist_store,
live_gateway=gateway,
)
)
instructions = [
"You are Lumiq Trading Copilot, the single in-app agent for trading, watchlists, alerts, technicals, news, strategy ops, and broker execution.",
"Use tools for facts. Never invent watchlists, alerts, prices, indicators, portfolio values, positions, orders, strategies, or news.",
"For questions about current portfolio/account state, holdings, open orders, or execution state, call get_user_execution_context first.",
"For questions about running strategies or strategy state, call get_user_strategy_context first.",
"For technical analysis questions, call technical tools first and cite key numeric evidence.",
"For news/catalyst questions, call news tools first and prioritize relevance and urgency.",
]
agent = Agent(
name="TradingSingleAgent",
model=model,
tools=tools,
instructions=instructions,
add_history_to_messages=True,
markdown=False,
)Once you structure it this way, something changes. You stop obsessing over finding the “perfect strategy,” and start building a process that continuously generates, tests, and refines ideas.
Traditional trading tools assume you already know how to read the market. Charts, indicators, and dashboards are powerful, but they come with a steep learning curve. For many people, that friction appears immediately. There is a lot of information, but very little of it feels actionable.
My goal with Lumiq was to reduce some of that workflow friction in my own experimentation process.
Instead of jumping between separate tools, I wanted a simpler way to inspect market context, alerts, and strategy ideas during experimentation. You can ask questions in plain English, explore what happened to an asset, understand why an alert matters, or test how a strategy would have performed under different conditions.
@tool
def get_user_execution_context(mode: str = "paper") -> str:
payload = {
"account": live_gateway.get_account_status(mode=mode),
"positions": live_gateway.list_positions(mode=mode),
"open_orders": live_gateway.list_open_orders(mode=mode),
"market_clock": live_gateway.get_market_clock(mode=mode),
}
return _json_dump(payload)
@tool
def get_user_strategy_context(strategy_name: Optional[str] = None) -> str:
payload = {
"running_strategies": orchestrator.list_running_strategies(),
"system_status": orchestrator.get_all_status(),
}
if strategy_name:
payload["strategy_status"] = orchestrator.get_strategy_status(strategy_name)
return _json_dump(payload)This is not just useful for beginners. Even after years working in fintech, I still felt how fragmented the workflow was: one tool for charts, another for news, another for alerts, another for backtesting.
Lumiq helped me bring those pieces together into a more consistent research workflow.

How I Used Alpaca in That Workflow
Lumiq became the layer where I could connect research, monitoring, and execution into one workflow. Instead of treating the agent as a standalone tool that generates ideas in isolation, I wanted it to operate inside a real trading environment with access to the same context I was using: market data, positions, account state, alerts, and strategy logic.
I also connected Alpaca directly into that agent workflow so I could interact with all of that in natural language.
from lumiq.platform.runtime.app_runtime import CoreRuntime
from lumiq.app.services.chat_service import ChatService
runtime = CoreRuntime(strategies_path="lumiq/lumibot/strategies/live")
chat = ChatService(runtime)
reply = chat.handle_text(
chat_id=1,
user_id=1,
text="What positions are open right now, how is the live strategy behaving, and why did the last alert trigger?"
)That changed the experience quite a bit. Instead of jumping between dashboards, charts, API responses, and custom scripts, I could ask plain-English questions about what the system was seeing, what positions were open, how a strategy was behaving, why an alert had triggered, or how current exposure compared to the rest of the portfolio.
tools = []
tools.extend(build_trading_tools(strategy_ops, allow_strategy_control=False))
tools.extend(_build_live_trading_tools(gateway))
tools.extend(
build_context_tools(
orchestrator=strategy_ops,
alert_system=alert_system,
watchlist_store=watchlist_store,
live_gateway=gateway,
)
)
instructions = [
"You are Lumiq Trading Copilot, the single in-app agent for trading, watchlists, alerts, technicals, news, strategy ops, and broker execution.",
"Always respond in English, concise and actionable.",
"Use tools for facts. Never invent watchlists, alerts, prices, indicators, portfolio values, positions, orders, strategies, or news.",
"For questions about current portfolio/account state, holdings, open orders, or execution state, call get_user_execution_context first.",
"For direct questions about invested value, portfolio value, cash, equity, or buying power, call get_user_portfolio_value first.",
"For questions about running strategies or strategy state, call get_user_strategy_context first.",
"Do not rely on prior conversational guesses when a direct context tool exists. Re-read the real state with tools.",
]
agent = Agent(
name="TradingSingleAgent",
model=model,
tools=tools,
instructions=instructions,
add_history_to_messages=True,
markdown=False,
)That made the agent more useful as a research and monitoring layer, not just a text generator. It could help structure observations, track live conditions, and support the next round of testing without forcing me to rebuild context every time.

This is where Alpaca became an important part of my workflow. Alpaca provided the infrastructure that made the loop real: market data, account state, positions, orders, and a structured workflow from idea generation through paper trading and execution. Instead of rebuilding that layer myself, Lumiq could build on top of it.
Once that foundation was in place, the workflow became much more practical. An idea could move from a simple question, to a structured strategy, to a backtest, and then into paper trading within the same system. The agent could focus less on setup and more on helping me investigate, compare, and refine ideas over time.
from lumiq.platform.runtime.app_runtime import CoreRuntime
from lumiq.app.services.chat_service import ChatService
runtime = CoreRuntime(strategies_path="lumiq/lumibot/strategies/live")
chat = ChatService(runtime)
reply = chat.handle_text(
chat_id=1,
user_id=1,
text="What positions are open right now, how is the live strategy behaving, and why did the last alert trigger?"
)What AI in Trading Still Can’t Do
What’s happening with all these “AI agents making money” feels familiar — it’s the same story markets have seen for decades, just wrapped in a new interface.
If you’re asking an agent to trade for you without a validated system, you’re still doing what every investor is told not to do: you’re betting — just with better tools.
There’s a reason why a “perfect trading agent” doesn’t exist. Markets are adaptive, competitive, and constantly changing. Any edge that works gets arbitraged away, and what performs today can fail tomorrow.
AI will get better. Models, data, and infrastructure will improve.
But that doesn’t mean agents will start printing money.
It means we’ll get better at exploring, testing, and refining ideas.
And that’s the real shift:
The edge is probably not asking AI for answers.
It’s in building systems that know how to question them.
Resources
These are some of the resources I used while building and testing this workflow.
Alpaca Trading API (docs.alpaca.markets/docs/trading-api) is the place to start. I found the paper trading quickstart useful for getting a simulated environment running quickly.
Alpaca Market Data API (docs.alpaca.markets/docs/about-market-data-api) provides the historical and real-time data that powers everything. In my case, the free tier was enough for early experimentation.
I used Alpaca Paper Trading as a low-risk environment to observe how strategies behaved without real capital.
Lumibot is a useful framework for structuring and running algorithmic trading strategies. It allows you to take a backtested strategy and deploy it live with minimal changes, while integrating directly with Alpaca.
AI Coding Tools (Claude, Codex, OpenClaw) can help translate ideas into executable strategies. What worked best for me was using these tools to define logic, assumptions, and failure conditions that could then be evaluated through testing.
For implementation, TypeScript or Python are both solid choices. Python has a larger ecosystem of quantitative libraries, while TypeScript offers strong type safety and works well with modern AI coding assistants. Choose whichever you’re more comfortable working with.
- How to Open a Live Alpaca Trading API Account as a US Resident
- How to Open a Live Alpaca Trading API Account as a Non-US Resident
- How to Fund Your Alpaca Live Trading Account
- How to Start Paper Trading with Alpaca's Trading API
- Alpaca-py GitHub Page
- Alpaca-py Documentation
- Alpaca's Trading API Reference
About the Author
Info on Carlos Velasco
Carlos Velasco is a dev and builder with over a decade of experience working across financial infrastructure, consumer fintech, crypto and trading systems. His work has focused on building fintech solutions for real-world financial workflows.
In recent years, he has been exploring how AI is redefining the next generation of consumer apps, especially in fintech and crypto, focusing on how intelligent systems can make complex financial workflows more practical, accessible, and useful in everyday products.
*The Paper Trading API is offered by AlpacaDB, Inc. and does not require real money or permit a user to transact in real securities in the market. Providing use of the Paper Trading API is not an offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, given or in any manner endorsed by AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate and the information made available through the Paper Trading API is not an offer or solicitation of any kind in any jurisdiction where AlpacaDB, Inc. or any AlpacaDB, Inc. affiliate (collectively, “Alpaca”) is not authorized to do business.
This article is provided for educational and informational purposes only. The views expressed are those of the author and do not necessarily reflect the views of Alpaca.
Alpaca and the entities referenced in this article are not affiliated and are not responsible for the liabilities of the others.
AI-generated analyses, code, and trading hypotheses may contain errors, omissions, or inaccurate assumptions and should not be relied upon as the sole basis for investment decisions. Such outputs should be independently reviewed and validated before use.
Alpaca does not prepare, edit, or endorse Third Party Content. Alpaca does not guarantee the accuracy, timeliness, completeness or usefulness of Third Party Content, and is not responsible or liable for any content, advertising, products, or other materials on or available from third party sites.
Past hypothetical backtest results do not guarantee future returns, and actual results may vary from the analysis.
All investments involve risk, and the past performance of a security, or financial product does not guarantee future results or returns. There is no guarantee that any investment strategy will achieve its objectives. There is always the potential of losing money when you invest in securities, or other financial products. Investors should consider their investment objectives and risks carefully before investing.
Cryptocurrency is highly speculative in nature, involves a high degree of risks, such as volatile market price swings, market manipulation, flash crashes, and cybersecurity risks. Cryptocurrency is not regulated or is lightly regulated in most countries. Cryptocurrency trading can lead to large, immediate and permanent loss of financial value. You should have appropriate knowledge and experience before engaging in cryptocurrency trading. For additional information please click here.
AlpacaDB, Inc., the parent company of Alpaca Securities LLC and Alpaca Crypto LLC, provides services and technology, including the brokerage infrastructure API supporting Alpaca’s financial services.
Securities brokerage services are provided by Alpaca Securities LLC (dba "Alpaca Clearing"), member FINRA/SIPC.
Cryptocurrency services are made available by Alpaca Crypto LLC ("Alpaca Crypto"), a FinCEN registered money services business (NMLS # 2160858), Alpaca Crypto is not a member of SIPC or FINRA. Cryptocurrencies are not stocks and your cryptocurrency investments are not protected by either FDIC or SIPC. Please see the Disclosure Library for more information.
This is not an offer, solicitation of an offer, or advice to buy or sell securities or cryptocurrencies or open a brokerage account or cryptocurrency account in any jurisdiction where Alpaca Securities or Alpaca Crypto, respectively, are not registered or licensed, as applicable.
