Avert is really more of a synonym for prevent. I think a better word to use would be "mitigate."
I can not prevent the crisis on the stock market, but I can mitigate the loss by selling the risky stocks now while the price is still high.
Or you could mean that you want to prevent any future loss, and in that case you might say:
I can not prevent the crisis on the stock market, but I can avert any future loss by selling the risky stocks now while the price is still high.
In either case, you might consider rewriting the first part to say:
I could not prevent the crisis in the stock market...