Right about now, you might be looking at a whopping decline in your favorite stock. But if you're a believer in this position, all is not lost.

If you have faith that your shares are going to rebound, there are

loads of things you can do to take advantage of these market swings. To start, just buy more shares. But if you simultaneously are concerned with estate planning, take advantage of the market's ebbs and flows and put that stock in a grantor retained annuity trust, a.k.a. a GRAT.

"It's a fabulous technique to minimize estate taxes on income-producing assets or an appreciating stock portfolio," says Sandy Schlesinger, partner and chairman of the wills and estates department at

Kaye Scholer Fierman Hays & Handler

, a New York law firm. It'll cost you around $5,000 in legal fees just to set one up so you need to make sure it's economically worth your while. But on the upside, it's not considered aggressive in the eyes of the

Internal Revenue Service

. So there's no need to be nervous about trying to pull one over on Uncle Sam.

With a GRAT, you essentially are loaning yourself money. You transfer your stock or real estate into an annuity and pay yourself back with interest. Any additional earnings that your investments make above that interest rate will be passed onto your beneficiaries without estate or gift tax. (Check out

Section 2702 of the tax code for more details).

But like everything involving this tumultuous market, these GRATs are not bulletproof. If the stock does not return more than the interest rate, the GRAT was a waste of time and money. You simply get back your shares, or the cash equivalent, at the end and say goodbye to the money you spent to set the GRAT up.

Let's say you own

Red Hat

(RHAT)

, the developer and provider of software, including the

Linux

operating system. The stock is down more than 75% since Jan 1. But since the Linux system is comparable to

Microsoft NT

and is free, you believe that Red Hat can take on

Microsoft

(MSFT) - Get Report

and the stock will pop again.

So put 1,000 shares of Red Hat, currently valued at about $27,000, in a GRAT and establish the trust for two years. After two years, the GRAT returns to you the stocks or cash equivalent, with interest at today's IRS rate of around 8% per year based on the stock's performance, says Bill Fleming, director of personal financial services for

PricewaterhouseCoopers

in Hartford, Conn. The great part here is that the IRS sees this transaction as a loan being repaid, so there's a very minimal gift tax on that amount you put in when you established the GRAT. (And there's no gift tax at all to your heirs at the end of the GRAT.)

In our example, the GRAT owes you about $31,500. ($27,000 times 1.08 times 1.08). You'll get half of that, $15,750, each year for two years. As the trustee, you decide if the trust pays you back in stock or cash. But note: If the trust pays you cash, it must sell shares to generate the money. The trust then will owe capital gains tax, which flows through to your tax return.

We'll assume the trust is repaying you in shares.

Let's say, as you predicted, Red Hat bounces back and returns 50% each year for the next two years. That means at the end of year one, the stock is trading at 40 1/2, your 1000 shares are worth $40,500. The GRAT owes you $15,750, which translates into 389 shares.

After year two, the shares are up to 60 3/4. This time, the GRAT pays you 259 shares.

What happens to the remaining 352 shares? They get passed on to the GRAT's beneficiaries without estate or gift tax. The beneficiaries do inherit the original basis in the shares, but at its future trading price of 60 3/4, you've pushed $21,384 out of your estate.

So why does this work? That 8% interest rate is pulled off of a government table. When the tables were constructed, no one ever assumed investors would be averaging double-digit returns, according to Richard Van Benschoten, a senior associate at

Cowen Financial Group

in Manhattan.

Of course, there's a downside. What if the stock tanks? The GRAT "crashes," as the accountants say. Those shares go back into your estate and are subject to estate tax at your death. So your heirs get nothing. Even worse, you've cut into your

lifetime unified gift tax credit, which allows you to exclude up to $675,000 from estate taxes in your lifetime, at the time you established the GRAT. All for nothing.

But that's also why you should consider putting only one stock in a GRAT. "You don't want to put a winner and a loser in GRAT," says Fleming. "The loser will wipe out the purpose of the GRAT."

You can set up as many GRATs as you like but be aware that if you die before the end of a GRAT's term, the stock automatically goes back into your estate.

So GRATs are great for any investment you expect to come back, says Van Benschoten. Be sure to consider a GRAT for your pre-IPO shares.

At this point, there is no talk in Congress of eliminating this savings vehicle -- but nothing good lasts forever in the tax world. So act fast.

Send your questions and comments to

taxforum@thestreet.com, and please include your full name. Tax Forum appears Tuesdays, Thursdays and Saturdays.

TSC Tax Forum aims to provide general tax information. It cannot and does not attempt to provide individual tax advice. All readers are urged to consult with an accountant as needed about their individual circumstances.