Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Development

Tooling

You can develop your roboquant based trading solution in different types of environments:

  1. Plain text editors like VIM. If you are already used to this, no need to change that.

  2. IDE’s like VSCode, PyCharm and Zed. Nice balance between ease of use and features.

  3. Jupyter Labs, Notebooks and Marimo. This is great for fast and iterative development.

  4. AI based terminal agents like Claud Code that can help with a lot of the necessary code.

It all depends on your personal preference and all of them can result in solid strategies.

But regardless of the tooling, if you plan to go live with your solution, it is recommended to follow the 4 stage approach as outlined in the next section.

4 Stage Approach

When developing, testing, and running a new trading strategy, you go through 4 distinct stages. The diagram below illustrates these stages and their ideal sequence:

Roboquant supports all 4 stages, requiring only minimal configuration changes when moving from one stage to the next. Your Strategy and Trader should not change between stages; only the Feed and Broker configurations differ.

The mapping of Brokers and Feeds per stage is as follows:

StageBrokerFeed
Back TestingSimBrokerHistorical Data
Forward TestingSimBrokerReal-time Data
Paper TradingReal Broker (using simulated/paper account)Real-time Data
Live TradingReal Broker (using real account)Real-time Data

Stage 1: Back Testing

In this stage, you will test your Strategy and Trader against historical data using the SimBroker.

You can run a single backtest over a complete historical timeline, but Roboquant also makes it easy to perform walk-forward analysis and Monte Carlo simulations. These types of backtests give you a better understanding of how your strategy performs under different market regimes.

The core goal of this stage is to gather as much information as possible about the overall performance and behavior of your strategy, so you know what to expect—and what not to expect—when going live.

Important principle: This is the only stage where you should develop and modify your strategy and rules. If performance in a later stage is disappointing, you should return to this stage to make adjustments. For example, if you want to use a circuit breaker to add peace of mind during live trading, you should include this logic during backtesting, not introduce it only during live execution.


Stage 2: Forward Testing

In this stage, you will test your Strategy and Trader using real-time data and the SimBroker.

The main purpose of this stage is to validate that your strategy still performs well on unseen data. It is easy to overfit during backtesting, and forward testing provides a crucial sanity check before risking any real capital.

Why it matters: While historical data provides a broad view, it does not reflect the current market microstructure, liquidity, or latency. Forward testing exposes your strategy to the live market environment in a risk-free manner, allowing you to observe how it reacts to real-world events like sudden news spikes or market opens/closes.


Stage 3: Paper Trading

In this stage, you will run your strategy with real-time data and a real broker, but using a simulated (paper) account.

The core goal is to test the integration between your Roboquant application and your chosen broker’s API. This stage validates that orders are properly formatted, transmitted, and acknowledged by the broker’s system.

Why it matters: The interface between your trading system and the broker is a common point of failure. Issues such as authentication errors, rate limits, order type mismatches, or position synchronization bugs can be safely identified and resolved here without losing real money.


Stage 4: Live Trading

This is the final stage, where you run your strategy with real-time data and a real broker using a real money account.

The core goal is to execute the strategy in the live market and generate returns according to your backtested expectations.

Crucial practice: Despite all prior testing, live trading often reveals unexpected challenges. Start with a small position size and gradually scale up as you gain confidence in the system’s stability and performance.

Risk management: Even in this stage, you should continuously monitor your strategy. If the live performance deviates significantly from your backtested and forward-tested results, it may be a sign that market conditions have changed or that there is a bug that slipped through the cracks. In such cases, do not hesitate to pause the system and go back to Stage 1 for further investigation and refinement.