Description Usage Arguments Value Examples
Converts sequence of prices to sequence of gains for one or more investments.
1 | prices_gains(prices)
|
prices |
Numeric vector of prices for one investment or data frame with one column for each investment and an optional Date variable. |
Numeric vector or data frame.
1 2 3 4 5 6 7 8 | ## Not run:
# Load 2017 prices for Netflix and Amazon, and calculate growth of $10k
prices <- load_prices(c("NFLX", "AMZN"), initial = 1000)
# Calculate gains
gains <- prices_gains(prices)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.