# PRIIPs category 2 Cornish-Fisher : how to calculate

i am not very good at finance ,but i have been trying to calculate the example from this link. https://www.dropbox.com/s/egfx0ktolojfsek/3.PRIIPs%20Workshop%20-%20Risk%20Reward%20Methodology.pdf?dl=0

According to the regulation we have to calculate $$M1, M2, M3$$ and $$M4$$. For example $$M2=(r_i-M1)^2/M0$$, $$M3=(r_i-M1)^3/M0$$

What i dont understand is, which "$$r_i$$" we have to take for $$M2, M3$$ and $$M4$$

You have made a few typos. The basic idea is for asset returns $$r_i$$ where $$i$$ denotes the observation (often, $$i$$ indexes days), you have: \begin{align} M0 &= \sum_i 1_{r_i} = \text{# of returns} \\ M1 &= \sum_i r_i/M0 = \text{mean return} \\ M2 &= \sum_i (r_i-M1)^2/M0 = \text{variance of returns}^* \\ M3 &= \sum_i (r_i-M1)^3/M0 = \text{third moment}^* \\ M4 &= \sum_i (r_i-M1)^4/M0 = \text{fourth moment}^* \end{align} with the * meaning a big caveat that these are actually wrong in terms of not being the correct degrees of freedom: the M2 sum should be divided by $$M0-1$$; the M3 and M4 sums should be divided by $$M0-2$$. (Is dividing by M0 alone gravely wrong? If you have a small dataset, yes.)
The skewness is then $$M3/M2^{3/2}$$ and kurtosis is $$M4/M2^2$$.
Finally... if you are "not very good at finance," you should realize that you have jumped into some of the more complicated material in finance and what is definitely graduate-level statistics. Playing with Cornish-Fisher and Edgeworth expansions is not something I would advise when you are just trying to understand the variables being referred to (e.g. $$r_i$$).
I highly recommend you consult a text that can explain at least a little of this to you. Chapter 8 of A Quantitative Primer on Investments with $$R$$ covers these expansions and other methods and Kolassa's Series Approximation Methods in Statistics is a more in-depth reference (with McCullagh's Tensor Methods in Statistics going into even greater depth).