Concentrated Stock Selection with AI Research and Short-Seller Review
Summary
This strategy uses a three-agent workflow to build a concentrated portfolio from a fixed list of large-company stocks. A research agent ranks up to five candidates for predictable operations, cash generation, and attractive pricing. A separate short-seller agent challenges those ideas on debt, management, competition, and valuation, then the trading agent holds three to five ideas that pass the review, weighting stronger candidates more heavily and selling names that no longer survive.
The document provides an implementation outline rather than performance evidence. It runs the process once per day and includes a backtesting entry point using Yahoo data, but reports no test results, portfolio returns, or risk measures. The prompts leave important choices unspecified, including how agents assess company fundamentals, determine weights, handle turnover, and control portfolio risk. The stated approach is therefore a qualitative stock-selection framework, not evidence that the agent judgments are reliable or that the portfolio outperforms.
Key ideas
- A research agent ranks companies based on simplicity, predictability, cash generation, and price.
- A separate short-seller review challenges each candidate before it can enter the portfolio.
- The trading agent holds three to five surviving stocks and allocates more capital to its strongest ideas.
- The code describes a daily workflow but supplies no performance results or detailed risk controls.
Tags
Full text
# ai_trading_team_bill_ackman_concentrated.py
```py
"""Bill Ackman Portfolio AI Trading Bot.
Invests the way Bill Ackman describes his style: own just a few simple,
high-quality companies and put real money behind them. A research agent finds
the best ideas. A short seller agent attacks each one. A trading agent holds the
3 to 5 that survive, with the most money in the best ideas.
Not affiliated with or endorsed by Bill Ackman or Pershing Square.
"""
from lumibot.strategies import Strategy
class AITradingTeamBillAckmanConcentratedStrategy(Strategy):
parameters = {"universe": ["GOOGL", "CMG", "HLT", "QSR", "UBER", "CP", "LOW", "MDLZ", "BKNG", "MSFT"]}
def initialize(self):
self.sleeptime = "1D"
self.agents.create(
name="researcher",
allow_trading=False,
system_prompt=(
"Find the simple, predictable companies in the universe that make lots of cash and trade at a "
"good price. Rank your top 5 ideas and say why. Do not trade."
),
)
self.agents.create(
name="short_seller",
allow_trading=False,
system_prompt=(
"You are a short seller. Attack each idea: too much debt, weak management, strong rivals, or "
"a price that is too high. Say which ideas survive. Do not trade."
),
)
self.agents.create(
name="trader",
allow_trading=True,
system_prompt=(
"Hold the 3 to 5 ideas that survived, with more money in the best ones. Sell a stock when it "
"no longer survives the attack."
),
)
def on_trading_iteration(self):
facts = {"universe": self.parameters["universe"]}
research = self.agents["researcher"].run(task_prompt="Rank your best ideas.", context=facts)
attack = self.agents["short_seller"].run(
task_prompt="Attack each idea.", context={**facts, "research": research.summary}
)
self.agents["trader"].run(task_prompt="Hold the survivors.", context={**facts, "short_seller": attack.summary})
if __name__ == "__main__":
from lumibot.credentials import IS_BACKTESTING
if IS_BACKTESTING:
from lumibot.backtesting import YahooDataBacktesting
AITradingTeamBillAckmanConcentratedStrategy.backtest(YahooDataBacktesting)
else:
AITradingTeamBillAckmanConcentratedStrategy().run_live()
```Shown in full with attribution under the source's licence. Licence: GPL-3.0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.