Stress can cause hermorphodism, but it doesn't change the sex of the plant which is already determined before it sprouts. There are also true hermie plants that are genitically programed to show both sexes, stress or no stress.

In fact, it is the genetic determination of sex that allows for breeding techniques that produce feminized seed.

At least, that's how I understand it.

-Sinse