protecting stock market gains