Note that there are some explanatory texts on larger screens.

plurals
  1. POGuy Yollin's QuantStrat I lecture issue
    primarykey
    data
    text
    <p>I've been going through Guy's quantstrat lecture (link below) and after repeatedly attempting to re-execute the code, I'm getting a few initial errors that are preventing most of the subsequent code in the lecture from functioning.</p> <p>Here is the code (copied from the lecture with very minor re-arrangements):</p> <pre><code>rm(list=ls(all=TRUE)) #added this to delete memory library(quantstrat) library(blotter) #added this hoping it would rectify the errors library(FinancialInstrument) #added this hoping it would rectify the errors # initialize portfolio, accounts and orders qs.strategy &lt;- "qsFaber" initPortf(qs.strategy, 'SPY', initDate = '1997-12-31') initAcct(qs.strategy, portfolios = qs.strategy, initDate = '1997-12-31', initEq= 1e6) </code></pre> <p>Here are the errors I am getting:</p> <p>1)</p> <pre><code>&gt; initPortf(qs.strategy, 'SPY', initDate = '1997-12-31') Error in exists(paste("portfolio", name, sep = "."), envir = .blotter, : object '.blotter' not found </code></pre> <p>2) </p> <pre><code>&gt; initAcct(qs.strategy, portfolios = qs.strategy, initDate = '1997-12-31', initEq= 1e6) Error in exists(paste("account", name, sep = "."), envir = .blotter, inherits = TRUE) : object '.blotter' not found </code></pre> <p>I had to directly download blotter as I am using Windows 64 bit, but despite copying the code from the lecture, I am unsure why I am getting those errors. My search efforts have indicated that a portion of blotter evolved into the FinancialInstrument package, but even after clearing memory and loading FinancialInstruments I am still getting the same error.</p> <p>Any help would be highly appreciated.</p> <p>LINK to lecture: <a href="http://www.r-programming.org/files/quantstrat-I.pdf" rel="nofollow">http://www.r-programming.org/files/quantstrat-I.pdf</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload