Publications by systematicinvestor
getSymbols Extra
The getSymbols function from the quantmod package is an easy and convenient way to bring historical stock prices into your R environment. You need to specify the list of tickers, the source of historical prices and dates. For example following commands will download historical stock prices from yahoo finance for ‘RWX’, ‘VNQ’, ‘VGSIX’ ...
2549 sym R (1392 sym/4 pcs) 8 img
Fast Threshold Clustering Algorithm (FTCA) test
Today I want to share the test and implementation for the Fast Threshold Clustering Algorithm (FTCA) created by David Varadi. This implementation was developed and contributed by Pierre Chretien, I only made minor updates. Let’s first replicate the results from the Fast Threshold Clustering Algorithm (FTCA) post: #############################...
1177 sym R (3412 sym/3 pcs) 6 img
Averaged Input Assumptions and Momentum
Today I want to share another interesting idea contributed by Pierre Chretien. Pierre suggested using Averaged Input Assumptions and Momentum to create reasonably quiet strategy. The averaging techniques are used to avoid over-fitting any particular frequency. To create Averaged Input Assumptions we combine returns over different look-back period...
2267 sym R (6160 sym/3 pcs) 12 img
Weekend Reading: F-Squared
Mebane Faber posted another interesting blog post: Building a Simple Sector Rotation on Momentum and Trend that caught my interest. Today I want to show how you can test such strategy using the Systematic Investor Toolbox: ############################################################################### # Load Systematic Investor Toolbox (SIT) # ht...
1153 sym R (3331 sym/1 pcs) 6 img
Probabilistic Momentum
David Varadi has recently discussed an interesting strategy in the Are Simple Momentum Strategies Too Dumb? Introducing Probabilistic Momentum post. David also provided the Probabilistic Momentum Spreadsheet if you are interested in doing computations in Excel. Today I want to show how you can test such strategy using the Systematic Investor Tool...
1847 sym R (3801 sym/4 pcs) 8 img
Intraday data
In the Intraday Backtest post I showed an example of loading and working with Forex Intraday data from the FXHISTORICALDATA.COM. Recently, I came across another interesting source of Intraday data at the Bonnot Gang site. Please note that you will have to register to get access to the Intraday data; the registration is free. Today, I want examine...
2640 sym R (7037 sym/8 pcs) 14 img
Capturing Intraday data
I want to follow up the Intraday data post with an example of how you can capture Intraday data without too much effort by recording 1 minute snapshots of the market. I will take market snapshots from Yahoo Finance using following function that downloads delayed market quotes with date and time stamps: ############################################...
1192 sym R (2358 sym/3 pcs) 4 img
Probabilistic Momentum with Intraday data
I want to follow up the Intraday data post with testing the Probabilistic Momentum strategy on Intraday data. I will use Intraday data for SPY and GLD from the Bonnot Gang to test the strategy. ############################################################################## # Load Systematic Investor Toolbox (SIT) # http://systematicinvestor.wordpr...
1263 sym R (3986 sym/3 pcs) 10 img
Capturing Intraday data, Backup plan
In the Capturing Intraday data post, I outlined steps to setup your own process to capture Intraday data. But what do you do if you missed some data points due for example internet being down or due to power outage your server was re-started. To fill up the gaps in the Intraday data, you could get up to 10 day historical Intraday data from Google...
1026 sym R (1372 sym/1 pcs) 6 img
Quality of Historical Stock Prices from Yahoo Finance
I recently looked at the strategy that invests in the components of S&P/TSX 60 index, and discovered that there are some abnormal jumps/drops in historical data that I could not explain. To help me spot these points and remove them, I created a helper function data.clean() function in data.r at github. Following is an example of how you can use d...
1450 sym R (4359 sym/4 pcs) 8 img