Research project · Field study

How trading algorithms process data and decide to act.

An independent study by Aditya Singh on simple quantitative trading rules: moving averages, RSI, and the software path from a price file to a buy or sell mark.

01

Foundations

Math I used: averages, RSI, returns, and a little volatility.

Open
02

Architecture

How a program reads bars, computes a signal, and logs a decision.

Open
03

Findings

An illustrative SMA test, a small metrics table, and what broke.

Open

Research question

I am a Computer Engineering student. In my free time I started reading about quantitative finance, which is the idea of using math and code to look at market data instead of guessing from headlines. Sites like Quantpedia collect many of these rules in one place (Quantpedia, n.d.). I wanted to understand, at a beginner level, how a program actually turns a list of prices into a decision.

The question I am working with is: if I only use public daily prices, can a few old formulas — a simple moving average and the Relative Strength Index — produce a rule I can code, check, and explain? I am not trying to invent a hedge-fund strategy. I am trying to walk through the same building blocks that show up in textbooks and in catalogs of published rules (Brock, Lakonishok, and LeBaron, 1992; Faber, 2007).

The work is split the way a small study is usually split. Foundations is the math. Architecture is the software. Findings is what happened when I ran a long/cash moving-average rule on an illustrative price path. All of the charts on this site are built from that same generated series so the pictures match the formulas.

Figure 1. Illustrative close price with a 20-day SMA (teal) and a 50-day SMA (grey). The slow line lags the drop in the middle — that lag is the whole point of a moving average.
New York Stock Exchange facade
Figure 2. The New York Stock Exchange. Daily prices used in this kind of study come from exchanges like this, then get packaged into CSV files students can download. Photo: The Wall Street Experience blog.

Sources

  1. Quantpedia. Encyclopedia of Quantitative Trading Strategies.
  2. Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. Journal of Finance.
  3. Faber, M. (2007). A quantitative approach to tactical asset allocation. Journal of Wealth Management.