15 Dec 2014

Coming Out...as a Data Scientist

My career has had several phases, creating the problem of describing what I do. I have a PhD in Chemical Physics, but I'm a little out of date in chemistry or physics. I have 2 degrees in geosciences, but at this point I'd be hard put to tell cuprite from a coprolite. But that doens't mean I haven't been busy.

I use programming and analytic methods to try to draw conclusions from data--ideally conclusions of some commerical usefulness. Sometimes the data sets are large, often they are imperfect and rarely are the conclusions significant at the 95% confidence level. I've been engaged in this pursuit for many years, but a new name has emerged from the Big Data revolution to describe what I do, "Data Scientist".

Referring to oneself in public as a Data Scientist takes a little courage. All scientists use data, after all, so there's going to be some eye rolls to get through. There isn't much consensus yet on what Big Data means or what a Data Scientist does.

I think of data science as a process, continually revisiting and rethinking the following steps:

  • Seeking new sources of information: In the Big Data world, people say "the guy with the most data wins". The truth might be closer to "the guy with the least data loses" but either way, more is often better.
  • Building the infrastructure: Powerful, open source tools make it possible to store, manipulate and retrieve enormous data sets. What's new here is Hadoop, a version of the technology Google uses to index the Internet. The ecosystem of tools and ideas and data is rapidly expanding, making it practical to draw insights that have never been possible before.
  • Drawing a conclusion: This has been the purview of statistics for 100 years, although perhaps there's more tolerance for ambiguity in the Data Science version than in classical statistics. Like Hadoop in the infrastructure step, open source software like R and Python have made it much cheaper and easier to perform statistical analysis.
  • Deciding when to act: Action is the whole point of data science, and it boils down to three questions. Can you explain it? Should you believe it? What are the risks?

We use a Data Science approach to investing and when we engage in unrelated consulting projects. Now we know what to call it.

28 August 2014

Beta Test for RecycloBuddy in Philly Area!

I've created a service in collaboration with my son Gabriel: RecycloBuddy reminds you to put out your recycling and trash cans on the right day. Keeping track of snow emergencies and holiday collection schedules can be surprisingly complex. We made an app to make it simple.

Beta testing starts with the Philadelphia area. We'll expand to other cities if people like it.

RecycloBuddy doesn't have much to do with my usual topics of investments, markets or big data, but I hope you'll try it and enjoy it. People only have so much mental energy for figuring things out. Use yours more productively!

30 July 2014

Is the Bull Market Too Old?

It's hard to argue that US stocks are cheap. By my reckoning, US stocks are on average priced about 60% over their intrinsic value, about where they were at the beginning of 2008.

In the chart below, the blue line is the ratio of the average market price/intrinsic value for the 1000 or so largest market cap stocks in the US. A higher number means more overvalued--good for sellers and bad for buyers. The S&P price index is plotted in red.

Admittedly, my approach to valuation lies somewhere between skeptical and conservative. I figured the market was almost fairly valued at the nadir of the Financial Crisis in early 2009, and during the US Debt Ceiling and Eurozone Crises in 2011-12.

"...the increase in the S&P...has more to do with investors' willingness to pay than stronger financial performance."

Nevertheless, starting in mid-2012, the S&P has moved up in a nearly steady line, and price/value increased roughly in parallel. From these observations I infer that the increase in the S&P over the past several years has more to do with investors' willingness to pay than stronger financial performance.

Making a assessment of this kind requires estimating intrinsic value. My approach starts with book value, and then adjusts for earnings power. Others have arrived a the same place by different paths. For example, Robert Shiller's famous PE estimate puts us at pre-crash levels.

Time to sell out? Not at all. In fact, I'm guardedly bullish, and for some unconventional reasons.

Bullish on the US Because of...Our Banks?

Actually, it's the overall system of financial services and regulation that I think is a source of strength--with the very important exception of health insurance. Neither bankers nor their regulators are widely loved, and yet the overall system plays a vital role in the economy. I'm not saying that stocks of the financials are necessarily cheap, although some are, but that the financial system adds resilience to the US economy.

"Financial institutions are almost always regulated, but when things go wrong they essentially become extensions of the government."

More Important Than You Think

At the highest level, the financial systems performs three vital services. It doesn't take a lot of imagination to understand what would happen if they suddenly vanished.

Manage billions of transactions a day: We largely take it for granted that credit card transactions are processed, checks clear, trades are made, ATMs dole out cash and that everything works without mistakes or malfeasance. We don't really expect to pay for any of this, and are even outraged at the idea of paying for it, forcing the financial system to nickel and dime us to hide the bill.

