Refinance Mortgage or Invest in Stock Market?

refinance

I have the option to refinance my home that I bought within the last 5 years, saving around 2%. The cost to refinance will be approximately $4000-$8000. The current loan is for 30 year fixed and I plot to have it paid off in 15 years by making extra payments. Should I refinance and get a 15 year fixed to save the 2% or should I take the $4000-$8000 and invest it in mutual assets? Thanks so much.