I smile sometimes at the lack of understanding so often exhibited by capitalists. Try to think about what you might deserve.
'Investment' by a private individual is the same - means the same - as 'bet'. You bet on something, hoping to make money thereby. Whether you do this via a stockbroker or a bookie, it's the same: you check out what you think the odds are, and (if you know what you're up to) work out the Expectation and moderate your bet accordingly. If you get it right - or sometimes if you're just lucky - you win. If not, you lose.
Winning a bet isn't the same as earning. You don't deserve your winnings in the same way as, say, a binman deserves his wages or a doctor her salary. Because of this lack of desert, taxation of unearned income has a wholly different moral basis from taxation of earnings.
In fact, most people don't have the original capital (of any sort) to enable them to gamble on the stock exchange (or property market, etc.) with any real chance of success. (That's what all the current chatter about 'working people' and tax is currently about, of course.) For those who do, of course they should be taxed to the hilt on any winnings, given the unearned nature of any such.
As for repaying any loss: why do you think you should be shielded from becoming - as most other people are already, by happenstance - devoid of capital you never deserved in the first place?
Over my lifetime (quite old now), I've done some earning and some making of money. Making it was always easier (I was born poor but smart) ... but I never confuse what I've earned with what I've made. So I think differently - as should you - of taxation of earned (deserved) income and unearned (undeserved) income.
Tax the rich! ... A sensible and practical slogan for the majority who aren't rich - and a moral imperative for all. That's kind of obvious; as I suggested, it's risible to see rich (or indeed would-be rich) people who don't understand.