Skip to content

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.

1

Go to Strategies and open a strategy, or click New Strategy.

2

Click Generate with AI in the strategy editor toolbar.

3

Describe the strategy you want in plain language (for example, “Create a buy and hold basket of popular semiconductor companies, focusing on NVDA”).

4

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.

The Quantly MCP server lets AI assistants create strategies, run backtests, and manage your portfolio through natural language.

Endpoint: https://mcp.quantly.trade/mcp

  1. In your MCP client (for example Cursor), add the Quantly MCP server URL above.
  2. Authenticate with OAuth when prompted, or use an API key from SettingsAPI Keys.
  3. 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.

Create keys in SettingsAPI 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.
  • 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.