Fading Lines on BFP

Hi ladies I just wanted to know if you test positive for pregnancy about 5 days after a missed period and then test again maybe 8 days after and the line starts to fade, what causes this? Is it a chemical pregnancy are you miscarrying? Just trying to understand what happens?