Would/are you purchasing your company’s stock on the open market (for your portfolio) vs. other investments?
If you consider your company a BUY:
Retain your ESPP shares until this changes.
If your company is a SELL:
Flip the shares.
If a HOLD:
Determine the value at which a decline would make it breakeven (cap gains vs. income tax), take into consideration the risk free rate of return of the flipped shares during the year holding period (or the avg. return of your portfolio, if you are agressive). Note that the breakeven point is ONLY breakeven if you hold your shares the full year, if you sell before that you are worse off (and if you hold into a serious decline to “save” on taxes, you are far worse off). Also consider that the actual discounted profit is relatively small for all the hassle (e.g. 10% of a 100k salary @ 15 % discount = $1500 with the spread between cap gains and 33% income at $270…
The above generally applies to any investment. Consulting a tax advisor is always wise.