Actually I believe the problem is caused by water hammer.
I shut off the cold water main, turned on a faucet in the basement. After all the water is drained, I turned on the water again. Now the thumping has stopped

But I think I will need to get someone to install the water hammer arrestor. Thanks anyways.