So I have a dataset of monthly stock returns from January 2000 until today for six different stock indices. At the bottom of the page, I want to show the yearly return for each year as a percentage change from the previous year (i.e. I want to create a table with one column having '2001', '2002' and the other column having '8%', '-4%' etc. What command would I use?
I want to calculate the percentage change from december 31st of year n to december 31st of year n+1 for every single year for the stocks in image 1 and place it in the table format of image 2. Is there a command that would let me do this, as well as dragging it down so that it works for all years?