Last week was a great one for investors in commodity-linked shares.

While the S&P/ASX 200 (Index: ^AXJO) (ASX: XJO) gained 4.5% on the back of a strong showing from both resource and bank stocks, some individual commodity-linked stocks absolutely soared.

BHP Billiton Limited (ASX: BHP) rallied 19.2% to close at $19.28. This was the highest weekly gain for BHP since November 2008.

BHP’s gains were driven by both higher iron ore and oil prices which rallied 10% and 4.5% respectively. Iron ore finished the week just under US$60 a tonne, while Brent crude oil was trading for just under US$44 a barrel.

Other stocks to benefit from the rise in iron ore and oil prices were iron ore major Fortescue Metals Group Limited (ASX: FMG), which jumped 14.3%, while oil and gas producer Santos Ltd (ASX: STO) enjoyed a rise of 8.4%.

Also attracting investor attention last week were companies in the mining services sector which were amongst the top gainers for the week.

Worleyparsons Limited (ASX: WOR), Mineral Resources Limited (ASX: MIN) and ALS Ltd (ASX: ALQ) soared 19.1%, 18% and 15.6% respectively.

A trend?

While last week’s gains were great for shareholders even more impressive has been the rebound from recent lows.

For example, earlier this year BHP hit a low of just $14.06. Based on Friday’s close the stock has now leapt 37% in the space of just a couple of months.

The gains for Fortescue’s shareholders have been even more amazing. Having dipped to a low of $1.44 in late January, the stock has since recorded gains of over 100%!

These stock gains are a reminder of the significant leverage built into the business models of resource companies.

For investors considering whether now is the time to start adding resource stocks back into their portfolio, it’s a difficult decision.

Iron ore and oil prices have rebounded roughly 50% from their recent lows, but could still go higher. However, there is equally the potential for these commodities to give up their gains given the ongoing excess supply most markets are experiencing.

For investors not wanting to miss out on the significant gains which could be available from this point in the resource cycle one option would be to acquire a diversified portfolio of commodity-linked stocks. Another avenue would be to sift through the market and try to identify overlooked companies that missed out on the recent rally and which remain mispriced.

How do you position your portfolio to benefit from a market crash?

With the ASX flirting with 5,000, some experts are predicting a market crash. Discover our Foolish experts' advice on what YOU should do in the event of a crisis -- simply click here for your FREE copy of our newly updated report, "What to Do When the Sharemarket Crashes". Click here, it's FREE!.

HOT OFF THE PRESSES: Motley Fool’s #1 Dividend Pick for 2017!

With its shares up 155% in just the last five years, this ‘under the radar’ consumer favourite is both a hot growth stock AND our expert’s #1 dividend pick for 2017. Now we’re pulling back the curtain for you... And all you have to do to discover the name, code and a full analysis is enter your email below!

Simply enter your email now to receive your copy of our brand-new FREE report, “The Motley Fool’s Top Dividend Stock for 2017.”

By clicking this button, you agree to our Terms of Service and Privacy Policy. We will use your email address only to keep you informed about updates to our website and about other products and services we think might interest you. You can unsubscribe from Take Stock at anytime. Please refer to our https://www.fool.com.au/financial-services-guide">Financial Services Guide (FSG) for more information.

Motley Fool contributor Tim McArthur has no position in any stocks mentioned. The Motley Fool Australia has no position in any of the stocks mentioned. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy. This article contains general investment advice only (under AFSL 400691). Authorised by Bruce Jackson.