On Tue, 21 Jul 2020, F.R.Costa wrote:
Hi all,
I'm trying to determine the quantile value (as a scalar) for a
list of series and I really don't know how to do it. Let's say I
want p=0.7 on the following example:
<hansl>
open greene13_1.gdt
list list_mv = F_GM F_CH F_GE F_WE F_US
</hansl>
Basically I have a list of 5 series with market values and I want
to determine extreme values in order to proceed with
winsorisation. But the quantile function seems not tailored for
this.
The quantile() function takes either a series or a matrix argument,
so your options are:
(1) Loop across the series members of the list:
loop foreach i list_mv
eval quantile($i, 0.7)
endloop
(2) Turn the list into a matrix on the fly, one series by column
(and get a row vector result):
eval quantile({list_mv}, 0.7)
Allin