ninjatrader/strategies/advances-and-declines/README.md

69 lines
2.7 KiB
Markdown
Raw Normal View History

# Advances and Declines
The idea for these strategies comes from chapter 5 (Market Breadth) of [*How Markets Really Work*](https://moshferatu.dev/moshferatu/how-markets-really-work) (2012) by Larry Connors.
As with most of the strategies from this book, they are meant to illustrate certain characteristics of the market rather than be traded directly.
Advances refers to the number of stocks going up in the index (e.g., S&P 500) whereas Declines are the stocks going down.
Unlike the book, I did not find there to be a significant difference between trades taken at either extreme of Advances / Declines.
## Rules
### Advances
1. The asset (e.g., SPY) must be above its 200-day moving average.
2. If the ratio of **advances to declines** is at least 2 : 1, enter a long trade.
3. Exit the trade after 5 trading days (~1 week).
### Declines
1. The asset (e.g., SPY) must be above its 200-day moving average.
2. If the ratio of **declines to advances** is at least 2 : 1, enter a long trade.
3. Exit the trade after 5 trading days (~1 week).
## Parameters
**Advances**: The portion of the ratio associated with advances. (Default: 1.0)
**Declines**: The portion of the ratio associated with declines. (Default: 2.0)
**Long-Term Trend Period**: The period of the long-term trend as measured using a simple moving average. (Default: 200)
**Days to Exit**: The number of days to wait before exiting any trade. (Default: 5)
*Whichever of Advances or Declines is greater is what is used as the numerator in the ratio.*
The default settings specify a declines / advances ratio of 2 : 1.
## Backtest Results
### SPY
#### 2:1 Advances : Declines
![SPY Advances Analysis](https://static.moshington.com/images/strategies/advances-and-declines/spy-advances-analysis.png)
![SPY Advances Summary](https://static.moshington.com/images/strategies/advances-and-declines/spy-advances-summary.png)
#### 2:1 Declines : Advances
![SPY Declines Analysis](https://static.moshington.com/images/strategies/advances-and-declines/spy-declines-analysis.png)
![SPY Declines Summary](https://static.moshington.com/images/strategies/advances-and-declines/spy-declines-summary.png)
### QQQ
#### 2:1 Advances : Declines
![QQQ Advances Analysis](https://static.moshington.com/images/strategies/advances-and-declines/qqq-advances-analysis.png)
![QQQ Advances Summary](https://static.moshington.com/images/strategies/advances-and-declines/qqq-advances-summary.png)
#### 2:1 Declines : Advances
![QQQ Declines Analysis](https://static.moshington.com/images/strategies/advances-and-declines/qqq-declines-analysis.png)
![QQQ Declines Summary](https://static.moshington.com/images/strategies/advances-and-declines/qqq-declines-summary.png)
---