Ch. 20Strategy #687

Strategy #687

Random Forest Classification Trade

Entry Logic

  • Long entry is triggered when a trained random forest model classifies the next period's return as 'up'.
  • Short entry is triggered when the model classifies the next period's return as 'down'.
  • Confirmation requires the model's prediction probability to be above 75%.
  • Timeframe is determined by the model's training data (e.g., 15-minute, 1-hour).
  • Location context is implicitly learned by the model from the input features.
  • Market condition is a feature in the model.

Exit Logic

  • Profit target is a fixed risk-multiple (e.g., 1.5R) or when the model generates an exit signal.
  • No scaling out.
  • A trailing stop of 1 ATR is used after the price moves 1R in favor.
  • Exit on signal failure if the model's prediction is incorrect and the stop loss is hit.
  • Exit on an opposite signal from the model.
  • Exit on time expiration after 8 periods.
  • Exit on momentum loss if the price fails to make a new high/low for 3 consecutive periods.

Stop Loss Structure

  • Hard stop is placed at 1.5 ATR from the entry price.
  • Soft stop is not used.
  • Maximum dollar loss is set at $125 per trade.
  • Maximum percent loss is 1.25% of account equity.
  • Structural stop is not used.

Risk Management Framework

  • Risk per trade is 0.6% of account equity.
  • Maximum daily loss limit is 2.4% of account equity.
  • Maximum weekly loss limit is 6% of account equity.
  • Maximum drawdown is 18%.
  • Risk-reward ratio requirement is a minimum of 1:1.5.

Position Sizing Model

  • Sizing is fixed fractional.
  • Volatility adjustment using ATR is applied to normalize position size.
  • Conviction sizing is not used.
  • No scaling in.
  • No scaling out.

Trade Filtering

  • The model filters trades based on the learned patterns in the data.
  • Avoid trading in market conditions the model was not trained on.
  • Instrument selection is based on where the model has shown the best backtested performance.
  • Time-of-day restrictions can be included as a feature in the model.
  • News avoidance is handled by pausing the strategy during major economic releases.

Context Framework

  • The model learns context from input features like moving averages, volatility, and momentum.
  • The model determines the importance of each contextual factor.
  • Higher timeframe context can be included as features.

Trade Management Rules

  • Move stop to breakeven when the trade is 1R in profit.
  • No scaling out.
  • Do not add to positions.
  • The model can be trained to handle different market dynamics.

Time Rules

  • Optimal trading window is identified from the model's backtest performance.
  • Times to avoid are those where the model has historically underperformed.
  • Session-specific behavior can be learned by the model.

Setup Classification

  • A+ setup: High probability prediction (>80%) with confirming price action.
  • A setup: High probability prediction (>75%).
  • B setup: Moderate probability prediction (65-75%).
  • C setup: Low probability prediction (<65%).

Market Selection Criteria

  • Instruments are those on which the model was trained and validated.
  • High liquidity and low transaction costs are essential.
  • The model's performance can be market-specific.

Statistical Edge Metrics

  • All metrics (win rate, average win/loss, profit factor, expectancy) are derived from out-of-sample backtesting of the random forest model.

Failure Conditions

  • The model can fail due to concept drift, where the market dynamics change.
  • Overfitting is a major risk that must be addressed during model development.
  • Poor data quality can lead to an unreliable model.

Psychological Rules

  • Trust the model's signals and avoid emotional overrides.
  • Continuously monitor the model's live performance.
  • Be prepared to retrain or disable the model if its performance degrades.

Advanced Components

  • Feature engineering is crucial for creating a robust model.
  • Hyperparameter tuning is necessary to optimize the random forest.
  • The model should be tested for robustness using various validation techniques.

Location

  • The strategy's effectiveness is tied to the quality of the model and the data.
  • It can be applied to any market with sufficient historical data.
  • Performance may vary depending on the market regime.