Start with a table that records the monthly prices of the stocks in question. Do you have that starting point? Once you have the data--and it could be daily prices, which will get averaged into monthly--the Pivot Table aspect is straight forward. Go to YouTube for videos on setting up Pivot Tables.
Here's a starter for you. You may want to play around with the Pivot Table layout.