It should come as no surprise that the healthcare sector has been one of the best places to find winning stocks during the last few years. After all, the sector benefits from a number of favourable trends, ranging from an ageing population to recent technological advances and the increasing prevalence of personalised medicine.

What’s more, healthcare stocks tend to be less sensitive to changes in the macroeconomic outlook and cyclical fluctuations in the stock market. This explains why these stocks are considered to be relatively defensive investments, and why including these stocks in your investment portfolio could help to reduce the volatility of your investment returns and protect your capital.

But while there are many healthcare stocks you could choose from, here are two I consider to be most attractive on their valuations and growth prospects.

Massive earnings potential

Shire (LSE: SHP) trades at a price-to-earnings (P/E) ratio of 30.5, which may not seem at all appealing at first glance. But, once you dig deeper into the stock’s massive EPS growth outlook and its historical track record, you’ll probably think differently. City analysts are projecting Shire’s underlying earnings to grow 37% this year, with a further increase of 28% forecast for 2017. So on a forward P/E of 16.2, falling to 12.6, its shares seem much more tempting.

Keep in mind, Shire has an amazing track record of delivering on its really upbeat growth numbers. Thanks to series of strong performances from its rare disease drugs and highly accretive add-on acquisitions, underlying earnings grew by a compound annual growth rate (CAGR) of 40% over the past three years.

For an investor who bought Shire’s shares at their lowest closing price three years ago, the increase in the share price of over 120% is the best return over that period for any London-listed stock with a market capitalisation of more than £10bn. And with more earnings growth still to come, it wouldn’t be surprising to see the stock have further room to run.

Strong competitive positioning

Smith & Nephew (LSE: SN) manufactures the kind of healthcare products that are synonymous with an ageing population — artificial hips and advanced wound care products. Populations are ageing from Europe to Asia, and growing demand for these products positions the company to benefit from long-term structural growth in the market.

In addition to promising robust growth in the years to come, the company has some of the best returns on capital employed among its peers — a staggering 29.2% last year. Meanwhile, its 2015 operating profit margin of 13.6% demonstrates its strong competitive positioning and its wide moat.

Shares in the company currently offer a modest dividend yield of 2%. But, with a payout ratio of just 30%, there’s considerable scope for its yield to rise in 2016 and beyond.

And despite recent weakness in trading in Europe, City analysts suggest Smith & Nephew should enjoy a good period, with consensus earnings growth estimates of 3% and 10% for this year and next, leaving its shares on a forward P/E of 18.8 and 17.5 in each year, respectively.

More stock picks?

If you're looking for defensive stock picks, The Motley Fool has a free special report that's aligned with your investing goals: The Fool's Five Shares To Retire On.

These five large-cap shares have been selected for their combination of income and growth prospects. They generate stable cash flows from their dominant market positions and broad global exposure.

It's completely free and there's no further obligation. Get your copy now.

Jack Tang has no position in any shares mentioned. The Motley Fool UK has no position in any of the shares mentioned. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.