Recent blogs - Things that make me go hmm
This site is based on Github/Jekyll.
Graphs are generated dynamically through the R package knitr.
The source code to these posts are available on GitHub.
stock momentum
## Copyright
All the content in this website is licensed under
[CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/).
Graphs are generated dynamically through the R package knitr.
The source code to these posts are available on GitHub.
Latest posts
- 17 Jan 2016 » Stockmomentum.3
- 17 Jan 2016 » Stockmomentum.2
- 01 Nov 2015 » Rest 1
- 31 Aug 2015 » Titanic Kaggle
- 28 Jun 2015 » Boosting Algo
- Read More...
Stockmomentum.3
stock momentum
https://www.donfishback.com/2016/01/panic-selling-a-pause-then-another-smash-whats-next/
- S&P 500 ($SPX) closes down more than 1% for three straight days.
- Each close is a new 20-day low.
- The final close on the third day is below the 200-day moving average.
momersion <- function(R, n, returnLag = 1) {
momentum <- sign(R * lag(R, returnLag))
momentum[momentum < 0] <- 0
momersion <- runSum(momentum, n = n)/n * 100
colnames(momersion) <- "momersion"
return(momersion)
}