State tax filing

Hi. Thank you for your response.  I have a follow-up question (which I can't find an answer to by searching Q&A from others).  I sold ~18 stocks last year and therefore have a gain or loss from each  One stock was for the company I work for in MA.  The ~17 others were for various publicly traded companies.  Some of these companies have physical locations in MA, even though they are not headquartered in MA (ex: Procter & Gamble), some have no physical location in MA (as far as I can determine) and one company is headquartered in MA.  My question is: do I need identify all the companies for which there is NOT a physical presence in MA and then marked the gain/loss for those companies as "non-Massachusetts sourced"?  Conversely, the gain/loss for all the companies that have a physical presence in MA are therefore Massachusetts sourced?  Thank you.