Skip to content
All library documents

Multi-Commodity Futures EMA Crossover Strategy With Position Reversals

Article FMZ forum · Author: 善

Summary

This example outlines a multi-instrument commodity futures strategy built on a CTA framework. For each symbol, it reads historical bar records and current position, waits until enough data exists for the slower lookback, then compares fast and slow exponential moving averages. A crossover measure is checked against a confirmation threshold before the strategy returns a target position adjustment. Positive signals establish or add to a long position; negative signals establish or add to a short position, while accounting for an existing position on the opposite side.

The code also describes how the framework interprets returned quantities, including closing positions and reversing direction. It presents a compact implementation pattern for applying the same logic across several futures contracts, but it does not report backtest results, transaction costs, contract selection, or portfolio-level risk controls. The periods, confirmation threshold, and lot size are external parameters, and no evidence is supplied that the crossover rule is robust across commodities or market regimes.

Key ideas

  • The strategy applies fast and slow exponential moving averages to each instrument’s bar history.
  • It requires sufficient history for the slower average before evaluating signals.
  • A confirmed upward or downward crossover changes the target position direction.
  • Returned quantities can close an existing position and open one in the opposite direction.
  • The example provides no performance evidence, cost modeling, or portfolio risk specification.

Tags

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