According to all of the major dictionaries, if an activity involves the following, it is gambling:
* Stake
* Risk
* Profit/Loss
These dictionaries give investing as examples of gambling.
If anyone gives you grief about gambling, tell them to read
https://stockbet.com/#/support/gambling