If she files for divorce, can I be penalized for doing this?
Once you are served with a divorce, there will be automatic temporary restraining orders (on the back of the Summons) which are binding on you.
Once a divorce matter has been filed, you would be penalized for concealing or getting rid of any assets.
If you are to liquidate stocks and the IRA, you would need to advise your wife of your intentions and make sure that it is documented and that she has the opportunity to agree or disagree.
Before then, if you liquidate community assets, it is possible that your wife could seek penalties against you in a divorce for violating your fiduciary duty to preserve the community assets.
It may be wiser to merely leave the assets where they are, to avoid the risk that your wife won't appreciate your unilateral decision to liquidate community assets without her knowledge and consent, and seek remedies against you for doing so.
First, any funds you pocket will mean that an equal amount of marital assets will be going to your spouse to offset these amounts.