Allows to measure the distance or similarity between assets.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
assetsDist(x, method="cor", ...)
corDist(x)
kendallDist(x)
spearmanDist(x)
mutinfoDist(x, nbin=10)
euclideanDist(x)
maximumDist(x)
manhattanDist(x)
canberraDist(x)
binaryDist(x)
minkowskiDist(x)
braycurtisDist(x)
mahalanobisDist(x)
jaccardDist(x)
sorensenDist(x)
``` |

`x` |
any rectangular time series object which can be converted by the
function |

`method` |
a character string, the method from which to compute the
distances. Allowed methods include |

`nbin` |
an integer value, the number of bins, by default 10. |

`...` |
optional argument to be passed the distance function. |

`corDist`

, `kendallDist`

, and `spearmanDist`

call the
base `cov`

function from R.

`mutinfoDist`

calls the function `mutinfo`

from the contributed
R package `bioDist`

.

`euclideanDist`

, `maximumDist`

, `manhattanDist`

,
`canberraDist`

, `binaryDist`

, and `minkowskiDist`

are functions build on top of R's base package.

`braycurtisDist`

, `mahalanobisDist`

, `jaccardDist`

,
and `sorensenDist`

call functions from
the contributed R package `ecodist`

.

an object of class `dist`

.

Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009);
*Portfolio Optimization with R/Rmetrics*,
Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ```
## LPP -
# Load Swiss Pension Fund Data:
LPP <- LPP2005REC[, 1:6]
head(LPP)
## Returns correlation distance measure
corDist(LPP)
## Returns kendalls correlation distance measure
kendallDist(LPP)
## Returns spearmans correlation distance measure
spearmanDist(LPP)
## Return mutual information distance measure
mutinfoDist(LPP)
## Return Euclidean distance measure
euclideanDist(LPP)
## Return maximum distance measure
maximumDist(LPP)
## Return Manhattan distance measure
manhattanDist(LPP)
## Return Canberra distance measure
canberraDist(LPP)
## Return binary distance measure
binaryDist(LPP)
## Return Minkowsky distance measure
minkowskiDist(LPP)
## Return Bray Curtis distance measure
braycurtisDist(LPP)
## Return Mahalanobis distance measure
# mahalanobisDist(LPP)
## Return Jaccard distance mesaure
jaccardDist(LPP)
## Return Sorensen distance measure
sorensenDist(LPP)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.