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="”)
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

(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

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:

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?

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

Hi Pete,

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


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:


although the and 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
quantstrat 0.7.7
blotter 0.8.13

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

KR Morten