Mark Twain's name sits among the annals of great Americans for many reasons: His ascerbic and spirited social commentary; his prophetic, telling fictional works; and equally significant, his love for things containing alcohol. And despite his noted financial troubles -- he declared bankruptcy in 1893 -- I'll add another to the list: He had a nose for value.

Twain, an investor in an insurance company, said of insurance:

Ever since I have been a director in an accident-insurance company I have felt that I am a better man. Life has seemed more precious. Accidents have assumed a kindlier aspect . . . But to me now there is a charm about a railway collision that is unspeakable.

The good Mr. Twain dances about the detail I'll now reveal: The best insurance companies don't just write a simple policy, perform a service of mutual societal benefit, and part ways.

They seek risks -- the dirty, shunned variety -- and exploit them: Workers' compensation, product liability, and three-legged donkeys. The best insurers bide their time, and when other run, they write insurance on them. And they make lots of money.

These companies rarely come cheap. The market's hip to those that do insurance well, and values them accordingly. But today that's changed, courtesy of a soft underwriting market and the still tentative state of economy. W.R. Berkley (NYSE: WRB) is just that sort of company, and despite a superlative long-term record, it's priced as if it will create little value from today forward -- the shares trade at just 1.1 times book value. Consistent with the Ugly Portfolio's mantra, I'm buying the nasty: $800, or 4.7% of my Rising Star Portfolio's first year capital.

The business
This is may seem like an odd investment, for the Ugly Portfolio. Those who've followed my work know that I believe getting warm and fuzzy over managers is a mistake. But if I can invest in a company led by fabulous individuals without paying up, well that's a no-brainer. W.R. Berkley, led by founder and more than 20% shareholder Bill Berkley, is just the ticket.

A former hedge fundie (before hedge funds were cool, and simultaneously loathed), Harvard graduate, and inveterately individualistic -- Bill Berkley has built a culture that encourages non-consensus thinking. In common terms, that means they're willing to roll up their sleeves, and write insurance policies on seemingly weird, idiosyncratic risks, the type others shun—a philosophy not unlike Markel (NYSE: MKL), or HCC Holdings (NYSE: HCC).

The company operates a series of specialty lines -- things like workers compensation, product liability, and professional liability -- and avoids commodity products and substantial catastrophe exposure. And for whatever it's worth, it seems like we can take Berkley at his word. This underwriting philosophy, coupled with a judicious attitude to risk, has enabled the firm to grow book value 21% over the past 10 years, and post 16% returns on equity.

The thesis
This sounds great, exciting even. Too good to be true? Truth is, W.R. Berkley shares aren't cheap without reason: We're going on the seventh year of an unbelievably soft underwriting market, wherein even the best insurance companies have been forced to swallow meager price increases. Take that, and remember that recession? Insurance policies in force decline during recessions and pricing softens, because there are fewer small businesses out there.

That's just fine by me.

  • Underwriting cycle: The truth is that there's a lot of underwriting capacity out there, and insurers risk pricing measures are increasingly sophisticated. But laws of economics haven't been repealed: Premium growth rates are coming on their seventh year of declines, according to a recent McKinsey study. That means that, despite inflation, insurers haven't been able to raise rates. That cannot persist, over time. Anecdotal evidence bears this out: Mr. Berkley noted that he thinks some insurers are writing business at losses. Long run, this trend is categorically unsustainable: Companies either go out of business, or start pricing business properly. And when they do, I expect Berkley will start writing business hand over fist, minting cash in the process.
  • Investment returns: One of the perks of the insurance business is that if insurers write profitable business—and keep a steady flow of it -- they, for all intents and purposes, get a zero-cost loan, and they can invest the proceeds. It's what made early Berkshire Hathaway (NYSE: BRK-A)(NYSE: BRK-B) shareholders rich. It's called float.

    Right now, W.R. Berkley investment portfolio is almost four times its book value. Provided insurance operations are profitable, that means a mere 4% return on its investments will grow its book value more than 15%. Going forward, I expect investment returns, alongside profitable underwriting, to be mightily accretive to shareholder value.
  • Recovering economy: There. I said it. I'm not putting my head in the sand. I know housing's still in the gutter. I also know that business confidence, if hiring's any indication, is -- to put it mildly -- not tremendous But I also think that the likelihood of the economy turning meaningfully south is limited. More importantly, by my math, Berkley shares already price the risk of a soft economy and underwriting market. If the economy and employment recover, which they should in time, the upside's gravy.

Insurance companies create value three ways: by growing their book of business, writing profitable business, and investing. Over the years, Berkley's done well in each of these categories. I've examined a range of valuation scenarios -- to encompass the risk of ... err ... its risks. And I think we come out looking pretty, at today's prices.

First things first, the doom-and-gloom scenario: Berkley's insurance operations decline to just break-even over a 10-year period and remain there, its book of business remains about even with current levels, pricing improvements never manifest, and it pulls a 4% return out of its investment portfolio -- shares are worth $22 -- or 25% downside. To me, that seems an unlikely outcome.

Now, for a dose of reality. Berkley's combined ratio, which measures the amount of revenue its insurance operations bring to the bottom line, has averaged 94.1% over the past 10 years. In practical terms, that means for every $100 dollars of revenue, its insurance operations brought $5.90 dollars to the bottom line. Assuming a 95% combined ratio, 3% pricing improvements and 3% volume growth, and 5% investment returns, I get shares worth $44. That's more like it.

First and foremost is inflation, for two reasons: 1) W.R. Berkley insures risks that may manifest at an uncertain point in the future, and if the cost of making good on these risks increases, its reserves may not prove sufficient, and 2)  a good slug of its portfolio is invested in bonds. Personally, I don't think the near-term risks of runaway inflation are great, but should it manifest, watch out below.

Next is Berkley's reinsurance segment, which comprised 11% of last year's net premiums. The company writes big risks in this segment, whose incidence could result in big payouts. I take comfort in the segment's history, but as the saying goes, past results are not indicative of future performance.

Then there are the contents of its bond portfolio. About 36% is invested in muni and state bonds, so if budget woes come home to roost, that could be problematic. I find comfort knowing that its muni bond holdings aren't particularly concentrated, for one. And second, according to S&P senior director Robin Prunty, the average state only owes 4% of their annual revenues as bond repayments. So, in that regard, I think the biggest risk is not the states themselves, but investors' confidence in the states' ability to repay.

Last is W.R. Berkley itself. Its business is people, and so its underwriting advantage leaves every Friday at 5:00 P.M. Moreover, sloppy hiring, greed, or some variety could result in poor underwriting, and big payouts. Again, I find some comfort Berkley's history, but it bears watching.

The bottom line
Not all risks are created equal, and over the years, W.R. Berkley's done an admirable job of distinguishing the smart from dumb. And at 1.1 times book, shares of W.R. Berkley shares -- with the company's unique culture and underwriting philosophy, and dirt cheap valuation -- seem like a pretty smart risk.

This article is part of our Rising Star Portfolios series, where we give some of our most promising stock analysts cold, hard cash to manage on the Fool's behalf. We'd like you to track our performance and benefit from these real-money, real-time free stock picks. See all of our Rising Star analysts (and their portfolios).

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.