Charles Hooper

Thoughts and projects from a site reliability engineer

Who Was Enron and Why Is This Important to Financial Reporting Today?

This entry is part 6 of 8 in the series Intro to Financial Reporting

Enron was an energy trading company. Rather than generate energy themselves, Enron made its money by buying and selling energy contracts. At one point, Enron was considered one of the most innovative companies on the market and reported sales of over $100 billion one year. Soon after, the company then reported losses of $618 million loss in the third quarter of 2001 (Nielsen, 2002, para. 1). A little later, the firm filed for Chapter 11 bankruptcy. “The company’s Chapter 11 filing [left] banks, pension plans and other lenders with at least $5 billion at risk. More than 4,000 Enron employees lost their jobs and 401(k) savings. The collapse reverberated the stock market, which dropped some $200 billion in value since Enron’s Dec. 2 filing, amid fears that other Enrons are lurking out there” (Jaffe, 2002, para. 3).

So how does a company go from reporting over $100 billion dollars in sales when they are really on the verge of bankruptcy? The answer lies in the deceptive accounting practices and outright fraud that Enron’s executives and auditors took part in. One factor is the massive amount of debt that Enron was hiding from its balance sheet. How does one go about hiding debt? “At the heart of Enron’s demise was the creation of partnerships with shell companies, many with names like Chewco and JEDI, inspired by Star Wars characters. These shell companies, run by Enron executives who profited richly from them, allowed Enron to keep hundreds of millions of dollars in debt off its books” (Nielsen, 2002, para. 4). At the same time, Enron’s board members, regulators, analysts, auditors, and even politicians looked the other way while Enron committed its fraud (Kadlec, 2001, para. 4). Enron’s auditing firm even went as far as to order their employees to shred all of the documents they used to do Enron’s audits! In the wake of Enron’s collapse, the general public demanded that the politicians step up, create, and enforce corporate law. This allowed for the creation of the Sarbanes-Oxley Act of 2002 which is still in effect today!

 

Jaffe, Stephen. TIME. (2002). How Fastow Helped Enron fall. Retrieved from 

Kadlec, Daniel. TIME. (2001). Power Failure. Retrieved from 

Nielsen, James. TIME. (2002). Enron: Who’s Accountable? Retrieved from 

Financial Crises: And the Cycle Continues

This entry is part 7 of 8 in the series Intro to Financial Reporting

After Enron, Global Crossing, and Xerox, we witnessed the creation of new regulation (the Sarbanes-Oxley Act of 2002), the establishment of a new oversight/regulatory organization, and increased pressure from the government on big players in the market. As we find ourselves in the midst of the Financial Crisis of 2007 (and onward,) we are seeing this same pattern – new legislation, a new regulatory organization, and increased pressure from the government on big players in the market.

In news today, we see the Restoring American Financial Stability Act of 2010 and the Wall Street Reform and Consumer Protection Act of 2009 on the desk of the President. This 2,300-page bill will “ban high-risk trading inside the banks and put in end to conflicts of interest” and “ban steering payments, liar loans, and prepayment penalties and give Americans … transparency” (Nichols, 2010, para. 4-5). But that isn’t all. These new acts would also create yet another oversight/regulatory organization called the Consumer Financial Protection Bureau to regulate mortgages, credit cards, and other financial consumer products (Hall, 2010, fig. 1). Not only does this act establish a new bureau, it also creates a “council of regulators” led by the Treasury to monitor “threats to the financial situation” (Hall, 2010, fig. 1).

And as if you couldn’t already guess, today in the news we see increased pressure from the government on big players in the market including Goldman Sachs, Dell, and AIG. Goldman Sachs agreed to settle by paying a $550 million dollar fine – the largest fine ever charged by the SEC after being accused of securities fraud (Craig, Scannel, 2010, para. 3). Dell admitted to accounting fraud back in 2007 and agreed on a settlement with the SEC today – The company must pay a $100 fine and restate its earnings for the 2003 to 2006 accounting periods (Ogg, 2010, para. 2-3). What Dell was caught doing was violating GAAP, the Global Accepted Accounting Principles, by “fudging” the timing of recognized expenses and income to meet analyst’s quarterly earnings forecasts (Ogg, 2010, para. 1,4). And if that isn’t enough, the AIG settled with the Ohio State Attorney General with a $725 million fine (AFP, 2010, para. 1). The AIG was also accused of accounting fraud to achieve stock price manipulation (AFP, 2010, para. 2).

