plot_cor | R Documentation |
Plotting correlation heatmaps based on correlation of assets
plot_cor(cor_df, title = NULL)
cor_df |
long form dataframe (see tidyr::gather), containing columns 'strat1', 'strat2', 'corr' |
title |
optional title of chart |
None
unwt_ret <- data.frame(date = as.Date(c("2018-01-02", "2018-01-03", "2018-01-04", "2018-01-05")), long_spx = c(0.015, 0.021, -0.03, 0.01), long_ukx = c(-0.005, 0.03, -0.01, -0.04), long_hsi = c(0.023, 0.001, -0.005, 0.008)) cor_df <- calc_cor(unwt_ret) plot_cor(cor_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.