The Nasdaq Composite (^IXIC 0.10%) has taken just about everybody by surprise this week. On Thursday, the benchmark added to its gains from previous sessions, with a gain of more than 2% as of 1 p.m. EST. With that rise, the Nasdaq is up almost 950 points in just three and a half days. If you're already an investor in the stocks that make up the Nasdaq Composite, then you're obviously happy with the move -- especially after having taken a huge hit the previous week.

But if you're not invested in Nasdaq-listed stocks, then it's tough to know what to do. Do you pay up for stocks you could've bought a lot more cheaply just days ago? Or do you patiently sit on the sidelines -- and potentially have to watch those share prices just keep on rising?

Person with head in hands, sitting at a desk with stock charts on the computer screen.

Image source: Getty Images.

Fear of missing out has driven many investors to discard their discipline and make investment decisions based on impulse. Sometimes, those buys pay off, as the uptrend that caused that fear in the first place continues and pushes stock prices ever higher.

But more often than not, the time that your fear of missing out finally overcomes your discipline to avoid emotional investing decisions turns out to be the time when the rally has hit its peak.

The better choice is to identify the stocks you're interested in and then buy shares regularly. Sometimes, you'll miss a rally and end up paying up for the stock. But next time, you're equally likely to catch that same stock in a slump -- and you'll get to add to your position on the cheap. Over time, this long-term investing approach works a lot better than buying only when the market has also soared and things look the most optimistic.

Qualcomm, Upwork lead Nasdaq higher

Two Nasdaq-listed stocks making big moves on Thursday were Qualcomm (QCOM 1.41%) and Upwork (UPWK -0.09%). Both reported earnings results that impressed their shareholders immensely.

For Qualcomm, the fiscal fourth-quarter results were impressive. Revenue jumped 73% from the previous year's period. The technology giant saw its net income rise sixfold year over year. That was enough to send the stock higher by 13% in early-afternoon trading.

Qualcomm is well positioned to take advantage of the current wireless network upgrade cycle to 5G technology. With plenty of intellectual property related to wireless network capabilities, Qualcomm expects accelerating growth in the area to help bolster its results as its new fiscal year begins.

Meanwhile, freelancer platform Upwork got an even bigger boost to its stock price, which rose 40%. Upwork's revenue came in 24% higher year over year in the third quarter, and that helped the company narrow its losses to a much greater extent than most of those watching the stock had expected.

Upwork also believes that the remainder of the year should be equally fruitful. Investors seem pleased with calls for a 20% annual rise in sales in 2021. As the gig economy continues to become an increasingly important part of the framework of employment both in the U.S. and around the world, companies like Upwork will be able to take greater advantage in connecting workers with companies wanting their services.

Markets often make extreme moves in the short run, but it's fundamental strength like what Qualcomm and Upwork are seeing that really justifies stock gains. Don't just buy a rally out of fear. Pick stocks that can take advantage of improving conditions and thrive.