install.packages("foreach") . Quantstrat's installation does not naturally get this package for some reason (at least on Windows), so that may be one cause.
Beyond that, I'm running Windows 8 and R 3.1.1 and can get my packages to successfully install.
If you're running on macs, I'm afraid I can't help too much because I'm not overly familiar with macs.
Also, try the RCpp mailing list, or R-SIG finance mailing lists.
But beyond and above all else, I recommend trying to get a linux installation going.
That said, here's one last workaround: the reason I use Rcpp in my IKTrading package (thus far) is the Heiken Ashi computation (which some may be familiar with), but one that I have yet to personally tackle. However, I do use my osDollarATR function extensively, so here's the code for it and its sister function, lagATR. If IKTrading does not install for you, just copy and paste this code into a file you can source from someplace.
I'm hoping someone else more familiar with the intricacies of the various operating systems can help the packages install, since I can't replicate the installation issues on my end.
Last edited by Big Mike; September 6th, 2014 at 06:37 PM.
Reason: wrapped code in code bbcode
This Link clears it up a bit, but it keeps referring to Windows. How do you go about the SVN process onward in a mac system? I'm guessing you follow the SVN commands, but then what do you do about the build/install. Thanks!
When I used macs at my last official job, there was an application called terminal that brought up the bash terminal. IIRC that terminal functions exactly as a linux/unix command line OS would, allowing you to use the R CMD BUILD and R CMD INSTALL commands to build R packages from their .tar.gz source. I don't remember precisely what I did, but it involved using those two commands quite a bit.
I did not do a foreach installation. I had it installed seperately already with redis. However I did install Rtools for windows and then I restarted my Rstudio session. I did not actually access anything or run anything specifically through R tools. But maybe it helped? To be honest No idea but it works now.
As far as I understand, Rtools is critical for getting some unix-like functionality into windows to allow the R CMD BUILD and R CMD INSTALL commands to execute properly. Since both of my packages use a sprinkling of Rcpp (R/C++ hybrid), Rtools is necessary.
The cmd line does work, as well as in R Studio with the following code:
However, you have to specify the packages you want to install from quantstrat, FinancialInstrument, and blotter, and there are apparently some dependencies, so order is important here. This leaves me with a couple questions:
1) What packages do I need, and how do I look inside the .tar.gz to see what they are named for the command prompt?
2) How do I install the dependencies first?
3) How do I get the "TTR" package? I can't seem to find this in R-Forge?
4) Please tell me this only has to be done one time?
At first I was sceptical about the speed of R compared to Matlab.
However, R has a definite advantage about reading large CSV files about Matlab this is a
crucial feature in case I want to investigate price action on a minute data or even tick data file.
I had to write my own extension for reading CSV efficiently in Matlab.
I realized that R is as fast as my plugin for reading large CSV in Matlab.
So this is a big plus for R in my opinion.
Therefore, I will keep on learning R.
However in my opinion I would like to use it for maybe intraday seasonalities e.g. average all minute trade data for only mondays and see if there is a distinctive price pattern. I think for those investigations R is very well suited and
this is something one can only hardly do with standard commercial charting software packages.
Or maybe to investigate how much do the today highs penetrate yesterday highs in an uptrend (defined by close above EMA or any trend indicator), by plotting an histogram of those data.
So I would use it more for the first steps of developing a trading system, than for backtesting.
I will enjoy the next webinar and I am very curious what Ilya can do with R.
So overall a great start in my opinion.
The following user says Thank You to FB2012 for this post: