The stock market can seem like a game of chance sometimes — you might wake up one day to find that your investments have grown by 5% overnight, then six months down the line, there was an unexpected crash, and you’ve lost all your gains (and then some).