PERCENTILE

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

PERCENTILE

Postby cristianlb » Thu Jan 02, 2020 1:38 pm

Hi there, I hope you are keeping well.

I need to get the percentil 1% of a return serie and it is not possible. I receive the message "@PCTILES is an illegal or reserved name". I am employing the following instruction:

scalar perc_rprice=@pctiles(rprice,0.01)

I saw a couple of post about it and the solution is use rank or quantil instead of percentile. Nevertheless, these are not the solution that I need. Please find attached my workfile (Eviews 10).

Please your support and comments.
Many thanks
Attachments
basic_var_model_comparison_sp500_ca.wf1
(133.76 KiB) Downloaded 957 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Mon Jan 06, 2020 10:13 am

Don't you just want @quantile?

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Mon Jan 06, 2020 1:10 pm

Hi, thanks for your message.

I must obtain a percentile metric. Please tell me if Eviews is able to do that and how can I do it.

I await your comments.
Many thanks.
CSS

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Mon Jan 06, 2020 1:22 pm

Perhaps you could define a “percentile metric”

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Mon Jan 06, 2020 1:53 pm

I need to get the percentil 1% of a return serie and it is not possible. I receive the message "@PCTILES is an illegal or reserved name". I am employing the following instruction (Eviews 10):

scalar perc_rprice=@pctiles(rprice,0.01)

Please find attached my file.

I await your comments.
Many thanks
Attachments
basic_var_model_comparison_sp500_ca.wf1
(133.76 KiB) Downloaded 961 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Mon Jan 06, 2020 1:55 pm

So use the @quantile function

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Mon Jan 06, 2020 2:04 pm

mmmm, but you are not clearing my doubt. could you do it?.
Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Mon Jan 06, 2020 2:11 pm

I don't know what your doubt is, so I cannot clear it.

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Tue Jan 07, 2020 5:28 am

Sir,

I imagine that you have used excel. Excel has a function percentile. Please find attached a file with an example of a return series. Sheet2: percentil 1% = -2,96%

Can Eviews replicate this simple calculation and how can do it?. Also, again I have attached eviews workfile in order to do this calculation.

Please explain clearly how can I use the function @pctiles.

I await your comments.
Attachments
Basic_VaR_Model_Comparison_SP500_CA.xls
(574.5 KiB) Downloaded 1095 times
basic_var_model_comparison_sp500_ca.wf1
(133.76 KiB) Downloaded 891 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Tue Jan 07, 2020 8:18 am

Have you tried @quantile? It does the same thing as the percentile function in Excel.

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Tue Jan 07, 2020 10:43 am

yes I did. and the result is not the same.

So, for "n" times, could you please give any useful support about my questions?.

Thanks,

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13600
Joined: Tue Sep 16, 2008 5:38 pm

Re: PERCENTILE

Postby EViews Gareth » Tue Jan 07, 2020 11:24 am

I'm trying to help, but I don't see why @quantile doesn't do what you want it to.
2020-01-07_102320.png
2020-01-07_102320.png (309.88 KiB) Viewed 15000 times
The slight difference is because of the interpolation method, probably (it isn't clear what methods Excel uses for interpolation).

EViews Matt
EViews Developer
Posts: 583
Joined: Thu Apr 25, 2013 7:48 pm

Re: PERCENTILE

Postby EViews Matt » Tue Jan 07, 2020 12:48 pm

After a quick empirical check, it appears that Excel is using the van der Waerden interpolation method. That isn't the default interpolation method for EViews, but it is available, e.g.

Code: Select all

scalar perc_rprice=@quantile(exceldata,0.01,"v")

cristianlb
Posts: 7
Joined: Sun Dec 29, 2019 11:28 am

Re: PERCENTILE

Postby cristianlb » Wed Jan 08, 2020 6:15 am

Many Thanks.

Best Regards.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests