Create a dated log file in Matlab

Posted in Uncategorized on July 23rd, 2009 by Michael Ewens – 1 Comment

If you change your datasets or code a lot in Matlab, it is smart to keep track of the results over time (trust me….). The ‘diary’ function allows you to record all output of your scripts to a file. Append your main .m file with the following code to create a diary/log file that is uniquely dated to the time (to the minute) that you ran the script:

date_now = clock;
date_now = strcat(num2str(date_now(1)),'_',num2str(date_now(2)),'_', num2str(date_now(3)), num2str(date_now(4)), num2str(date_now(5)));
diary(strcat('log', date_now,'.log'));

Setting $PATH in Mac OS X

Posted in Uncategorized on June 21st, 2009 by Michael Ewens – Be the first to comment

The myriad of Google searches did not help me set a new PATH variable on my Mac. Here is how I did it:
1. cd to /etc
2. Edit the file ‘profile’
3. Append the path you want to the end of the /usr/local … line.

Stata ODBC and Mysql collations

Posted in Uncategorized on June 9th, 2009 by Michael Ewens – Be the first to comment

What I learned today

Make sure that you set your column collations to latin1_swedish_c if you want to load a mysql table not created by Stata.

Oil price shocks and the current recession

Posted in Uncategorized on May 21st, 2009 by Michael Ewens – Be the first to comment

Will the recent uptick in oil prices undermine prospects for recovery from the recession?  Retail gasoline prices have risen about 50 cents a gallon from their low in December.  That takes away about $70 billion from consumers’ annual spending power, which is hardly helpful for the broader challenge of restoring household balance sheets to a level where spending could be expected to pick back up.  But let me emphasize that although I believe that the initial spike in oil prices was an important element of the process that produced our current difficulties, we are currently at a point at which the multipliers and spillovers associated with the recession dynamic itself have become far more important factors than the price of oil.  The problems faced by U.S. automakers at the moment– and those problems are very, very daunting– are not caused by the price of gasoline.  What is needed to restore U.S. vehicle sales now is not lower gas prices but instead more income, jobs, and confidence on the part of consumers.

 Notwithstanding, the recent rise in oil prices again underscores the present reality of the long-run challenges.  Even if we see significant short-run gains in global oil production capabilities, if demand from China and elsewhere returns to its previous rate of growth, it will not be too long before the same calculus that produced the oil price spike of 2007-08 will be back to haunt us again.

James Hamilton explains that the increases in oil prices from 2006 – 2007 go a long way towards explaining our current recession.

Posted via web from Michael’s posterous

Preserving Relationships: VCs Stopped Making Capital Calls

Posted in Uncategorized on April 27th, 2009 by Michael Ewens – Be the first to comment
Major limited partners (LPs), or investors in funds, asked their private equity (PE) partners to slow down investing and reduce the number of capital calls. Various LPs had engaged in a popular strategy of accumulating debt, and they did not have the cash on hand to honor every investment commitment after both the equity and debt markets collapsed. The number of first time investments fell by 65 percent from Q1 08 to Q1 09 as venture firms stopped making capital calls in order to preserve relationships with the LPs.

This fact can go a long way towards explaining why VC investments were down do dramatically over the last few quarters. Remember: in the end, VCs just want to raised their next fund. Thus, they want to preserve relationships with the investors that can make that happen. Combine this with an above-average investment horizon for most VC investments and the situation does not seem so dire.

Posted via web from Michael’s posterous

Italy's Mafia thrives in global financial meltdown

Posted in Uncategorized on April 26th, 2009 by Michael Ewens – Be the first to comment

In March, Italy’s intelligence services warned in a report that rising unemployment and the credit crunch could help crime syndicates tighten their tentacles around vast swaths of the nation’s business sector, including supermarkets, real estate and tourism.

A main engine of the mob’s recent strength — the age-old practice of loan-sharking — is thriving as banks hoard cash, allowing the Mafia to elbow in on legitimate businesses.

The mobsters are poised to “acquire control of businesses in difficulty, especially through their consolidated practice of loan-sharking,” as well as to “snap up assets put on the market by enterprises experiencing liquidity crises,” the intelligence report said.

One consequence of the credit crunch….

Posted via web from Michael’s posterous

Insiders are Selling Stakes at Highest Rate since 2007

Posted in Uncategorized on April 24th, 2009 by Michael Ewens – Be the first to comment

Executives and insiders at U.S. companies are taking advantage of the steepest stock market gains since 1938 to unload shares at the fastest pace since the start of the bear market.

Gap Inc.’s founding family sold $45 million of shares in the largest U.S. clothing retailer this month, according to Securities and Exchange Commission filings compiled by Bloomberg. Daniel Warmenhoven, the chief executive officer at NetApp Inc., liquidated the most stock of the storage-computer maker in more than six years. Sales by the co-founders of Bed Bath & Beyond Inc. were the highest since at least 2001.

This could also be because the owners have lost wealth elsewhere and needed cash. However, I know few people that “need” $45 million immediately.

Posted via web from Michael’s posterous

Portfolio Management and VC Outliers

Posted in Uncategorized on April 20th, 2009 by Michael Ewens – Be the first to comment
This desire to hit a home run will often cause a VC to manage their portfolio contrary to the best interests of the entrepreneur or their company. In other words, if you are one of the three most promising companies in a batch of ten, the VC may encourage (or force) you to take big risks and swing for the home run, even when a base hit or double is a smarter move. By forcing companies to take inappropriate risks, they do create the occasional home run, but they create many more failures along the way.

This gives me another research idea: follow venture capitalist portfolios over time to see if you can identify this effect.

Posted via web from Michael’s posterous

Credit Card Solicitations Fall Dramatically

Posted in Uncategorized on April 20th, 2009 by Michael Ewens – Be the first to comment

Posted via web from Michael’s posterous