0

I’ve been working with Quantstrat for the last 3 weeks and trying to understand ever step the functions takes and how it uses the different environments. In this learning process, I played around with the code a lot. Now I got to a point where my “playing around” corrupted my settings so much, that the Package doesn’t work – which is fine.

My logic was, I can always just remove and reinstall the package. Unfortunately, that’s not the Case.

At this point I tried reinstalled everything (R, Rstudio, deleted all Files on my Hard drive involving R, removed Registry values) and Quantstrat is still not working.

How do in I set up a clean version of Quantstrat/blotter? Am I missing something? Thanks!

When i install Blotter and Quantstrat I get following Logs:

`

Downloading GitHub repo braverock/quantstrat@master
from URL https://api.github.com/repos/braverock/quantstrat/zipball/master
Installing quantstrat
Downloading GitHub repo braverock/blotter@master
from URL https://api.github.com/repos/braverock/blotter/zipball/master
Installing blotter
"C:/Users/parzyszek/Documents/R/R-3.4.4/bin/x64/R" --no-site-file  \
  --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c16f410d7/braverock-blotter-bc75cf5"  \
  --library="C:/Users/parzyszek/Documents/R/R-3.4.4/library" --install-tests 

* installing *source* package 'blotter' ...
** libs

*** arch - i386
c:/Rtools/mingw_32/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O3 -Wall  -std=gnu99 -mtune=generic -c calcPosAvgCost.c -o calcPosAvgCost.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O3 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o blotter.dll tmp.def calcPosAvgCost.o init.o -LC:/Users/parzyszek/Documents/R/R-3.4.4/bin/i386 -lR
installing to C:/Users/parzyszek/Documents/R/R-3.4.4/library/blotter/libs/i386

*** arch - x64
c:/Rtools/mingw_64/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c calcPosAvgCost.c -o calcPosAvgCost.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o blotter.dll tmp.def calcPosAvgCost.o init.o -LC:/Users/parzyszek/Documents/R/R-3.4.4/bin/x64 -lR
installing to C:/Users/parzyszek/Documents/R/R-3.4.4/library/blotter/libs/x64
** R
** data
** demo
** tests
** byte-compile and prepare package for lazy loading
Note: no visible binding for '<<-' assignment to '.blotter' 
** help
*** installing help indices
  converting help for package 'blotter'
    finding HTML links ... fertig
    AcctReturns                             html  
    IBM                                     html  
    PortfReturns                            html  
    addAcctTxn                              html  
    addDiv                                  html  
    addPortfInstr                           html  
    addTxn                                  html  
    amzn                                    html  
    blotter-package                         html  
    calcPortfWgt                            html  
    calcPosAvgCost                          html  
    calcTxnAvgCost                          html  
    calcTxnValue                            html  
    chart.ME                                html  
    chart.Posn                              html  
    chart.Reconcile                         html  
    chart.Spread                            html  
    dailyTxnPL                              html  
    extractTxns                             html  
    getAccount                              html  
    getByPortf                              html  
    getBySymbol                             html  
    getEndEq                                html  
    getPortfAcct                            html  
    getPortfolio                            html  
    getPos                                  html  
    getPosAvgCost                           html  
    getPosQty                               html  
    getTxns                                 html  
    hist.mcsim                              html  
    hist.txnsim                             html  
    initAcct                                html  
    initPortf                               html  
    initPosPL                               html  
    initSummary                             html  
    initTxn                                 html  
    is.account                              html  
    is.portfolio                            html  
    mcsim                                   html  
    pennyPerShare                           html  
    perTradeStats                           html  
    plot.mcsim                              html  
    plot.txnsim                             html  
    put.account                             html  
    put.portfolio                           html  
    quantile.mcsim                          html  
    quantile.txnsim                         html  
    summary.mcsim                           html  
    summary.txnsim                          html  
    tradeQuantiles                          html  
    tradeStats                              html  
    txnsim                                  html  
    txnsim.portfs                           html  
    txnsim.portnames                        html  
    txnsim.txns                             html  
    updateAcct                              html  
    updateEndEq                             html  
    updatePortf                             html  
    updatePosPL                             html  
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (blotter)
Making 'packages.html' ... fertig
In R CMD INSTALL
"C:/Users/parzyszek/Documents/R/R-3.4.4/bin/x64/R" --no-site-file  \
  --no-environ --no-save --no-restore --quiet CMD INSTALL  \
  "C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c7fee4403/braverock-quantstrat-a5e271c"  \
  --library="C:/Users/parzyszek/Documents/R/R-3.4.4/library" --install-tests 

* installing *source* package 'quantstrat' ...
** libs

*** arch - i386
c:/Rtools/mingw_32/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O3 -Wall  -std=gnu99 -mtune=generic -c firstCross.c -o firstCross.o
c:/Rtools/mingw_32/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O3 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o quantstrat.dll tmp.def firstCross.o init.o -LC:/Users/parzyszek/Documents/R/R-3.4.4/bin/i386 -lR
installing to C:/Users/parzyszek/Documents/R/R-3.4.4/library/quantstrat/libs/i386

*** arch - x64
c:/Rtools/mingw_64/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c firstCross.c -o firstCross.o
c:/Rtools/mingw_64/bin/gcc  -I"C:/Users/parzyszek/Documents/R/R-3.4.4/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c init.c -o init.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o quantstrat.dll tmp.def firstCross.o init.o -LC:/Users/parzyszek/Documents/R/R-3.4.4/bin/x64 -lR
installing to C:/Users/parzyszek/Documents/R/R-3.4.4/library/quantstrat/libs/x64
** R
** data
** demo
** inst
** tests
** byte-compile and prepare package for lazy loading
Note: no visible binding for '<<-' assignment to '.strategy' 
Note: no visible binding for '<<-' assignment to 'hold' 
** help
*** installing help indices
  converting help for package 'quantstrat'
    finding HTML links ... fertig
    SharpeRatio.deflated                    html  
    SharpeRatio.haircut                     html  
    add.distribution                        html  
    add.distribution.constraint             html  
    add.indicator                           html  
    add.init                                html  
    add.rule                                html  
    add.signal                              html  
    addOrder                                html  
    addPosLimit                             html  
    apply.paramset                          html  
    apply.paramset.signal.analysis          html  
    applyIndicatorSignals                   html  
    applyIndicators                         html  
    applyParameter                          html  
    applyRules                              html  
    applySignals                            html  
    applyStrategy                           html  
    applyStrategy.rebalancing               html  
    beanplot.signals                        html  
    chart.forward                           html  
    chart.forward.training                  html  
    degrees.of.freedom                      html  
    delete.paramset                         html  
    distributional.boxplot                  html  
    dotaudit                                html  
    dotprofitHurdle                         html  
    enable.rule                             html  
    get.strategy                            html  
    getOrderBook                            html  
    getOrders                               html  
    getParameterTable                       html  
    getPosLimit                             html  
    initOrders                              html  
    initStrategy                            html  
    initSymbol                              html  
    install.param.combo                     html  
    is.strategy                             html  
    load.strategy                           html  
    match.names                             html  
    osMaxPos                                html  
    osNoOp                                  html  
    paramConstraint                         html  
    portfolio.luxor                         html  
    post.signal.returns                     html  
    print.dof                               html  
    print.haircutSR                         html  
    print.profitHurdle                      html  
    profitHurdle                            html  
    put.orderbook                           html  
    put.strategy                            html  
    quantstrat-package                      html  
    rm.strat                                html  
    ruleOrderProc                           html  
    rulePctEquity                           html  
    ruleRevoke                              html  
    ruleSignal                              html  
    sample_random_multests                  html  
    save.strategy                           html  
    setParameterConstraint                  html  
    setParameterDistribution                html  
    sigComparison                           html  
    sigCrossover                            html  
    sigFormula                              html  
    sigPeak                                 html  
    sigThreshold                            html  
    sigTimestamp                            html  
Rd warning: C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c7fee4403/braverock-quantstrat-a5e271c/man/sigTimestamp.Rd:16: missing file link 'split.xts'
Rd warning: C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c7fee4403/braverock-quantstrat-a5e271c/man/sigTimestamp.Rd:18: missing file link '.indexday'
    signal.generate.statistics              html  
    signal.obj.slope                        html  
    signal.path.plot                        html  
    signal.plot                             html  
    spx                                     html  
    stats                                   html  
    stratBBands                             html  
    stratFaber                              html  
    strategy                                html  
    tradeGraphs                             html  
    tradeOrderStats                         html  
    updateOrders                            html  
    updateStrategy                          html  
    finding level-2 HTML links ... done

    walk.forward                            html  
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (quantstrat)
Making 'packages.html' ... fertig
In R CMD INSTALL`
  • Have you tried rebuilding the package? Try `devtools::install_github("braverock/quantstrat")`. – FXQuantTrader Jun 27 '18 at 13:39
  • Thanks for the responce. Yes i tried that. I have the feeling that Quantstrat doesnt "declare" all the environments on the second installation. Isnt there a way to "brutfource" a full and clean reinstallation? – Andy Parzyszek Jun 27 '18 at 13:58
  • Delete the package from your R library (check `.libPaths()`). If you've genuinely reinstalled R and reinstalled all the packages what you're saying doesn't make sense. quantstrat should be a fresh install after installing from source. – FXQuantTrader Jun 28 '18 at 00:43
  • Yes, thats also what i expected – If i reinstall quantstrat using `devtools::install_github("braverock/quantstrat")` then I should have a fresh installation. I get following Warnings when i reinstall the Package: `Rd warning:` `C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c7fee4403/br``averock-quantstrat-a5e271c/man/sigTimestamp.Rd:16: missing file link 'split.xts' `Rd warning:` ` `C:/Users/parzyszek/AppData/Local/Temp/RtmpQluHtW/devtools1f8c7fee4403/bra verock-quantstrat-a5e271c/man/sigTimestamp.Rd:18: missing file link '.indexday'` – Andy Parzyszek Jun 28 '18 at 08:42

0 Answers0