Investing in gold and silver stocks was quite lucrative during the first half of 2016. In fact, the precious-metal miners were, for a time, the hottest thing on Wall Street before cooling a bit in the second half of last year.

But what you may not realize is that on a 20-year annualized basis (1996-2015), gold has been a pretty solid performer, with a 5.2% average annual return, according to data from J.P. Morgan Asset Management. That's good enough to beat the 3.4% annualized average return of a home and the 3.3% average return on oil, it handily topped the 2.2% average level of inflation, and it trounced the measly 2.1% average return of investors over this period. Gold and silver, and the underlying companies that mine these precious metals, can indeed play an integral role as a long-term holding for investors.

An investor holding a gold ingot next to a rising stock chart.

Image source: Getty Images.

However, there's a catch. If you want to invest in gold and silver stocks over the long run, you'll need to become intricately familiar with seven figures. Some of these figures are macroeconomic in nature and would apply equally to all gold and silver miners, while a handful are company specific.

1. The federal funds target rate

On a macro level, perhaps the most important number that investors in gold and silver stocks need to eye is the federal funds target rate, which is (not surprisingly) determined by the Federal Reserve. The federal funds target rate influences interest rates, which can play an important role in determining buying and selling demand for physical gold and silver.

Generally speaking, opportunity cost is a driving force for gold and silver. If yields on interest-bearing assets, such as bonds, CDs, and savings accounts, are low, then it doesn't cost investors much to give up the near-guaranteed returns these assets offer in order to buy gold or silver, which offer no yield. If, on the other hand, interest rates continue rising under a tightening monetary policy, then yields on interest-bearing assets become more attractive. This increases the opportunity cost of holding gold and silver, which runs the risk of hurting the spot price of both metals. Understanding how opportunity cost comes into play is a must for gold and silver stock investors.

A senior man holding up cash, pondering the effects of inflation.

Image source: Getty Images.

2. The inflation rate

Another important macroeconomic factor worth monitoring is the national inflation rate. Higher inflation rates (and we're talking about inflation rates that are well above the norm 4%-5%) are expected to have a positive impact on gold and silver, whereas low inflation or deflationary periods aren't expected to work in the favor of precious metals.

The idea here is pretty simple: if the economy is growing, the Fed expands the money supply, which dilutes the value of the existing money supply and makes it more expensive to buy goods and services, including gold. This should increase the value of an ounce of gold, at least on paper and according to textbooks.

However, it's worth pointing out that interest rates and inflation can have a push-pull effect on one another, and they may often be at odds. For example, higher levels of inflation, which would normally signify a positive for gold and silver, may also be accompanied by interest rate increases from the Fed, which isn't good news since it can increase opportunity costs. This pull-push dynamic is something you'll need to consider.

3. The spot price of gold and silver

Yeah, I know... "Duh! Thanks Captain Obvious." If you're investing in gold and silver stocks, you're clearly going to want to play close attention to the per-ounce spot price for both metals.

The reason I specifically mention the spot price is to remind investors not to get too caught up in the day-to-day movements of precious metals. When gold and silver miners report their quarterly results, they're basing their revenue from the sale of precious metals as an average price for those metals over a select three-month or reporting period. It's far more important to be familiar with the average price for precious metals over the past three-, six-, or 12-month period, than it is to know the exact price today, because it's bound to fluctuate.

Panning for gold at the side of a river.

Image source: Getty Images.

4. All-in sustaining costs (AISC)

In terms of individual company figures you'll want to familiarize yourself with, my all-time favorite is all-in sustaining costs, or AISC.

A mining company's AISC gives you a pretty accurate look at what the true costs are to maintain the pertinent operations of a mine. In addition to on-site mining costs, royalties and production taxes, byproduct credits, stockpiles and inventory write downs, and other at-the-mine expenses, AISC includes corporate and general administrative costs, sustaining exploration and study costs, and sustaining capital expenditures, to name a few. Comparing a precious-metal miners' AISC to the current price of gold or silver, or the average selling price over the past quarter, can give you a good idea about how profitable a company is.

Right now the king of the hill among traditional mining companies is Barrick Gold (GOLD 1.68%), which lowered its full-year AISC projections on three separate occasions in 2016. For this year, Barrick Gold has estimated an AISC of between $720 and $770 per gold ounce. At the midpoint, we're talking about a $500 per ounce margin based on today's spot price for gold. This implies strong profitability.

A bear trap with a debt ball attached.

Image source: Getty Images.

5. Debt

Another individual company figure that gold and silver stock investors should be aware of is debt.

Debt can be a tricky beast for investors to analyze because debt is often needed to fund the costly expansion of existing mines, or to fund the development of new mines. Debt, in many cases, can be quite manageable for precious-metal miners, but a lot depends on the repayment and maturity schedule of a company's debt. Since most precious-metal miners have some form of debt, it's important to understand what the timeline is for its repayment. If a mining company doesn't have sufficient cash flow or cash on hand to cover the full repayment of its debt, this could be a big problem and a red flag.

Barrick, as of the end of 2013, had more than $13 billion in debt. While not crippling to the company, the expense of servicing that debt, and the lack of financial flexibility, made it troublesome. Over the past two years, Barrick has shed non-core assets and reduced its debt down to about $8 billion, reducing its interest expenses and improving its financial flexibility in the process.

A businessman admiring cash flow on his desk.

Image source: Getty Images.

6. Operating cash flow

Along those same lines, it's important that investors are well acquainted with the operating cash flow capabilities of the gold and silver mining companies they invest in.

Though debt can help fund mine expansion, development, and exploration, it's operating cash flow that ultimately is responsible for paying off that debt and handling the bulk of sustaining costs. Even if a mining company isn't profitable (which is always possible given write downs or other one-time expenses), as long as it's generating positive operating cash flow it's usually a very good sign. Positive operating cash flow is what'll really set the stage for future exploration and the possibility of a dividend, which a few gold and silver mining stocks offer.

7. Reserves and reserve replacement

Last but not least, gold and silver stock investors should be well aware of the precious-metal reserve reading for the individual companies they own and are following. The remaining resources in the ground serve as a roadmap for investors to figure out how long a mine can remain profitably in production.

Likewise, reserve replacement is just as important. Even though mining companies are taking precious metals out of the ground and depleting what remains of their resources, they're also constantly exploring new areas of existing mines, as well as separate projects, which could contain new resources. Some of the healthiest and most successful mining companies are often able to replace their reserves completely each year, or perhaps even build them up. Mining companies with strong reserves and reserve replacement are probably going to rise to the top of the pack.

If you get a handle on all seven of these figures, your chances of success while investing in gold and silver stocks is likely to be better than average.