As we can clearly see, after each financial crisis the response is likely to be the same.

AFP. (2010). AIG to Pay 725 Million Dollars to Settle US Fraud Lawsuit. Retried from http://www.google.com/hostednews/afp/article/ALeqM5h0MtX-uuAB1z2f3dcmONOLRCIWaw

Craig, Susanne, Kara Scannel. The Wall Street Journal. (2010). SEC Split Over Goldman Deal. Retrieved from http://online.wsj.com/article/SB10001424052748704229004575371601322076426.html?mod=WSJ_hpp_LEFTTopStories

Hall, Kevin. McClatchy Newpapers. (2010). What’s this big finance-regulation overhaul really do? Retrived from http://www.mcclatchydc.com/2010/07/15/97609/whats-this-big-finance-regulation.html

Ogg, Erica. CNET. (2010). Dell to Restate Earnings Due to Accounting Fraud. Retrieved from http://news.cnet.com/8301-31021_3-20007390-260.html

Ogg, Erica. CNET. (2010). Goals Led Dell to Cook the Books. Retrieved from http://news.cnet.com/Goals-led-Dell-to-cook-the-books/2100-1014_3-6203071.html?tag=mncol;txt

Nichols, John. The Nation. (2010). Financial Reform Passes, But What Does That Mean? Retrieved from http://www.thenation.com/blog/37541/financial-reform-passes-what-does-mean

Why Was the Sarbanes-Oxley Act of 2002 Created and How Does It Impact Financial Reporting Today?

This entry is part 5 of 8 in the seriesIntro to Financial Reporting

The Sarbanes-Oxley Act of 2002, also known as the SOX Act, was created in response to the series of misleading and outright fraudulent activity of big business in the 1990s (Lasher, 2008, p. 187). Essentially, multiple publicly-traded businesses jacked up their stock prices by “publishing false or deceptive financial statements” (Lasher, 2008, p. 187). The most notable company to crash was Enron, followed by Global Crossing (parent of MCI,) and Xerox; later, almost one thousand publicly traded companies restated their financial statements (Lasher, 2008, p. 187). This resulted in almost $6 trillion of stock market value disappearing (Lasher, 2008, p. 187)! In response to these events, Congress drafted and passed the Sarbanes-Oxley Act (SOX) of 2002.

Next, we look to the provisions of the Sarbanes-Oxley Act of 2002 to see how they impact the way firms prepare their financial statements. The first and most major way the SOX Act impacted financial reporting was that it ended self-regulation of the public accounting industry (Lasher, 2008, p. 190). The SOX Act achieved this by establishing the Public Company Accounting Oversight Board (PCAOB,) an independent, non-profit organization (Lasher, 2008, p. 190). The PCAOB is given authority and empowered by the Securities Exchange Commission (SEC) to regulate and enforce these regulations of the accounting industry (Lasher, 2008, p. 190). Under the regulations of the SOX Act and the PCAOB, it is now required for all accounting firms to be registered and illegal for an unregistered firm to issue audit reports for publicly-traded companies (Lasher, 2008, p. 190). The PCAOB is empowered and directed to perform investigations of questionable accounting practices, hold disciplinary hearings, and impose sanctions upon firms and individuals who auditors who are caught letting wrongdoings “slide” (Lasher, 2008, p. 190). Another way the SOX Act effectively restores the integrity of financial statements is by removing a very large conflict of interest that existed in the 1990s. This conflict of interest existed for accounting firms that also provided consulting services to their clients; under the SOX Act, these types of relationships became illegal and firms that had audit clients could no longer offer these same clients additional consulting services (Lasher, 2008, p. 190). Another major conflict of interest that was removed was the relationships between auditors and the audited firm’s CEO and CFO. Instead of reporting to the firm’s executives, auditors now reported to an “audit committee” of the firm’s Board of Directors; At least one member of which is legally required to be a financial expert (Lasher, 2008, p. 190). Finally, partners of an auditing firm can only supervise the same client for five years at a time (Lasher, 2008, p. 191). The final main problem that the SOX Act addresses is the potential conflict of interest between a firm and its executives, also known as the agency problem (Lasher, 2008, p. 192). The SOX Act achieved this by requiring CEOs and CFOs to certify that they reviewed their firm’s financial statements, that they are true to the best of their knowledge, to also certify that they are personally responsible for their firm’s internal financial controls, and by requiring that company executives repay bonuses and capital gains from stock sales if they follow within 12 months of the issue of financial statements and the gains are made as a “result of misconduct” (Lasher, 2008, p. 191).

