Introduction to quantstrat

Great idea, Josh. I’m looking forward to seein…

Alexis Petit - Aug 5, 2011

Great idea, Josh. I’m looking forward to seeing the next posts! I think this will help many of us make a better use of Quantstrat. Many thanks!

package quantstrat is not available (for R version 2.13.1)

need manual compilation?

Thank you for your work, really helpful!

From windows:

install.packages(“quantstrat”, repos="http://R-Forge.R-project.org”)
Installing package(s) into ‘C:/Users/Res1/Documents/R/win-library/2.13’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘quantstrat’ is not available (for R version 2.13.1)

What do I do?

arippbbc and FBSP,

There’s some issue with R-forge building quantstrat. We’re working with the R-forge maintainers to find a solution.

In the meantime, you can try some of the solutions in the Windows packages section of the R Installation and Administration manual (e.g. win-builder).

After I setup my windows box to compile R packages - using this link as a guide

http://robjhyndman.com/researchtips/building-r-packages-for-windows/

(I did have manually add R to my system path variable.)

I was able to build blotter, FinancialInstrument, and quantstrat from source and and install it by following the directions on this post

http://r.789695.n4.nabble.com/Package-quot-quantstrat-quot-td3599657.html#a3599994

JU if you send me an email I will send you the package tar.gz files that were created.

The Windows binary of quantstrat is now building on R-forge.

FBSP’s solution works for me.

Try this:

http://www.programmingr.com/content/installing-quantstrat-r-forge-and-source/

Hi all,
I’m very new to R but looking at getting the Quantstrat package but i can’t manage /don’t understand the method outlined above, can anyone either explain it in layman/idiot terms or provide an alternative solution?
Regards
Pete

Just to let people know I have downloaded rtools but i didn’t understand the next instructions regarding path setup in the links provided.
Regards
Pete

Hi Pete,

Garrett See has a nice answer on stackoverflow about how to build R-Forge packages from source.

Hi

Nice post, very helpful with demos and examples, thanks.

I tried running the example code directly from the post without any changing anything and I got the result that no trades were generated in:

updatePortf(“faber”)

although the Cl.gt.SMA and Cl.lt.SMA changed several times
between 0/1 in the out variable:

out <- try(applyStrategy(strategy=stratFaber, portfolios="faber”))

I’m running
R version 2.15.2 from Rstudio
PerformanceAnalytics 1.0.4.4
quantstrat 0.7.7
blotter 0.8.13

Am I missing somthing, or does the example simply not work
on newer versions?

KR Morten