Learn R Programming

quantstrat (version 0.16.7)

clone.portfolio: clone a portfolio object, potentially stripping all history

Description

creates a copy of a portfolio, stripping all history (transactions etc)

Usage

clone.portfolio(portfolio.st, cloned.portfolio.st, strip.history = TRUE,
  src_envir = .blotter, target_envir = .blotter)

Arguments

portfolio.st

string identifying the source portfolio

cloned.portfolio.st

string naming the target portfolio

strip.history

boolean, default TRUE, whether to remove all transaction and portfolio history, keeping only the structure (e.g. assets)

src_envir

environment to get the portfolio to be cloned from, default .blotter

target_envir

environment to put the cloned portfolio in, passed to put.portfolio