Lasher, William R. (2008). Practical Financial Management (5th ed.). Thomson South-Western.

Who Regulates Financial Reporting?

This entry is part 4 of 8 in the series Intro to Financial Reporting

As previously discussed, financial statements can sometimes have their own “dialect,” in a manner of speaking. Additionally, financial statements can be subject to accounting fraud because management is usually rewarded based on their firm’s performance which is measured based on the financial statements that they prepare. It is for these reasons that oversight and regulation of financial reporting is necessary. In addition to the Generally Accepted Accounting Principles (GAAP,) financial reporting is regulated by organizations such as the Securities Exchange Commission (SEC), the Financial Accounting Standards Board (FASB), and the International Accounting Standards Board (IASB) (Wild, Shaw, & Chiappetta, 2009, p. 9).

The mission of the Securities Exchange Commission, or SEC (2010), is to “protect investors, maintain fair, orderly, and efficient markets, and facilitate capital formation” (para. 1). The SEC maintains that all investors, whether larger or small, should have all of the basic information of a security required to make investment decisions (para 6). As a result, the SEC requires all publicly traded companies to disclose “meaningful financial and other information to the public” (para 6). The SEC was formed under the Securities Act of 1933 and the Securities Exchange Act of 1934 in the wake of the great depression to restore confidence in the stock markets (para 16).

Next, we have the Financial Accounting Standards Board, or FASB. Similar to the SEC, the FASB aims ensure that investors have useful information for making investment decisions. More specifically, the FASB’s mission is to “establish and improve standards of financial accounting and reporting that foster financial reporting by nongovernmental entities that provides decision-useful information to investors and other users of financial reports” (para 3). The FASB notes on their website that while the SEC has the legal authority to establish the financial accounting and reporting standards, the SEC’s position is to rely on private organizations, like the FASB, for this function (para 2).

Finally, we have the International Accounting Standards Board, or IASB. The IASB (2010) is responsible for developing and publishing International Financial Reporting Standards (or IFRSes,) ensuring that these standards are enforceable, and promoting their use (para 1).

To conclude, because financial statements can sometimes have their own “dialect” and are subject to accounting fraud there are various organizations that are required to regulate the preparing and publishing of them. The major organizations responsible for this are the Securities Exchange Commission (SEC), the Financial Accounting Standards Board (FASB), and the International Accounting Standards Board (IASB).

Chiappetta, B., Shaw, K., Wild, J. (2009). Principles of Financial Accounting (19th ed.). McGraw-Hill/Irwin.
Financial Accounting Standards Board [FASB]. Facts about FASB. Retrieved from http://www.fasb.org/jsp/FASB/Page/SectionPage&cid=1176154526495
International Accounting Standards Board [IASB]. (2010). About the IASCF Foundation and the IASB. Retrieved from http://www.iasb.org/The organisation/IASCF and IASB.htm
Securities Exchange Commission [SEC]. (2010). How the SEC Protects Investors, Maintains Market Integrity, and Facilitates Capital Formation. Retrieved from http://www.sec.gov/about/whatwedo.shtml

What Is Financial Reporting and Who Uses Financial Reports?

This entry is part 1 of 7 in the series Intro to Financial Reporting

