liveBook · Manning

SMA crossover strategy

As explained in Investing for Programmers

An SMA crossover strategy generates trading decisions from the relative crossings of simple moving averages with different time windows.

An SMA crossover strategy generates trading signals by comparing simple moving averages over different time windows, such as a 200-day SMA and a 5-day SMA. section 10.1.3

A programmer can extend the basic crossover logic by:

  • Replacing direct SMA comparisons with reusable isBuySignal and sell-signal methods. section 11.3.2
  • Combining quantifiable signals such as price movement, keyword sentiment, insider activity, and technical indicators. section 11.3.2
  • Screening signals daily or at shorter intervals while considering broader events that may affect assets. section 11.3.2
Figure 10.13 A NuScale (SMR) chart provided by Finviz.com shows how quickly we can perceive price movements over a longer time when the details are visualized.
figure

Use the chart to inspect longer-term price movement and relate visual momentum to different trading horizons. section 10.1.3

How Investing for Programmers covers it

How deep it goes
Demonstrates crossover conditions, reusable signal methods, and combined scorecards without detailing a complete trading system.
Examples
Uses 200-day versus 5-day SMAs, Python decision clauses, quantifiable signal functions, and a Finviz chart.
What you can do after
Apply crossover logic through reusable buy-and-sell methods and combine comparable signals in a decision scorecard.
How it connects
Ties SMA crossovers to momentum, technical indicators, sentiment scores, insider activity, and event-driven signals.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.