Skip to contents

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?

Value

ggplot object