Skip to content
Prev 12065 / 15274 Next

quantstrat: "Error in initPortf"

On Sat, Nov 30, 2013 at 10:27 PM, GiuseppeL <borsaric at gmail.com> wrote:
Accounts and portfolios are by default stored in .blotter. Once the
code is run once the accounts exist and don't need to be created
again.

ls(.blotter)

You can break the examples into two pieces, one you run once to set
things up and a second one you run when you want to do work. Or, you
can consider adding something like

suppressWarnings(rm("account.ETF_Momentum", pos = .blotter))
suppressWarnings(rm("portfolio.Equity", pos = .blotter))
suppressWarnings(rm("portfolio.Cash", pos = .blotter))

but of course change the names to match what you (or Guy) used.

HTH,
Mark