Capital gains and capital losses are offset. Best to consult your financial advisor and accountant. Ask them about setting up a company and to do a cost benefit analysis.
All depends on your individual circumstances of course.
A self managed super fund is something to discuss with them as well.