Description Usage Arguments Details Value
This function is typically used to calculate the efficiency of inverse funds or ETFs with respect to a benchmark such as its underlying index.
1 |
data |
The xts time series to normalize |
k |
The constant (a vector) used to multiply the returns of the time series. The length of this vector must equal the number of columns in the xts matrix provided. |
bench |
Name of the benchmark from which to compute the differences. If NA (default), then $diff is not computed and not returned in the return list. |
na.omit |
Logical. Specifies whether NA rows are omitted. This effectively removes all leading rows containing NAs. |
An xts time series is provided. Its returns are computed and multiplied by a constant k to make it equivalent to the benchmark. A list of three quantities are retured: the returns series ($rets), a normalized equity curve ($ec), and the percentage difference between the equity curves ($diff).
If more than 2 time series are provided (more than 2 columns), all series including the benchmark are implicitly truncated to align at the start of the latest series. This is so the equity curve of the benchmark and all others start at the same time.
A list containting three xts matrices: $rets contains a matrix of returns, $ec contains a matrix of equity curves, and $diff contains a matrix of differences.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.