# LLM Driving - AI-Assisted Strategy Development Workflow

**Last Updated**: 2026-03-17
**Version**: 1.0.0

## How It Works

### Open the LLM Driving Interface

Navigate to the LLM Driving page from the sidebar. The interface features a workflow table for strategy composition, an LLM provider/model selector, and an Execute section with backtest configuration controls.

### Build Your Strategy Workflow

Use the workflow table to define your trading strategy structure. Add rows for entry conditions, exit conditions, position sizing, and risk management rules. Each row supports multi-select dropdowns for configuring indicators, thresholds, and logical operators.

### Select the LLM Provider and Model

Choose your preferred LLM provider (e.g., OpenAI, Anthropic, DeepSeek) and specific model from the Execute section dropdown. Different models vary in reasoning depth, speed, and cost per request. The selected model will generate and refine the strategy code.

### Configure Backtest Parameters

Set the target asset via the company search field, define the date range for historical backtesting, select the data timeframe (1min to daily), and specify the initial capital amount. These parameters scope the environment where the LLM-generated strategy will be tested.

### Set Loop Count for Iterative Refinement

Configure the total loop count to control how many iterative refinement cycles the LLM performs. Each loop generates strategy code, backtests it, analyzes the results, and uses the performance feedback to improve the next iteration. More loops generally produce better strategies but consume more credits.

### Execute the LLM-Driven Strategy

Click the Execute button to launch the AI-assisted workflow pipeline. The LLM reads your workflow definition, generates Python strategy code, submits it for backtesting, receives performance metrics, and iteratively refines the code across the configured number of loops under user-defined constraints.

### Monitor Real-Time Progress via WebSocket

Watch the live progress panel as each iteration completes. The WebSocket connection streams backtest metrics (Sharpe ratio, max drawdown, total return) for every loop. The equity curve updates in real time in the Perspective modal viewer.

### Review Final Results and Generated Code

After all loops complete, review the best-performing iteration's equity curve, performance metrics, and the AI-generated Python strategy code. Compare iterations side by side and save or export the winning strategy for deployment.

> LLM Driving uses large language models to help generate, backtest, and iteratively refine quantitative trading strategies inside a user-controlled research workflow.

## Tips & Best Practices

## Frequently Asked Questions

## Important Notes

> AI-generated strategies are produced by probabilistic language models and carry no guarantee of profitability. LLM outputs may contain errors, biases, or overfitted logic. Always validate generated strategies on out-of-sample data and apply proper risk management before any live deployment.

---

Source: https://stratcraft.ai/help/llm-driving/
