After two straight years of gains, investors are questioning whether the market can maintain its upward trajectory.