If “accounting is the language of finance” (Lasher, 2008, p. 9) then financial reporting is the “communication of financial information useful for making investment, credit, and other business decisions” (Wild, Shaw, & Chiappetta, 2009, p. 681) Such communications include general purpose financial statements such as income statements, balance sheets, equity reports, cash flow reports, and notes to these statements. Additionally, items such as SEC filings, press releases, meeting minutes, and auditor’s reports are also included in financial reporting (Wild, Shaw, & Chiappetta, 2009, p. 681). Many financial reports, or the accounts and data they represent, are subject to various regulations and standards from organizations such as the Securities Exchange Commission (SEC), the Financial Accounting Standards Board (FASB), and the International Accounting Standards Board (IASB) (Wild, Shaw, & Chiappetta, 2009, p. 9). Much like any language, financial statements could have their own “dialect” so to speak. For example, knowing about the use of cash-based accounting versus accrual based accounting could impact some very serious business or investment decisions. The various regulations, standards, and Generally Accepted Accounting Principles (GAAP) helps to make sure we’re all on the same page.

In the broad sense of the term, everyone uses financial reports! We all receive receipts when we make purchases from stores and we all receive bills. In a sense, these are both financial reports that communicate to us the status of our accounts or individual transactions. When we focus on business, however, we can more easily focus on managers, investors, creditors, and even the government. Managers use financial reports to make business decisions. For example, if a manager of a manufacturing firm saw from internal financial and inventory reports that product returns were high then that manager might push for increased quality control. Investors and potential investors alike use general-purpose financial reports so frequently that companies often release them together in a bundle called “investor reports,” “annual reports,” or “shareholder reports.” Investors would use this information to help make a decision about whether they will buy, sell, or hold onto a particular company’s stock. Another large group of people who use financial reports are creditors. A creditor would use financial reports to determine their risk in loaning money to a particular company.

Lasher, William R. (2008). Practical Financial Management (5th ed.). Thomson South-Western.
Chiappetta, B., Shaw, K., Wild, J. (2009). Principles of Financial Accounting (19th ed.). McGraw-Hill/Irwin.

What Are Some of the Main Financial Documents Used in Financial Reporting?

This entry is part 2 of 8 in the series Intro to Financial Reporting

According to Lasher’s “Practical Financial Management,” the three financial statements of interest to us are the income statement, the balance sheet, and the statement of cash flows (Lasher, 2008, p. 26).

The income statement’s name is pretty self-explanatory. That is, the income statement reports “how much money a company has earned [and spent] during the accounting period” (Lasher, 208, p. 28). A public, or external, income statement may be very vague while a income statement that is used internally may include much more detail. Despite these differences, the net income will be reported as the same. Net income goes by some other names as well, including “earnings” or “profit” (Lasher, 2008, p. 30). When a company loses money, net income is referred to as net loss. One important thing to note is that “net income is not equivalent to cash in the firm’s pocket” (Lasher, 2008, p. 30). This is because many businesses make sales on credit.

While the income statement shows the movement of money within a firm, a balance sheet depicts a snapshot of “everything a company owns and everything it owes at a moment in time” (Lasher, 2008, p. 30). This includes a firm’s assets, liabilities, and equity. For those who aren’t familiar, this depicts the entire accounting equation: assets = liabilities equity (Lasher, 2008, p. 30). Assets are “things,” whether physical of financial, that a company owns. This includes everything from real estate to manufacturing equipment and even stocks or bonds in other companies. Assets are listed in descending order of liquidity on the balance sheet (Lasher, 2008, p. 31). Meanwhile, liabilities includes money that the company owes, ie: debt. Liabilities are listed in order of when they are due. The final portion of the equation is equity. Equity is money put into the business by its owners. . The two types of equity are direct investment and retained earnings (Lasher, 2008, p. 39).

The statement of cash flows helps to figure out how much cash the company is really making in the short run (Lasher, 2008, p. 30). In other words, the statement of cash flows shows “where the firm’s money came from and what it was spent on” (Lasher, 2008, p. 70). Another name for the statement of cash flows is the “statement of changes in financial position.”

Lasher, William R. (2008). Practical Financial Management (5th ed.). Thomson South-Western.

Series: Financial Reporting

This is the series Intro to Financial Reporting