Take Risk: Everyone knows that banks make loans (including every time you make a credit card purchase on the Internet), insurance companies underwrite policies and VC firms invest in startups. But financial institutions also have to manage risk, which requires a huge investment in collecting and interpreting information to understand what is happening. For one particular unnamed global bank this proved difficult to organize and execute when things started happening differently from what was expected.

Act as an instrument of government: Financial institutions are almost always regulated, but when things go wrong they essentially become extensions of the government. This relationship was obvious during the Great Recession, when the government bailed out banks and set compensation levels, but deep down it's always there. When the Fed decides to "print money", what it actually does is manipulate banks to encourage them to increase lending. Regulators are expected to use this instrument to steer the economy between unemployment and inflation, respond to crises and catch criminals. They have to set the rules, knowing full well that their supervisees will devote great creativity in complying with the regs while maximizing their own advantage--exactly what happened in the Financial Crisis.

"Those that survive have a ruthless efficiency about making a buck."

Efficient at Finding Loopholes, Too

Financial institutions, and especially the big banks, complete fiercely to provide services that are complex, expensive and risky. Those that survive have a ruthless efficiency about making a buck. In the unforgetable words of Matt Taibbi's Goldman Sachs smack down, it's "a great vampire squid wrapped around the face of humanity, relentlessly jamming it's blood funnel into anything that smells like money".

The sequence of the Great Recession went something like this:

Step 1: Financial institutions pitch sketchy financial transactions, (CDOs, payment-in-kind mortgages, liar loans), to willing if guillible clients.

Step 2: Housing prices balloon and deflate as individuals forecast that housing prices will continue to rise because they have been rising.

Step 3: Financial institutions have to actually hold the dubious securities they were expecting to palm off on naive muppets. AIG has to provide actual capital to back up the insane credit insurance risk it underwrote. As a result, banks, mortgage companies, insurance companies and brokerages face collapse.

Step 4: The government knows the financial system is vital, so the banks, insurance companies, (and even automakers) become recipient of government bailout, without much gratitude to an enraged public.

Bonus: SEC fails to spot the Bernard Madoff Ponzi scheme.

What astounds me about this story is that aside from Madoff, only Angelo Mozilo and Fabrice Tourre seem to have done anything wrong personally. All those insider trading convictions don't count, as they have nothing to do with the Financial Crisis. The Financial Crisis was a disaster, but most of what happened was also legal.

"Finance is a kind of technology."

"The dominant role of the US in the global financial system gives us a huge advantage."

"There will be future crises, but the odds for coping with them are better in the US."

Source of Competitive Strength

I was a bank analyst on Wall Street during the crisis and heard the rationalizations and self-deceptions at investor conferences with my own ears. Despite witnessing the meltdown at up close, I see the financial system as a source of strength. There are three reason why:

First, the United States has dealt effectively with crises. We had severe inflation in the US in the 1970's, now largely forgotten. The Ford administration's responded with the pathetic Whip Inflation Now campaign. Then came Paul Volcker, the beginning of a series of capable leaders at the Fed. Inflation, the S&L crisis, the Internet bubble and the Great Recession have been problems we've steered through. The dominant role of the US in the global financial system gives us a huge advantage and the Fed extraordinary power. Even Forbes agrees Chairman Bernanke used that power to pitch us out of a jam. History warns there will be future crises, but the odds for coping with them are better in the US.

Second, the crisis itself has burned out the excesses leading up to 2008. Balance sheets are stronger and the unsustainable leading practices associated with mortgage loans are over. Bad things happened and plenty of homeowners are stuck in houses with minimal equity, but at least the destructive waves of foreclosures and falling housing prices have abated.

Third, the United States financial system is a global leader in efficiently providing access to credit and capital. Finance is a kind of technology, an area of strength in the US. I came to this point of view both from my experience on Wall Street, but also having worked with financial institutions at McKinsey and working in the credit card business at Bank of America. I looked to the World Economic Forum for data on the G7 countries and the BRICS to test my hypothesis. Here is what I found:

Ranking of G7 and BRIC Financial Systems

Avail- ableAfford- ableEquity Financ- ingAccess to LoansVenture CapitalBank Sound- nessRegulation of ExchangesLegal RightsAverage

Source: World Economic Forum Global Competitiveness Report 2013-2014

"The US financial system is among the best at getting capital to business opportunities and doing so at low cost."

