Hey,
I'm trying to divide each row in my file into deciles. To be more precise, I have the stocks of an index sorted according their past volatility and want to create 10 equally large portfolios for every month (see attachment). So for example if I have 100 stocks in a month, I want 10 portfolios with 10 stocks in each of the portfolio. But next month it could be that there are 120 stocks sorted, so every portfolio would have 12 stocks. Does anybody know a command or a methode to divide a row into deciles? So that in decile 1 are the first 10% of the stocks, in decile 2 the second 10% of the stocks etc. I would really appreciate an answer, since I don't know how to move on.
Thank you very much!
Edit: I have attached an excel file of an example
My goal is to calculate the average of the first decile cells in a row, than the average of next decile of cells etc.
In my example there are exactly 100 cells so each decile would be exactly 10 cells. But it changes in every row, sometimes there are 150 cells, sometimes 136 cells etc.
Bookmarks