When it rains, sometimes it pours. Doral Financial (NYSE:DRL) started off a few years back as a great little Puerto Rican mortgage bank that nobody had heard of. Then it became a darling small- to mid-cap growth stock. Then all of a sudden the yield curve changed, analysts got scared of the company's balance sheet, and the stock now sits two-thirds lower than where it used to be.

After seemingly fighting the Street with respect to the way it values the interest-only strips (IOs) that are created when originating and selling mortgages, Doral management has announced that it is restating earnings to account for a change in the valuation of those IO strips.

While nothing has been finalized, it appears that the company will be decreasing the estimated value of the IOs by between $400 million and $600 million. On an after-tax basis, the charge to earnings will likely be between $290 million and $435 million -- potentially spread out over four years' worth of statements going back to 2000.

In its old practice, the company had valued its IOs based upon contractual or actual LIBOR (the London InterBank Offering Rate -- a popular interest rate proxy) and did not incorporate the forward yield curve. With this new valuation approach, though, the forward yield curve will be incorporated.

The company also announced several other changes to its operating philosophy. The company will retain more mortgages going forward (which will increase reported net interest income) and will try to reduce the loan sales that produce the IOs that caused so much trouble.

The company will also attempt to focus on cash gains on mortgage sales and the creation of fixed-rate IOs that are not sensitive to changes in short-term rates. Finally, the company also announced that it had discontinued negotiations for selling all or part of the IO portfolio at the heart of this mess.

So what is an investor to make of all this?

First of all, book value will take a haircut as those IOs are written down. What's more, while the company won't be in danger of violating federal capital sufficiency rules, the company already carried low debt agency ratings, and this action could potentially prompt a downgrade to junk status.

Secondly, it's hard to say right now what impact this could have on future profitability. IO strip creation (and the value assigned therein) was an important component of the company's gain-on-sale margin when it sold mortgages. With these steps taken today, not only will fewer mortgages be sold (eliminating that up-front profit) but also the calculations involved could assign a lower profit to each sale.

Whether or not that proves to be the case, Doral has at long last done the right thing. While some may feel that management's credibility was tarnished through this whole matter, I think it's important to note that not only did it do the conservative thing (eventually) but also it has an excellent track record managing this bank -- well before these IOs became any sort of issue.

Investing success often requires buying into scary situations, and Doral certainly qualifies.

Although I'm not going to sound the "all clear" for any and all investors, I do believe that the worst is now behind the company.

It might take a few quarters to figure out what profits and returns are going to look like under this "new philosophy," but trading at less than five times '05 earnings (which have been brought down markedly by nervous analysts) and paying a solid dividend suggests that patient investors will be well-rewarded indeed. Assuming no more skeletons lurk in the closet, this is an interesting company for value-oriented investors.

For more on banking and Doral, check out these prior Foolish takes:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).