TrackingError | R Documentation |
A measure of the unexplained portion of performance relative to a benchmark.
TrackingError(Ra, Rb, scale = NA)
Ra |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
Rb |
return vector of the benchmark asset |
scale |
number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4) |
Tracking error is calculated by taking the square root of the average of the squared deviations between the investment's returns and the benchmark's returns, then multiplying the result by the square root of the scale of the returns.
TrackingError = sqrt(sum(Ra - Rb)^2 / (length(R) - 1)) * sqrt(scale)
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Sharpe, W.F. The Sharpe Ratio,Journal of Portfolio
Management,Fall 1994, 49-58.
See also package PerformanceAnalytics
.
InformationRatio
TrackingError
data(assetReturns) assetReturns=assetReturns["2011::2018"] #short sample for fast example Ra=assetReturns[, -29] Rb=assetReturns[,29] #DJI TrackingError(Ra, Rb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.