This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Some code to asses an SVM with a two-dimensional feature space: | |
| # trend (price - simple moving average) and relative strength index. | |
| # The code is an adaptation of the code found in the following linkedin post: | |
| # "Trading the RSI using a Support Vector Machine" | |
| # "https://www.linkedin.com/pulse/article/20141103165037-172934333-trading-the-rsi-using-a-support-vector-machine" | |
| # Settings | |
| sma.window = 50 # Number of observations in simple moving average. | |
| rsi.window = 3 # Number of observation in relative strength index (RSI) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #analyze breakpoints with the R package bfast | |
| #please read the paper | |
| #Verbesselt J, Hyndman R, Newnham G, Culvenor D (2010) | |
| #Detecting Trend and Seasonal Changes in Satellite Image Time Series. | |
| #Remote Sensing of Environment, 114(1), 106–115. | |
| #http://dx.doi.org/10.1016/j.rse.2009.08.014 | |
| require(bfast) | |
| require(quantmod) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #analyze breakpoints with the R package bfast | |
| #please read the paper | |
| #Verbesselt J, Hyndman R, Newnham G, Culvenor D (2010) | |
| #Detecting Trend and Seasonal Changes in Satellite Image Time Series. | |
| #Remote Sensing of Environment, 114(1), 106–115. | |
| #http://dx.doi.org/10.1016/j.rse.2009.08.014 | |
| require(bfast) | |
| require(quantmod) |