Selling Part of a Company
You have three identities, the first, a person looking out to build their wealth through work and investments, second, one of many owners of your company, and three, an employee of your company's owners who hired you to manage their investment. If things are going south (let's assume it's due to the world and not your skill at management), it is your job as a manager to protect all the owners' investment and/or disclose to them that things are going bad, so they all have an equal opportunity to decide to bail out, hang on, or find bridging capitalization. If your company is publicly traded, there are laws regarding financial reporting so that any shareholder or potential investor may have the opportunity to look at the quality of an investment. If you, the manager, sees privileged information that will have a material effect on the stock price, then you are to issue a guidance so that investors have more salient information than the last quarterlies or the IPO prospectus.
If it's the whole sector is publicly tanking, then the public reporting of that is not privileged information, and selling stock based on that is not in and of itself insider trading. There is a grey zone, though. Let's say you are CEO of a bank and you just got a letter from a regulator saying you must mark to market bad assets. While all the banks of your type are getting those letters, and everyone will be getting a haircut, you can find out how bad the assets in your bank's portfolio are and make a guess if it's a trim or skinhead time. As ever, the best advice is one should consult one's attorney.
I can hear some asking what's the point of being a CEO if one has to constrain the ability to maximize wealth when it comes to stock ownership of the company he or she work for. Well, that's why you get the big bucks, right? Besides, look at the employee manual and check out the sections regarding punctuality, dress, moonlighting, confidentiality, and, if one is a code shop, the ownership over all the employee's ideas, including those formulated at home for something other than the project they are working on. One takes a job, gives up some liberty, and gets paid for doing things under others' direction to further their goals.