Quantstrat Example in R - EMA Crossover Strategy

Premium

Our first quantstrat example case study is based on the Exponential Moving Average (EMA) Crossover.  

Let’s briefly review what moving averages and crossovers are.

Moving Averages

A moving average is the average price of a security over a set amount of time. Moving averages smooth the price data to form a trend following indicator (TFI). Once the day-to-day fluctuations are removed, traders are better able to identify the true trend and increase the probability that it will work in their favor.

Unlock Premium Content

Upgrade your account to access the full article, downloads, and exercises.

You'll get access to:

  • Access complete tutorials and examples
  • Download source code and resources
  • Follow along with practical exercises
  • Get in-depth explanations