View source: R/AngularDistance.R

AngularDistance | R Documentation |

Calculates the angular distance between a matrix of the track records of various assets/strategies. The sign of the correlation can be ignored for long/short portfolios.

AngularDistance(returns_matrix, long_short = FALSE)

`returns_matrix` |
a matrix containing the track records of the underlying assets/strategies. |

`long_short` |
a boolean value which results in the sign of the correlation being ignored, default value is FALSE |

A matrix containing the angular distance values.

Tasos Grivas <tasos@openriskcalculator.com>

Lopez de Prado, Marcos, Codependence (Presentation Slides) (January 2, 2020). Available at SSRN: https://ssrn.com/abstract=3512994

## calling AngularDistance() without an argument loads the historical edhec data ## for the "Short Selling" and "Convertible Arbitrage" strategies returns_matrix = PerformanceAnalytics::edhec[,c("Short Selling","Convertible Arbitrage")] angular_distance = AngularDistance(returns_matrix, long_short=FALSE)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.