Plot exposures and NAV timeseries as a stacked area chart

stacked_area_chart(results_df, title, tickers, colours)

Arguments

results_df

Results dataframe from rsims backtest with daily NAV

title

Plot title

tickers

Character vector of tickers used in the simulation

colours

Character vector of colours to use for tickers and Cash exposures

Value

A ggplot2 stacked area chart of timeseries of exposures and NAV

Examples

if (FALSE) {
tickers = unique(prices$ticker)
my_cols = portfolio_colours(length(tickers))
cash_backtest(prices, weights) %>%
  append_nav_to_bt_results() %>%
  stacked_area_chart("Exposures and NAV", tickers = tickers, colours = my_cols)
}