Thanks for the tutorial. However, when I ran it, … Leo - Mar 6, 2011Thanks for the tutorial. However, when I ran it, I got this error: Error: could not find function “DVI” I can’t seem to get the DVI indicator out of TTR. I’ve tried installing the package from CRAN, using install.packages(‘TTR’,dependencies=TRUE) and from r-forge, using install.packages(“TTR”,repos="http://r-forge.r-project.org”). In both cases it installs fine, and other indicators work, but there’s no DVI indicator.
This is the third post in the Backtesting in Excel and R series and it will show how to backtest a simple strategy in R. It will follow the 4 steps Damian outlined in his post on how to backtest a simple strategy in Excel. Step 1: Get the data The getSymbols function in quantmod makes this step easy if you can use daily data from Yahoo Finance. There are also “methods” (not in the strict sense) to pull data from other sources (FRED, Google, Oanda, R save files, databases, etc.
Good summary. This is much more efficient than c… Rocko Chen - Mar 3, 2011Good summary. This is much more efficient than coding + debugging + testing stuff in programming languages e.g. JAVA, Matlab, C++. Thanks for the comment Rocko - I think what you’ll find is that as the complexity of a model goes up, you may want to look at other approaches as well! I use the Sharpe Ratio to judge the effectivness of my investments.
(This is a guest post by Damian from Skill Analytics and ETF Prophet) Let me start by saying that I’m not an expert in backtesting in Excel – there are a load of very smart bloggers out there that have, as I would say, “mad skillz” at working with Excel including (but not limited to) Michael Stokes over at marketsci.com, Jeff Pietch over at etfprophet.com and the folks (David and Corey) over at cssanalytics.
Hi Joshua, Thanks for excellent advice. ‘Keep… Ravi Aranke - Mar 0, 2011Hi Joshua, Thanks for excellent advice. ‘Keep at it till you figure it out’. Indeed. It would be great if you could offer your thoughts on how to move to next stage of R viz. building packages. How and when did you make that transition? What are the good resources, sites, tools toward that? Thanks a lot, Ravi
This first post of the Backtesting in Excel and R series will provide some resources to help smooth the transition from the familiarity and comfort of Excel to the potentially strange and intimidating world of R. I made my voyage from Excel to R more than 5 years ago and learned mostly by trial and error (and reading the R manuals). Most people don’t prefer my approach of “keep at it until you figure it out”, so I don’t have a lot of personal advice to share.
Looking forward to the posts! Kristianson - Feb 5, 2011Looking forward to the posts!
This post is the introduction to a series that will illustrate how to backtest the same strategy in Excel and R. The impetus for this series started with this tweet by Jared Woodard at Condor Options. After Soren Macbeth introduced us, Jared suggested backtesting a simple DVI strategy in Excel and R. The three-post series will show you: Resources that make it easier to move from Excel to R How to test DVI in Excel How to test DVI in R Since I know next to nothing about testing strategies in Excel, I will be writing posts 1 and 3.