"The Eurozone, and especially Italy, are weaker than one might have expected and are actually weaker than they look"

I've highlighted the surprises in yellow.

Taken as a whole, the US financial system is among the best at getting capital to business opportunities and doing so at low cost. US banks place about the middle for soundness, but this seems a bit unfair. According to the World Bank, US banks have highest capital/assets of the eleven and twice that of banks in Canada, France, Germany, Italy and Japan. Capital/assets is an important measure of a bank's ability to absorb losses, which in turn helps stabilize the US economy.

Canada has an excellent system, as does the UK except for the lamentable strength of its banks. UK banks suffered heavily during the crisis. They were lightly capitalized then and still are today. As of 2012, their capital/assets was the lowest of the eleven at 5%, vs 11.8% for the United States.

The Eurozone, and especially Italy, are weaker than than one might have expected and are actually weaker than they look: The Eurozone Crisis exposed how difficult it is for the European Central Bank to respond to a panic when there was fear the that members might have to abandon the Euro. The shock waves of fear about Portugal's biggest lender illustrate the story isn't over.

China has particularly good availability of loans and venture capital. These could be seen as signs of strength or just of loose credit. But just as the Eurozone is weaker than it looks because of its poitical fragmentation, China is stronger than it looks because it's effectiveness in taking concerted action. Further, the survey shortchanges Chinese banks. In a Bloomberg tally of the world's 20 strongest banks, 5 are in Canada, 3 are Chinese and 2 are in the US. None are in Japan, the Eurozone or the other BRICs. On the other hand, China loses points for its lack of transparency.

The US financial system is despised but effective: it's had failures, but on balance it works. There are plenty who disagree, ranging from Elizabeth Warren to Rick Perry, (for different reasons, of course). If you're a skeptic you might want to be skeptical about the bull market, too.

"...opportunity sometimes looks like something that's wrong that could be fixed."

Bullish on the US Because of...Healthcare?

Americans spent 17.2% of GDP on healthcare in 2011, while Canada and Western European countries spent 9-12%. Despite what you'd assume, we didn't get better care. T.R. Reid is a reporter for the Washington Post with a bad shoulder. He's written an enlightening little book called The Healing of America. He took his bum shoulder to healthcare systems around the world to see how they would treat him and how it can be that we pay so much for the treatment we receive.

Some point to our exceptionally well compensated doctors and our clunky approach to medical malpractice. But according to Reid that's not the core of the problem.

"Rather, the major reasons our national health bill is so much higher than any other country's are two things the the United States does differently from every other country: the way we manage health insurance and the complexity of our health care system."

Does viewing our expensive and convoluted healthcare system as a basis for bullishness seem funny? It might, if you fail to recognize that solving the healthcare conundrum addresses economic problems across the board and could catapult our economy, and the market, far beyond current levels. Now that universal healthcare coverage has at least passed the constitutionality test, the table is set to make it efficient.

Universal coverage doesn't imply cheap coverage, you have to make real changes to get that. In the US, it's a big data project to figure out what hospitals are billing to Medicare. In France the prices for each procedure are posted on the wall at the doctor's office and all medical records are stored in a smart card held by each citizen. They have no paper files. US health insurers deny 30% of claims. In France it's zero.

Healthcare costs have in fact fallen since passage of the ACA, but for the wrong reasons. We want sick people to go to the doctor, receive efficient and effective care, be cured and lead productive lives that make the economy grow. What's happened is people are going to the doctor less.

"Healthcare cost is like a tax...which discourages multinational companies from employing workers here."

Why It Matters to Everyone

Both Taiwan and Switzerland had healthcare systems similar to the United States until they converted to their current, efficient forms in 1994--the same year Hillarycare failed to even reach a vote in Congress.

A lot has happened since 1994. China has become a manufacturing powerhouse, while the US share of global manufacturing has dropped from 25% to 17%. Manufacturing drives exports and exports are one component of GDP. Our net exports are cronically negative. Participation in the workplace is crucial for GDP growth. Ours has fallen from 66% in 1994 to 64% today and the BLS projects it to trend downward. We have a growth problem in the US that's tied to our competitiveness. There are interesting ideas on how to restart growth in America, but they often don't help replace those lost in the middle, (or help a lot of voters).

The same trend in manufacturing has affected Europe and especially Japan, but they already have efficient healthcare and so don't have the same opportunity to reduce costs health cost by a third and thereby increase their competitiveness.

