Learn R Programming

lares (version 4.7)

splot_roi: Portfolio Plots: Daily ROI

Description

This function plots a portfolio's historical ROI since inception or since last n days, with 2 moving average lines.

Usage

splot_roi(p, n_days = 365, historical = TRUE, ma = c(12, 50),
  save = FALSE)

Arguments

p

Dataframe. Result from daily_portfolio()

n_days

Integer. How many days back you want to see?

historical

Boolean. Historical ROI metric? If not, ROI will be calculated locally for n_days parameter

ma

Numeric Vector. Select 2 values for moving averages. Set to NA to turn this metric off

save

Boolean. Save plot into a local file?

See Also

Other Investment: daily_portfolio, daily_stocks, etf_sector, splot_change, splot_etf, splot_growth, splot_summary, splot_types, stocks_file, stocks_hist, stocks_obj, stocks_report