Speculation over the severity of the swine flu outbreak has pushed drugmakers higher and punished travel and tourism stocks, although market analysts warn that traders must exercise caution when trying to trade these names as the drama plays out.

If you haven't seen a television or a newspaper in the last few days, swine flu is the primary topic of conversation. This new strain, a combination of pig, bird and human viruses that people may have no natural immunity to, is causing a hysteria around the globe.

Already, the World Health Organization said it may be too late to contain the virus, prompting the agency to raise its alert level to phase 4 out of 6, meaning the flu spreads easily but is not yet a pandemic.

Mexico is suspected to be ground zero of the outbreak, where the total number of deaths believed to caused by the outbreak rose by 50% on Monday to 152. There have been confirmed cases in the U.S., Canada, Spain, the U.K., Israel and New Zealand, with more suspected cases in Brazil, France, Australia, South Korea and Switzerland, according to the WHO.

For investors, there are many opportunities in stocks that benefit from outbreaks such as this. A moral problem comes into play, however. For instance, it seems inherently wrong to root for a global pandemic in order to make a few bucks.

The other problem is that investors mustn't forget how trades like these have played out amid similar conditions in the past. Like previous outbreaks that have resulted in peaks and valleys for stocks, every investor trading on the swine flu headlines should remember that as the hysteria dies down, so could share prices of speculative names.

Big Bets on Small Names

Several top biotech companies have rallied thanks to having approved drug treatments. Roche's Tamiflu and GlaxoSmithKline's ( GSK) Relenza immediately come to mind. Gilead Sciences ( GILD) has also risen as it gets royalty payments from Roche for Tamiflu.

Those established companies enjoyed gains following word that the swine flu had spread. But there are also several lower-tier companies moving sharply on the news of the outbreak, and it is with these names that lessons from past epidemics become very important.

The severe acute respiratory syndrome, or SARS, virus caused a panic in early 2003 and ultimately killed 774 people, and several small companies saw their shares rise during that outbreak. Names like BioCryst Pharmaceuticals ( BCRX), ViroPharma ( VPHM), SIGA Technologies ( SIGA) and AVI Biopharma ( AVII) rallied sharply.

But once outbreaks like the H5N1 bird flu and SARS were contained, these speculative plays pulled back and the rally dissipated. That's not to say money can't be made in the short term, but investors must heed the advice of market watchers and exercise caution when thinking of these as long-term investments.

"If you look at the SARS play, we had a similar kind of reaction with travel stocks going down and a lot of the therapeutics, vaccines and diagnostic names going up," said Quintin Lai, analyst with R.W. Baird. "But SARS didn't make it to pandemic levels, so the play on vaccine makers went away."

Lai adds that vaccine companies are among the riskiest because vaccinations are the hardest to ramp up and ramp down in terms of manufacturing. "There is a huge lead time," he said. "So unless the swine flu is something that has legs, you can speculate on it, but the reality is that we haven't had that many pandemics."

Paul Nolte, director of investments with Hinsdale Associates, says it would be more prudent to invest in established companies with several product lines, because focusing on a company with limited offerings could backfire.

"The bigger, more established companies have a wide variety of products that they're not flying and dying by," Nolte said. "If it gets contained relatively quickly, you could see a lot of smaller companies reverse course."

Travel, Tourism, and Food Stocks Hit Hard

The first signs of weakness in the market from an epidemic usually comes from the travel and tourism sector, most notably in the airline names. AMR ( AMR), Southwest Airlines ( LUV), U.S. Airways ( LCC), UAL ( UAUA), Continental Airlines ( CAL) and Delta Air Lines ( DAL) all fell hard during Monday's session.

There were other tourism names that were also hit hard as the week began. Cruise companies Carnival ( CCL) and Royal Caribbean ( RCL) lost ground, and hotel names Marriott ( MAR) and Starwood Hotels & Resorts ( HOT) also fell.

Several food companies were also hit hard on the news. Tyson Foods ( TSN), Smithfield Foods ( SFD) and Hormel Foods ( HRL) all sank.

Flu concerns even prompted JPMorgan to cut earning estimates on Tyson and Smithfield, as the firm said that the outbreak would not be good for pork sales. However, swine flu is not transmitted by consuming pork but instead through human-to-human contact. Still, concerns were impacting trade. Both China and Russia have banned imports of U.S. pork from states that have reported human cases of the swine flu.

Already, concerns over food companies are dissipating. After losing ground Monday, Smithfield gained 4.4% Tuesday, and both Tyson and Hormel rose more than 1%. Similarly, Carnival, Royal Caribbean and some airline names rebounded.

This, Nolte says, is proof that trading on an outbreak like swine flu can be very dangerous for investors looking to either buy or sell.

"When you're buying and selling into an emotional situation, you are gambling," said Nolte. "If you really like the long-term prospect for some of these names, you might consider stepping your way into it rather than dropping in all at once. Because it's emotional, you'll see companies continue to either rise or fall in this environment."

More from Stocks

Tesla CEO Elon Musk Is a Rock Star: Kiss Icon Gene Simmons

Tesla CEO Elon Musk Is a Rock Star: Kiss Icon Gene Simmons

The Best Investment Advice? Stay Diversified

The Best Investment Advice? Stay Diversified

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly

Attention 60 Minutes: Google Isn't the Only Big-Tech Monopoly

Listen: Should You Buy Cisco Now?

Listen: Should You Buy Cisco Now?

Amazon Could Devastate Walgreens and Rite Aid by Getting Into Pharmacy Business

Amazon Could Devastate Walgreens and Rite Aid by Getting Into Pharmacy Business