The healthcare debate has been about coverage, but the real point is growth. Healthcare cost is like a tax on workers in the United States, which discourages multinational companies from employing workers here which makes everyone in the US worse off. And who have positioned themselves as diehard foes of taxes?

"If Republicans take control...they will have to decide what to do about healthcare."

What Happens Next

The 2016 elections will set up an interesting set of alternatives. One possibility is that the Democrats win, presumably Hillary Clinton. She may be willing to jump back into the healthcare debate, or might be faced with a deadlocked Congress and choose to expend her political capital elsewhere.

The really interesting case is if the Republicans win. In other countries, universal access to healthcare is seen as a right. That consensus has not been reached in the United States; not a single Republican voted for the Affordable Care Act. If the Republicans take control of the Senate this year, and even the White House in 2016, they will have to decide what to do about healthcare. The GOP may continue to try to rescind Obamacare, but it will be hard to campaign on a platform of kicking people off health insurance once they have it, or reinstating denial of coverage for people with pre-existing conditions. A smarter strategy would be to rebrand it, make it efficient and take the credit for what I expect would be a spike in US employment. Ronald Reagan said, "I believe the best social program is a job." Here's a great opportunity to put that idea to work.

We could do what everyone else does, and have the insurer(s) negotiate a single and low price, or we could go the (somewhat improbable sounding) direction of transparent prices and price competition for services, which is completely absent today. Uber for ambulances. As Deng Xiaoping said, "It doesn't matter if a cat is black or white, as long as it catches mice".

The prospect of bringing America's healthcare system up to at least the average level of efficiency and effectiveness of other developed countries is an important reason I'm bullish on the US markets. The path is hard to predict, but the impact could be major.

The Bull Market Bottom Line

The US market isn't cheap, but it's not glaringly expensive either, and I think there are good reasons to be cautiously bullish about the United States as an investment. That being said, I'm not a particular fan of market timing: attempting to time the switch from one market to another or one or between equities and cash.

This might sound funny coming from a guy who turns over 90% of his portfolio each month, but forecasting whether to sell out and hold cash is hard to do and even harder to diversify, violating my second rule of forecasting. I'm not bad at what I do, but I'm only right about 53% of the time. It's crucial to have lots of trials diversify risk. When trying to decide whether to have stocks or cash, you are down to only one.

Instead, I advocate buying stocks a attractive valuations over a naive, passive approach. In the graph above I've shown the distribution of intrinsic value/price for US stocks for this month. The shape you see is typical, with the mode toward the expensive end on the left, and a tail on the cheaper end to the right. I prefer to shop on the right, where the value effect comes into play.

Nevertheless, our core product is a long-only strategy invested in the US, so overall market returns affects the beta-dependent components of our results too.

28 June 2014

5 Rules of Forecasting

"When things are really scary and difficult to predict, we fall back on gut."

We humans are unique in our ability to "travel in time" in our heads, to replay our memories of the past and to imagine the future. Anticipation of the future is a vital survival skill, and we use it smoothly, efficiently and largely automatically.

But that doesn't mean that it's right.

In Daniel Kahneman's brilliant book Thinking, Fast and Slow, he explains that we all have a method of thinking--the Thinking Fast part--that's intuitive and effortless and keeps us out of trouble in routine situations. When faced with new problems, we go into our second mode -- Thinking Slow. Thinking slow takes much more time and effort, so we often seek shortcuts to use fast and easy gut instinct while still convincing ourselves that we've actually done the heavy lifting of thinking it through.

It's one thing to anticipate where to stand to catch a fly ball or sense a discussion will turn into an argument. It's quite another to foresee the Next Big Thing, the twists and turns of the economy or even the trajectory of its doppelgänger, the financial markets. When things are really scary and difficult to predict, we fall back on gut--plus whatever detailed analysis we can find to justify our gut decision.

All investors have to forecast the future. Here are the 5 rules that I've developed to do it most effectively:

"Biases are so common they even have names."

Rule 1: Beware of Bias

One of the biggest pitfalls is backing into the forecast you expected to see by biasing the data. Biases are so common they even have names. You might compound the mistake by overestimating your level of skill (Overconfidence Effect), or by discussing the forecasting process only with people who agree with you (Bandwagon Effect).

In forecasting financial markets, backtesting is especially prone to this problem. Backtesting means using historical data to test how well some theory might work in the future. You know what actually happened, so tend to bias the backtest to get the results you want. The problem is so endemic that the SEC has special rules--and pays special attention--when backtest results are shown to a potential client.

