NEW YORK (TheStreet) -- Aye, it's been a good year for stock market investors. All kinds of sectors have done exceptionally well, including the financials, the banks, the Dow 30 stocks and the "awesome wonder" of the stock market, Apple (AAPL) - Get Report.

The last month or so have been good for the major stock averages, helped along by the promising elixir of eventual Quantitative Easing. Yet it's easy to fall into the same quicksand that

Chesapeake Energy

(CHK) - Get Report

did, led by their risk-taking, swash-buckling CEO Aubrey McClendon.

CHK is a big company and is the second-largest producer of natural gas, behind the Jolly Green Giant of energy companies,

Exxon Mobil

(XOM) - Get Report

.

Once upon a time Chesapeake had a market cap of around $18 billion, and their CEO, who owned a lot of CHK stock, spent an enormous amount of the company's money drilling for more oil after the price of natural gas tanked.

The Wall Street Journal

reported in an Aug. 6 article that Chesapeake's "budget for leasing and drilling is roughly $6 billion greater than its projected cash from operations this year." This may help explain why their current market cap has dropped to $12.39 billion as of Thursday.

For the 2012 second quarter, Chesapeake reported net income to common stockholders of $929 million ($1.29 per fully diluted common share), Ebitda of $2.385 billion (defined as net income before income taxes, interest expense, and depreciation, depletion and amortization) and operating cash flow of $895 million (defined as cash flow from operating activities before changes in assets and liabilities) on revenue of $3.389 billion and production of 347 billion cubic feet of natural gas equivalent.

The rest of the earnings story for the second quarter is worth

perusing on the company's Web site

. The bottom line is that the adjusted earnings-per-share for the second quarter 2012 vs. the first quarter fell by 66%. Not a pretty picture indeed!

Here's a chart that helps tell the story. You might see some good news as the price seems to have bottomed for now and earnings per share are turning skyward.

Image placeholder title

CHK

data by

YCharts

Yet the company's over-extension of financial assets and its lack of restraint in being fiscally conservative will take time to repair. Investors may learn some important lessons.

First of all, like the price of natural gas, the stock market averages can go down just as fast if not faster than they can zoom up. This is often seen by technical chart-watchers who know what to look for.

Such a chart-watcher is CMT Ryan Detrick

at Schaeffer Research

who mentioned today that there are two ominous charts that careful traders and investors might take note off (see the link for details).

Detrick reminded investors that, "it pays to remember that you are only as good as your last trade. Things can change at any time, and as traders, it's our job to be ready for trend changes."

After presenting his two charts, he makes it clear what his outlook is. "By no means is this a huge bearish call, as I firmly believe the overall uptrend is in place and still maintain a year-end target of 1525 on the

S&P 500 Index

(SPX)

. However, we could be looking at some near-term weakness here." That's the way I and a number of other long-time analysts see it as well.

As for CHK, Carl Icahn and the shareholders at

Southeastern Asset Management

have exercised a significant amount of influence over the company by replacing four of the nine members of the board of directors. The new board members wanted and received a new, independent chairman of the board.

CEO McClendon is breathing easier too. Reportedly Southeastern and Icahn have been supportive of McClendon's role. Like the major shareholders (Icahn owns over 50 million shares and McClendon still controls over 3.1 million), the board wants to see reduced spending and an ongoing sale of unneeded assets.

Like the smart investors who know when to take some money off the table after a nice run-up in stock prices, the management of Chesapeake Energy should speed up their plan to sell off assets and reduce company debt.

As the

Journal

report noted, "In a strategic shift, the company in June agreed to sell its pipeline business and related assets for more than $4 billion in a medley of deals to an energy infrastructure investment firm."

That's a major step in the right direction, and as long as Icahn's impetus continues to be felt, billions of dollars of other holdings (CHK controls over 1.5 million acres in the rich oil fields of the Permian Basin) will be sold, theoretically making each share of CHK stock worth intrinsically more and more.

If we see shares drop to $18 during a market swoon, those of us who've been waiting to buy some may have an attractive entry opportunity.As of the time of publication of this article the author held no positions in any of the stocks mentioned.

Jim Cramer and Stephanie Link actively manage a real money portfolio for his charitable trust- enjoy advance notice of every trade, full access to the portfolio, and deep coverage of the latest economic events and market movements.

This article is commentary by an independent contributor, separate from TheStreet's regular news coverage.