###ATTRIBUTION++++++++++++++++++++++--------------ATTRIBUTION--------------------------------ATTRIBUTION------------
#'SecurityAttribution object generator Function
#'
#' This function generates an S4 object of class SecurityAttribution
#' @param PerformanceData A data frame containing performance metrics for the fund.
#' @export
#' @keywords
#' @examples
#' class.SecurityAttribution(assetData)
#'
#'
class.SecurityAttribution<- function(PerformanceData){
#
#Create object of Holdings
attributionObject<-SecurityAttribution(
AssetClass=as.factor(PerformanceData$AssetClass),
AssetCategory = as.factor(PerformanceData$AssetCategory),
Asset = as.factor(PerformanceData$Asset),
PortfolioReturns = as.numeric(PerformanceData$Returns),
BenchmarkReturns = as.numeric(PerformanceData$Benchmark),
PortfolioWeights=as.numeric(PerformanceData$Weight),
BenchmarkWeights=as.numeric(PerformanceData$BenchmarkWeight)
)
attributionObject
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.