Skip to content
All library documents

Random Long and Short Entries with a Linear Congruential Generator

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses a seeded linear congruential generator to choose trade direction. When flat, it compares each generated value with half the modulus, entering long above that threshold and short otherwise. Percentage based stop loss and take profit settings govern exits, and users can optionally limit the backtest to a specified date range. The published example applies it to BTC/USDT futures, but reports no performance results.

The document presents the approach as a simple mechanical baseline for exploring random entries and parameter effects. It warns that random direction does not adapt to market conditions and can miss trends, incur frequent trading costs, and experience uncertain returns or substantial drawdowns. The described strategy does not provide position sizing based on market conditions. It suggests adding trend filters, sizing rules, dynamic exits, and entry frequency limits, while emphasizing that parameter choices need backtesting. No evidence is given that these changes improve results or that the strategy is profitable in live trading.

Key ideas

  • A seeded linear congruential generator determines trade direction whenever the strategy has no open position.
  • Values above half the modulus trigger long entries, while lower values trigger short entries.
  • Percentage based stop loss and take profit settings define the stated exit approach.
  • Random entries do not respond to market trends and may lead to missed opportunities, drawdowns, and trading costs.
  • The document offers no performance results and recommends testing risk controls and parameters before practical use.

Tags

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