Generally macro-economic conditions or your perception of them should not affect what shares you decide to buy for your portfolio. This is because as an investor you should always aim to buy high-quality businesses on attractive valuations.
For example if you buy poor or non-investment grade businesses you're likely to get poor returns irrespective of whether we're in an economic boom or recession.
Vice versa applies in that if you buy a strong business on a reasonable valuations you should achieve good total returns over say a 3 to 5 year period and be able to ride out the negative consequences of any recession.
However, as the topic of what shares to own in the event of a recession seems to be popular with readers, I'd suggest if you were worried about a recession in Australia there are a couple of qualities in companies to look for.
First you should own companies with a large majority of overseas earnings and second you should own companies that benefit from a weaker Australian dollar.
This is not rocket science as companies that do little business in Australia are least likely to be affected by a recession, while a lower Australian dollar and rate cuts are logical symptoms of a recession.
In all honesty it would also make sense to probably sell a lot of your shares if you were convinced Australia or the world were set to fall into recession, but if you did want to own some shares as a bulwark against it the following three tick the boxes.
CSL Limited (ASX: CSL) earns around 98% of its profits and revenues overseas and investors also benefit as the Australian dollar falls as dividends for example are declared in U.S. dollars before being paid in Australian dollars.
Fisher & Paykel Healthcare Limited (ASX: FPH) is a New Zealand based retailer of equipment used to treat sleep disorders in patients. It has a superb track record of growth thanks to its large addressable markets and earns almost all its profits outside Australia.
BETASHARES ETF (ASX: NDQ) is an exchange traded fund that tracks the performance of the NASDAQ-100 Index of the US's leading tech companies. As such it provides excellent diversification away from the mining and residential housing leveraged Australian economy, while giving exposure to the world's best tech companies. You can't ask for much more than that!