How do you beat the market? Do you follow your mentors in and out of equity positions or do you buy high-risk growth stocks? 

Both of these approaches work, but they can be extremely time-consuming, and trading commissions can eat away at your returns over the long-term. 

Another strategy you can use to beat the market is to follow Warren Buffett’s approach of buying quality companies at cheap prices and holding the shares forever. But if you do decide to use this method, you have to be extremely careful in picking companies for your portfolio. 

For example, you can’t really consider cyclical businesses for a long-term buy-and-forget portfolio. Defensive companies with a clear competitive advantage, however, are extremely attractive. 

Two attractive plays 

GlaxoSmithKline (LSE: GSK) and Shire (LSE: SHP) are two such companies. Shire is a world-leading producer of rare disease treatments, and the company is unlikely to be displaced from this position anytime soon. The group’s existing distribution network combined with its experience in the rare disease field are two intangible assets that would be almost impossible for any newcomer to the market to replace.

What’s more, Shire has been able to succeed in the rare disease field because, while selling rare disease treatments may be extremely lucrative, developing the treatments is a costly, time-consuming process, which puts many competitors off. 

Thanks to its market-leading position, Shire’s earnings per share have roughly tripled over the past six years. And the company currently trades at a forward P/E of 14.1, which looks exceptionally cheap considering its historic growth. 

Income champion 

While Shire has grown rapidly over the past few years, Glaxo has struggled to grow as the company has lost the exclusive manufacturing rights to some of its key treatments. Still, management expects the group to return to growth this year and based on first-quarter numbers, it’s still on target to grow earnings per share between 10% and 12% for 2016. 

Glaxo may not be the fastest-growing company around, but when it comes to income, the group offers a level of income to shareholders few others can match. 

Indeed, because of its defensive business model Glaxo is an income champion. The company’s shares currently support a dividend yield of 5.6% and if you combine this income with a company like Shire, which is primed for long-term growth, you can create the perfect mix of income and growth in a portfolio. 

The bottom line 

So overall, the best strategy to outperform the market could be to buy and hold a portfolio of defensive equities. Shire and Glaxo look to be two perfect candidates for this long-term defensive portfolio. 

Shares in Shire only offer a yield of 0.5%, but the company’s explosive growth is worth a premium valuation. Meanwhile Glaxo’s hefty dividend yield more than makes up for the company’s sluggish growth. And over the long term, it’s highly likely these two defensive pharma giants will continue to churn out results for investors.

To help you assess these two companies for yourself, our top analysts have put together this report, which guides you through the 10 essential steps you need to take to become a stock market millionaire. 

The report explains how spending just 20 minutes a month could help you create a portfolio that could bring you closer to financial freedom for life.

Click here to check out the report - it's completely free and comes with no further obligation. 

Rupert Hargreaves owns shares of GlaxoSmithKline. The Motley Fool UK owns shares of and has recommended GlaxoSmithKline. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.