Capture month end values in Apple Numbers
I am sorry that I don't know how to do what you are specifically asking for but I reckon it is not a trivial thing to do. In case you can't figure it out, I think either of the two below might be an alternative for you. 

You can use the stock() function in Numbers to calculate the value of a stock portfolio with the latest closing prices. You can open this file within the first day of every month and it would give you the value of the portfolio at the closing prices of the last day of trading of the previous month assuming you will also be connected to the internet when you open the file. 

You can then either record the value of the portfolio somewhere else such as another table in Numbers or save the table calculating the value of the portfolio to another file or sheet in Numbers as a whole by copying it first and then pasting it using Paste Formula Results menu option under Numbers' Edit menu at the top. The drawback of this option is that if you open the file calculating the value of the portfolio at a later date than the first of the month, it is likely to calculate the value of the portfolio for a date later than the end of the previous month.

Alternatively, you can use the stockh() function to calculate the value of a stock portfolio for any past date. You would of course need to know the exact number of shares per stock in the portfolio at the given past date for this to work.