Thank you for joining the forum, Ron.
Programming is a lot of fun. Delegating the whole trading process to a machine is an interesting intellectual challenge that requires a great deal of patience and a lot of hard work.
You mentioned that you do not have programming skills. If you want to have full control over the strategy development process, it's worth acquiring them. R is a fantastic platform and a reasonably friendly language. You have made a good choice. You might like to pick up one of the "classical" languages (e.g. C, Java) to become more comfortable with programming.
Here is an oversimplified version of a trading model you could play with:
Code:require(quantmod)
symbol = "^GSPC"
start = "2001-01-01"
end = "2011-12-31"
prices = getSymbols(symbol, from = start, to = end, auto.assign = FALSE)
fastLen = 15
slowLen = 300
close = prices[,6]
fastMA = SMA(close, n = fastLen)
slowMA = SMA(close, n = slowLen)
sig = 0;
sig = ifelse(fastMA > slowMA, 1, -1)
sig = lag(sig, 1)
sig[is.na(sig)] = 0
ret = ROC(close, type="discrete")
ret[1] = 0
eq = cumprod(1 + ret * sig)
lineChart(prices)
addSMA(fastLen, col = "blue")
addSMA(slowLen, col = "red")
addTA(eq, col = "cyan")
If you have not installed
quantmod package yet, you can do so by running the following command:
install.packages("quantmod")You might find the following high level back testing guide useful:
http://blog.fosstrading.com/2011/03/how-to-backtest-strategy-in-r.htmlOne more thing! I left one important condition out in the signal generator. Let's see if you can spot it.