Most of the time, it’s impossible to predict which way the market will move. Even the professionals can’t accurately predict where the market will be a day, week, month or even a year from now and trying to guess where the market will be yourself could end up costing you a lot of money.

However, over the past five years, a trend has emerged between the shares of HSBC (LSE: HSBA) and BHP Billiton (LSE: BLT). Shares in these two companies have become highly correlated, and it’s now almost possible to predict how shares in HSBC will act over the next few weeks.

An interesting trend

Throughout 2011 and 2012, shares in HSBC and BHP moved in lockstep as investors bought and sold both companies base on news from China. This trend fell apart during the first few months of 2013 as shares in HSBC rallied, BHP slumped and at one point shares in BHP were underperforming those of HSBC by as much as 40%. HSBC’s rally came as a result of wider gains in the FTSE 100, although the mining sector failed to see any of the benefits.

Still, by mid-2013 both BHP and HSBC were heading lower again and over the three years since, shares in HSBC have lost 41% excluding dividends and shares in BHP are down 62% excluding dividends. Year-to-date the BHP-HSBC relationship has broken down once again.

Shares in BHP are up 10% excluding dividends while HSBC is down by 20%. Nonetheless, it could only be a matter of time before BHP’s gains are wiped out, as the miner’s fortunes are closely tied to the success or failure of China’s economy.

The China issue

BHP’s gains so far this year seem to have been driven by China’s speculative commodity bubble, which was fuelled by retail traders and speculators. The price of iron ore doubled in just a few weeks, and the price of steel saw similar gains. Since reaching fever pitch at the end of April, China’s commodity bubble has now popped, but it has left lasting damage.

Indeed, according to Goldman Sachs, the recent surge in prices has led to some miners delaying capacity cuts or restarting mothballed mines — a development that will only delay the market’s rebalancing. Additional supply is bad news for BHP. Also, HSBC’s results show that the demand for key commodities could fall further as slowing sales imply that China’s economic growth story is losing steam. Simply put, while BHP has made an impressive start to the year, it looks as if the company’s shares are set to follow HSBC’s shares lower in the near term as growth worries filter through the market.

A word on valuation

When it comes to valuation HSBC is the cheaper of the two companies. The bank trades at a forward P/E of 10.2 and supports a dividend yield of 8.2%. BHP trades at a forward P/E of 30.4 for the year ending 30 June 2017 and currently supports a dividend yield of 3% after the recent payout cut.

And to help you evaluate BHP and HSBC for yourself, our top analysts have put together this report, that 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 as it's completely free and comes with no further obligation. 

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