AI Strategy Generation
Quantly supports AI-assisted strategy creation in two ways: in the app and through MCP (Model Context Protocol) for tools like Cursor.
You can still build strategies manually in the Tree Builder. AI generation is an alternative starting point - you can edit the resulting tree, backtest, and deploy like any other strategy.
Generate in the app
Section titled “Generate in the app”Go to Strategies and open a strategy, or click New Strategy.
Click Generate with AI in the strategy editor toolbar.
Describe the strategy you want in plain language (for example, “Create a buy and hold basket of popular semiconductor companies, focusing on NVDA”).
Click Generate Strategy. Quantly builds the tree and runs a backtest automatically.
Review the generated tree in the editor. Adjust nodes, change tickers, or add conditions before investing. See Backtesting and Invest and Deploy.
Generate via MCP
Section titled “Generate via MCP”The Quantly MCP server lets AI assistants create strategies, run backtests, and manage your portfolio through natural language.
Endpoint: https://mcp.quantly.trade/mcp
Connect an AI assistant
Section titled “Connect an AI assistant”- In your MCP client (for example Cursor), add the Quantly MCP server URL above.
- Authenticate with OAuth when prompted, or use an API key from Settings → API Keys.
- Ask your assistant to create or backtest strategies in plain language.
MCP connections can backtest, create and update strategies, manage watchlists, and run portfolio actions (deposit, trade now, liquidate, and more) according to your API key scopes.
API keys for MCP
Section titled “API keys for MCP”Create keys in Settings → API Keys. Keys are shown once at creation - store them securely.
- Use scoped keys to limit permissions (for example read-only vs trading actions).
- Restrict keys to specific broker accounts when needed.
- MCP OAuth grants full trading API access; use scoped API keys when you want tighter control.
Tips for good prompts
Section titled “Tips for good prompts”- Name the tickers or theme you care about (for example “momentum on tech giants” or “defensive when SPY RSI is above 70”).
- Say whether you want a single stock, equal-weight basket, or a tilt toward one name.
- Mention indicators or conditions when you have them (RSI, moving averages, return thresholds).
- Start broad, then refine the generated tree in the editor.
Next steps
Section titled “Next steps”- Tree Builder - edit and extend generated strategies
- Node Types - understand each node in the tree
- Your First Strategy - full walkthrough from build to deploy