i need your assistance. I am trying to analyze the safe haven properties of an asset against another. I have the conditional correlation of the two assets, but i don't know how to get the quantile 10, 5 and 1 percent to determine whether the asset is a sa

i need your assistance. I am trying to analyze the safe haven properties of an asset against another. I have the conditional correlation of the two assets, but i don't know how to get the quantile 10, 5 and 1 percent to determine whether the asset is a safe haven, diversifier or hedge.

R has a quantile function that you can use to determine the quantiles of a numeric vector. It seems like you are asking about that ?

Yes. I have tried to search for it. But I couldn't find it.

The quantile function is part of base R. Here is its usage from the help section accessed with ?quantile.

quantile(x, probs = seq(0, 1, 0.25), na.rm = FALSE,
         names = TRUE, type = 7, digits = 7, ...)

Here is an example of using it with a vector.

DataSet <- rnorm(100)
quantile(DataSet, probs = c(0.10, 0.05, 0.01))
      10%        5%        1% 
-1.020569 -1.173271 -1.862599 

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.