Different expert here - My name is ***** ***** please allow me to provide you with additional information that you may find helpful.
Your investment adviser is most likely referring to the fact that INTEREST
earned on a municipal bond is tax exempt. However, gain or loss is subject to federal income
tax on the sale of such a bond, just as in the case of a taxable bond. The amount of gain or loss is equal to the difference between the sale price of the bond and the holder's tax basis in the bond (the amount the holder paid for the bond originally, including any additions to such basis, such as OID.
The following links contain excellent, detailed information which you will find helpful:
As to your original question regarding offsetting capital gains from the sale of stocks by purchasing municipal bonds (in California or elsewhere), this cannot be done.
You may want to speak with your investment adviser and request clarification.
Please let me know if I can assist you further.
Thank you and best regards,