What happened

Shares of Okta, Inc. (OKTA 2.20%) were flying higher today as the cloud-based security specialist caught a tailwind from last night's midterm election, along with much of the high-growth tech sector. With the Nasdaq up 2.2% as of 1:03 p.m. EST, Okta surged 12.4% at the same time.

Arrow in four sections going upwards, with a man trying to hold on to each section.

Image source: Getty Images.

So what

Okta's business, providing cloud security and identity authentication for the enterprise, isn't directly affected by government policy, but the stock has been highly sensitive to market sentiment in recent months as it trades at a lofty valuation. It has gotten pumped up in part because of favorable investor sentiment for growth stocks like the FANG group of stocks.

Investors seemed to like the election results last night as not only did they match with polls and forecasts, which predicted the House flipping to the Democrats and Republicans keeping the Senate, but investors generally prefer divided government as it helps ensure the persistence of the status quo. Though the market has been largely happy with the Trump administration, especially with the tax cut, a divided Congress seems to guarantee that there won't be any highly partisan policies enacted in the next two years like repealing Obamacare or an extreme crackdown on immigration that could upset the strong economic climate in the country.

Now what 

Today's surge in Okta is another reminder that the stock seems to be caught in a "risk-on/risk-off" mentality, as shares dropped 17% last month, due largely to the broader sell-off in tech stocks. The company has delivered blockbuster results this year, consistently beating its own guidance.

With no profits, however, Okta will need to keep topping expectations in order to justify its sky-high price-to-sales ratio of 21.3. With shares up 147% year to date, the valuation looks like it's getting stretched without any underlying fundamental improvements to cause further gains.