change_amounts: Update a portfolio

Description Usage Arguments Value

View source: R/portfolios.R

Description

Updates a portfolio from a named list of new amounts

Usage

1
change_amounts(portfolio, changed_amounts, nonneg = TRUE)

Arguments

portfolio

a portfolio object

changed_amounts

a named list indicating to what the balance of an asset should be changed

nonneg

a boolean indicating if only nonnegative amounts are allowed for an asset balance. Use FALSE to indicate that negative values are allowed.

Value

the updated portfolio


ryanholbrook/investmentsim documentation built on Nov. 5, 2019, 5:10 a.m.