Bias shows up in other contexts, too. An excruciating example is when Karl Rove came to realize on national TV that polling results sponsored by a political party tend to be biased in that party's favor, and not just the other guy's.

"Choosing when to act is a huge advantage."

Rule 2: Pick Your Spots

Forecasting is easier if you have control over when to act. Sometimes this isn't an option and you have to do your best with what you have, as when the Fed and Treasury had to respond to the Financial Crisis in 2008. But the US equities market offers thousands of stocks and ETFs to choose from, so you can decide which forecasts to trust and act accordingly. Choosing when to act is a huge advantage, and shouldn't be given away lightly.

"...it's easier to predict a coin toss than a crapshoot."

Rule 3: Depend on Data

This rule applies both to making the forecast, and to measuring its accuracy. If you don't understand the causal relationships involved, and you rarely do unless you can rely on physical laws or controlled experiments, then you are going to need lots of data. If you are trying to predict an extreme future situation that differs from ones you've seen in the past, you'd better be cautious believing the prediction. Figuratively speaking, it's easier to predict a coin toss than a crapshoot.

Measuring how accurate your forecasts have been in the past in a complete and objective way is the only way to know if your forecasts are useful. If your forecasts are long term, and you don't make very many of them, it will be impossible to determine if they are any good -- or bad. Ruchir Sharma of Morgan Stanley puts it tartly in his book Breakout Nations:

"The old rule of forecasting was to make as many forecasts as possible and publicize the ones you got right. The new rule is to forecast so far into the future that no one will know you got it wrong".

"...for long term forecasts it's often the only realistic choice."

Rule 4: Start with States

Beyond trusting your gut, I suggest that there are two basic steps in forecasting. The first is to determine the state of what you are trying to forecast; the second is to estimate how likely the various outcomes are in that state.

Let's say you look out the window and observe overcast skies and rising winds. You might note that the weather is changeable (the state), and that a thunderstorm is likely (the probability of one of the possible outcomes). You needn't review the fluid dynamics of the atmosphere or the latest national weather map to decide to take an umbrella.

But for more rigor, you will pull out your forecasting Swiss Army knives -- linear regression or naive Bayesian analysis. You might even go further, using clustering to segment customers into "Satisfied" and "Dissatisifed" states, then assessing how those individuals might respond to a price increase or a free gift.

State-based forecasting can be very effective, and for long term forecasts is often the only realistic choice. Investors and advisors are using a version of this approach if they predict long term appreciation of equities based on measures of value such as PE or price to book.

To use this approach, you have to be able to ascertain what state things are in as well as the likelihood of various outcomes. This is easy if the distinctions between states are obvious, but states that are really useful look more like "Satified" or "Dissatisfied", or even "Innocent" or "Guilty". You can't make the call by just asking, so you have to to use other means to infer it.

That isn't so different from what we do when we decide the state of a given stock is "Undervalued", and try to forecast the probability that it will appreciate.

While useful, state-based forecasting is essentially static. It only takes time into account in a vague way. Value investors might label a given stock as undervalued, and that it has been for months or years. Without a way to predict when the valuation will change, they haven't offered actionable guidance. For that refinement, we turn to the last rule.

"...don't try to forecast too far into the future. Stay humble."

Rule 5: Dynamics for Dummies

When forecasting is dynamic, it explicitly factors in time. While more challenging, it generates a better forecast. One approach is to create a comprehensive set of equations that simulate the inner workings of the system you are trying to forecast. Meteorologists do this in weather forecasting, as do the Philadelphia Fed and US Federal Reserve when predicting the evolution of the economy.

Sometimes a simpler approach will suffice, provided you don't try to forecast too far into the future. Stay humble rather than seeking a comprehensive, universal solution. Returning to our weather example, after looking out the window, you check the weather radar, for a front coming through and estimate when it might reach your house. You wouldn't use this approach to forecast next week's weather, but you might do fine predicting the next hour or two.

"The acid test for a forecast is its accuracy."

The Rules in Action

We follow these rules when we forecast stock prices and build our portfolio. We use a state-based approach to find stocks with intrinsic value, and then make a dynamic forecast within this segment. We keep the time horizon short--about 1 month--so the dynamic forecast is effective. We use objective criteria to select our portfolio and measure our performance. Although we follow over 1000 stocks, we pick our spots and invest in the 10-20 where we have both confidence in the forecast and the opportunity is greatest.

The acid test of a forecast is it's accuracy. You can see our results here.