invest: Get investment recommendations

Description Usage Arguments Examples

View source: R/invest.R

Description

Get investment recommendations

Usage

1
2
invest(total, current, weights = c(cdn = 0.2, us = 0.2, eur = 0, cdn_b = 0.4,
  int = 0.2), positive_only = FALSE)

Arguments

total

Scalar numeric giving the total amount to be invested

current

a vector of current assets in the same order as weights

weights

an optionally named vector of desired investment weights

positive_only

Should investments be positive only? If FALSE then negative investments may be suggested (i.e. selling one asset and purchasing another

invest

the amount to invest

Examples

1
2
invest(30000, c(9000, 7000, 6000, 15000, 7000))
invest(30000, c(9000, 7000, 6000, 15000, 7000), positive_only = TRUE)

seananderson/spudr documentation built on May 29, 2019, 4:26 p.m.