At the date of publication, I was taking summer classes for Sociology and Principles of Finance. As part of the class, I was required to write a one page paper each week on a topic I chose. I chose Financial Reporting. At the end of the semester, these papers were concatenated and turned into one monstrous paper. japherwocky suggested post the papers to a blog, so here they are.

  1. What Are Some of the Main Financial Documents Used in Financial Reporting?
  2. What Is Financial Reporting and Who Uses Financial Reports?
  3. What Are the Generally Accepted Accounting Principles (GAAP)?
  4. Who Regulates Financial Reporting?
  5. Why Was the Sarbanes Oxley Act of 2002 Created and How Does it Impact Financial Reporting Today?
  6. Who Was Enron and Why Is This Important to Financial Reporting Today?
  7. Financial Crises: And the Cycle Continues

Python: Starting Tornado Apps at Boot Using Upstart

Today, I’m going to show you how to start up your Tornado apps at boot using upstart. For path names, I’m assuming some modern version of Ubuntu, such as 9.10 or higher. I’m also assuming that you have some project with an executable Python script that fires up the Tornado app. I usually have one file in all of my projects called web.py.

The important part of this file looks like this (mind the application and port variables):

Snippet in web.py
1
2
3
4
if __name__ == "__main__":
	http_server = tornado.httpserver.HTTPServer(application)
	http_server.listen(port)
	tornado.ioloop.IOLoop.instance().start()

Got that in place? Good. Next, make a system user for your project to run as. In my example, I’ll be using projectuser as the username. Creating this user can be done like so:

1
sudo useradd --system --user-group projectuser

Finally, create the file /etc/init/web.conf. It’s very important that this filename ends in .conf. The contents of this file should be as follows:

1
2
3
4
5
6
7
8
9
\# torando project
start on runlevel 2
stop on runlevel \[!2\]
respawn

setuid projectuser
setgid projectuser

exec /path/to/project/web.py

That’s it! You can start your Tornado app by entering the command: sudo start web. If successful, you should see output similar to: ` ** web start/running, process 28058. You can also stop your projects using the command sudo stop web`.

Dropping Privileges in Python for Tornado Apps

Today, I’m going to show you how to drop from the root user to an unprivileged user in Python for the purpose of running a Tornado app.

First make a system user for your project to run as. In my example, I’ll be using projectuser as the username. Creating this user can be done like so:

1
sudo useradd --system --user-group projectuser

Now, in your script that is responsible for starting your Tornado app, you likely have something that probably looks like the following:

Snippet in web.py
1
2
3
4
if __name__ == "__main__": 
    http_server = tornado.httpserver.HTTPServer(application) 
    http_server.listen(port) 
    tornado.ioloop.IOLoop.instance().start()

What we need to do now is define a user to run as and then drop privileges using a call to setuid. We can do this by replacing the above with:

Modification to web.py
1
2
3
4
5
6
7
8
9
10
11
12
if __name__ == "__main__":
    import os
    import pwd
    # define user to run as
    run_as_user = "projectuser"
    # drop privileges
    uid = pwd.getpwnam(run_as_user)[2]
    os.setuid(uid)
    # start tornado app
    http_server = tornado.httpserver.HTTPServer(application)
    http_server.listen(port)
    tornado.ioloop.IOLoop.instance().start()

And voila, your app should now run as the user you defined! Do note that only the root user can call setuid. As a result, your script now needs to be run using sudo or from an upstart startup script, for example.

One caveat is that you won’t be able to use port numbers below 1024 since you are dropping to an unprivileged user before binding to the port. I think there’s a way to get around this by replacing http_server.listen() with http_server.bind(), http_server.start(), and dropping privileges between those calls, but this remains untested for now. Alternatively, you could use the respective proxy modules for Lighttpd or nginx to listen on privileged ports.

Twitter BookSuggest

Twitter BookSuggest is a web app that attempts to make book recommendations based on a person’s last 20 tweets. Clicking on a book cover will present you with a description of the book, as well as a clickable link to Amazon.com where you can purchase the book or add it to your wishlist. I’ve been working on this project for at the past couple of weeks, so please check it out. If you don’t use Twitter then just hang tight, I’ll be releasing a Facebook version shortly.