apaCorrels.Conditional.Quantile.Lower(TimeSeries, Quantile)
=apaCorrels.Conditional.Quantile.Lower(TimeSeries, Quantile)Result
Calculates the conditional correlation matrix for observations where the row asset is at or below the quantile.
Syntax
TimeSeries: r x c data matrix, each column containing a time series
Quantile: quantile as a fraction between 0 and 1 (e.g. 0.1 for 10%)
Remarks
Element (i, j) is computed on the observations selected by the row asset i, so the matrix is not symmetric: element (j, i) conditions on asset j. Observations are ranked per series (rank 1 = lowest, tied values receive their average rank). An observation is at or below the quantile if its rank is at most Quantile x r, and above otherwise, so Quantile = 0.1 selects exactly 10% of the observations when there are no ties. TimeSeries must be a complete numeric matrix (empty cells are read as 0, text returns #VALUE!). Each correlation is the Pearson correlation of the selected observations. #N/A is returned where fewer than two observations are selected or where one of the two series is constant on them; with exactly two selected observations the correlation is always +1 or -1. The diagonal is 1 (#N/A for a constant series).
