action portfoliooptimizer_post_assets_correlation_matrix_distance { label: "Correlation Matrix Distance" description: "Compute the distance between an asset correlation matrix and a reference correlation matrix, using one of the following distance metrics:\n* Euclidean distance (default), which is the distance induced by [the Frobenius norm](https://en.wikipedia.org/wiki/Matrix_norm#Frobenius_norm)\n* Correlation matrix distance, defined in the first reference, which corresponds to [the cosine distance](https://en.wikipedia.org/wiki/Cosine_similarity) between the two vectorized asset correlation matrices\n* Bures distance, defined in the second reference\n\n References\n * [M. Herdin, N. Czink, H. Ozcelik and E. Bonek, Correlation matrix distance, a meaningful measure for evaluation of non-stationary MIMO channels, 2005 IEEE 61st Vehicular Technology Conference, 2005, pp. 136-140 Vol. 1](https://ieeexplore.ieee.org/document/1543265)\n * [Rajendra Bhatia, Tanvi Jain, Yongdo Lim, On the Bures–Wasserstein distance between positive definite matrices, Expositiones Mathematicae, Volume 37, Issue 2, 2019](https://www.sciencedirect.com/science/article/pii/S0723086918300021)\n" provider: portfoliooptimizer method: POST path: "/assets/correlation/matrix/distance" encoding: json input: { required: ["assets", "assetsCorrelationMatrix", "referenceCorrelationMatrix"] properties: { assets: { type: "integer" } assetsCorrelationMatrix: { type: "array" description: "assetsCorrelationMatrix[i][j] is the correlation between the asset i and the asset j" items: { type: "array" items: { type: "number" } } } distanceMetric: { type: "string" description: "The distance metric to use to compute the distance between the asset correlation matrix and the reference correlation matrix" enum: ["euclidean", "correlationMatrix", "bures"] } referenceCorrelationMatrix: { type: "array" description: "referenceCorrelationMatrix[i][j] is the reference correlation between the asset i and the asset j" items: { type: "array" items: { type: "number" } } } } } output: { type: "object" required: ["assetsCorrelationMatrixDistance"] properties: { assetsCorrelationMatrixDistance: { type: "number" description: "The computed distance between the two correlation matrices" } } } }