Skip to content
All library documents

Separating Strategy Signals from Trade Execution Rules in Backtests

Article BigQuant

Summary

The document explains how a backtest engine turns an investment strategy into simulated trades. It distinguishes strategy logic, such as selecting securities and generating signals, from trade logic, such as deciding position size, rebalance timing, order prices, and when to exit. It notes that data preparation can happen either before or inside the engine, and names several platform backtesting modules.

A sample daily strategy starts with stated capital, holds an equal-weight basket of ten stocks, and rebalances every five days. At rebalance, it compares desired holdings with current positions, buying and selling at the open with stated fees. The example adds a daily take-profit check based on each holding’s gain since purchase, plus a market-wide risk rule that liquidates positions and blocks new purchases after a sharp recent benchmark decline. These examples illustrate implementation choices rather than validated performance: the document provides no backtest results, and the thresholds, costs, and execution assumptions would need testing against the intended market and engine.

Key ideas

  • Strategy logic selects assets and signals trades, while trade logic defines how positions are sized, entered, maintained, and exited.
  • A sample portfolio equal-weights ten stocks and checks for rebalancing every five trading days.
  • The engine can compare target holdings with current positions to avoid unnecessary trades.
  • Take-profit rules may be checked daily, even when the portfolio’s normal rebalance occurs less often.
  • A benchmark drawdown rule can trigger liquidation and suppress same-day purchases, with priority over take-profit logic.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.