Trading Strategies Introduction - Stanford...

Post on 07-Sep-2021

3 views 0 download

transcript

Trading Strategies Introduction

Trading Loop

Trading Loop

Trading Loop

Trading Loop

Three Strategies

2. Momentum1. Mean Reversion 3. Pairs Trading

robinhood.com tradingview.com

Budish, E., Cramton, P., & Shim, J. (2015). The high-frequency trading arms race: Frequent batch auctions as a market design response.

Mean Reversion Strategy

robinhood.com

3. Sell when yt > (1+d)mt

Moving AverageStock Priceyt

mt

Algorithm Data

Algorithm Parametersw Moving window lengthd Price threshold (%)

1. Calculate moving average mt of stock price at a time t with the moving window length, w.

2. Buy when yt < (1 – d)mt

Simple Moving Average

robinhood.com

time (t) price (yt)

t - 4 $311.23

Simple Moving Average

robinhood.com

time (t) price (yt)

t - 4 $311.23

t - 3 $316.50

Simple Moving Average

robinhood.com

time (t) price (yt)

t - 4 $311.23

t - 3 $316.50

t - 2 $318.27

Simple Moving Average

robinhood.com

time (t) price (yt)

t - 4 $311.23

t - 3 $316.50

t - 2 $318.27

t - 1 $320.47

Simple Moving Average

robinhood.com

time (t) price (yt)

t - 4 $311.23

t - 3 $316.50

t - 2 $318.27

t - 1 $320.47

t $315.69

Simple Moving Average

Example: 5 day moving average

AAPL stock price the last 5 days

time (t) price (yt)

t - 4 $311.23

t - 3 $316.50

t - 2 $318.27

t - 1 $320.47

t $315.69

Pairs Trading

Idea:

Companies that make similar products should have very similar changes in stock price.

For example Coke and Pepsi.

Source (madison.com)

Pairs Trading

Pairs Trading Strategy:

When Pepsi drops more than Coke• Buy Pepsi stock and Sell Coke stock.

When Coke drops more than Pepsi• Buy Coke stock and Sell Pepsi stock.

Source (madison.com)

Tradingview.com

Moving AverageDifferenced Stock Priceyt

mt

Algorithm Data Algorithm Parametersw Moving window lengthd Price threshold (%)

1. Calculate moving average mt of stock price at a time t with the moving window length, w.

2. Buy KO, Sell PEP when yt < (1 – d)mt

3. Sell KO, Buy PEP when yt > (1+d)mt

Tradingview.com

Pairs Trading - MacroSimilar Opportunities exist across entire “sectors”

• Banks and Insurance

• Restaurants and Travel

https://elite.finviz.com/map.ashx?t=sec&st=w52 YTD performance across sectors

Momentum ModelIdea:

Follow the volatility/trend that a time series may exhibit.

Sometimes this volatility can occur as a result of a fundamental change in a business or it’s environment. Such changes could imply a stock dramatically mis-priced.

Tesla Tradingview.com

Examples

Zoom Beyond MeatTradingview.com

Momentum Strategy

Rate of Change

Tradingview.com

Number of periods to look back

Tradingview.com

Algorithm DataStock Pricest

Algorithm Parametersn ROC lookback periods

1. Calculate rate of change roct of stock price at a time t with the lookback period, n.

Rate of Changeroct d ROC threshold

2. Buy when roct moves above threshold d.

Trading Algorithms in CloudEx