Dr. Codd Was Right

Despite what the reactionaries assert, the world is not flat nor is it hierarchical. The world is relational.
Similarly, how many tweets for that bag of carrots?

You have enemies? Good. That means you've stood up for something, sometime in your life. -- Victor Hugo/1845

... but Flash-based storage has such a different performance profile from rotating media, that I suspect that it will end up having a large impact on filesystem design. Right now, most filesystems tend to be designed with the latencies of rotating media in mind.-- Linus Torvalds/2007

I believe quite strongly that, if you think about the issue at the appropriate level of abstraction, you're inexorably led to the position that databases must be relational.-- Chris Date/2009

I want to vault every ORM into the heart of the sun or, preferably, go back in time and smash all the computers responsible for their genesis. It's 2015, let's wake the fuck up to the power of SQL and our relational systems.-- Rob Conery/2015

About

Shameless Plug

I know a little something about SQL, DB2 (preferably LUW, z/OS if the money's right), Oracle, SQL Server, Postgres, and database design in general. Mentoring/teaching/consulting on a short term basis, too. And a bit of stat analysis if it's R.gnuoytr at rcn dot com.

01 March 2015

While this endeavor set out, initially, with the single purpose of eviscerating all the anti-RM heathen in sight, over time the knucklehead finance quants have provided more opportunity. They're just dumber and more active, on the whole.

So, here we go again. In essays past, I've made the point that being the globe's reserve currency, aka New Gold, has certain consequences. One of those is the need to run trade deficits with the rest of the globe in order keep a growing supply of moolah available. Without such, the global economy slips into deflation, as was the case through the end of the 19th century when all worshiped Old Gold. Part and parcel of this monetary regime has been the surge in the USofA's reliance on banksters for employment and GDP. Neither aspect of being the New Gold is necessarily beneficial to the USofA or the rest of the globe. Two more pieces today on point.

According to a compelling new paper published two weeks ago by the Bank for International Settlements, high-growth financial sectors actually hurt the broader economy by dragging down overall growth and curbing productivity.

As screamed from these pages: you can either make things, or suck off the teats of those that do. Banksters are suckers. Morgenson doesn't quite close the loop of logic by asserting that bankster salaries and profits necessarily come out of cash flows in the real economy. But close.

The paper is titled "Why Does Financial Sector Growth Crowd Out Real Economic Growth?" and it builds on past research that found that overall productivity gains were dragged down in economies with rapidly growing financial industries.

Recall, even recently, the observation that using quant methods in human activities is fraught with peril, since, unlike with nature and God's laws, some humans get to change the rules to suit themselves at the expense of others?

Also questioning the dominance of finance in our society is Luigi Zingales, professor of entrepreneurship and finance at the University of Chicago Booth School of Business. In his 2012 book, "A Capitalism for the People," he wrote that the financial sector, "thanks to its resources and cleverness, has increasingly been able to rig the rules to its own advantage."

And that from a Freshwater university, where the rightwing reigns supreme!

Morgenson ends with:

Ideally, finance should propel an economy by helping create jobs and wealth for a broad portion of the population. But clearly, there's a point when finance sucks too much oxygen out of the room, leaving the rest of us gasping for air.

Bigger, in finance, it seems, is not better.

Next up, the rightwing's favorite whipping boy, The Fed.

America's New Gold is run by the Federal Reserve (sort of, but that's a longer story), and Adam Davidson tells the backstory. He starts with the San Francisco earthquake that motivated the creation of the Fed. Lots of gold physically moving all over the place. One point that is too often never mentioned, but Davidson does, is the nature of 19th USofA economy:

There were [bank] runs, and dozens of financial institutions failed in what was the country's worst financial panic to that point -- which is saying quite a bit, because the country had weathered major financial crises every generation since its founding.

Social Darwinism is really the nature of American Exceptionalism, historically. Not something to be proud of, in fact. But all those Montana militia guys think it's still them and their squirrel guns. Sigh.

So, what happens when a country's currency is the globe's reserve currency? Among other things, it becomes the safe refuge if there's an economic hiccup anywhere. The resulting tsunami of currencies into The Buck causes its value to rise. And then what happens?

The modern dollar was born because Americans wanted control over their own economic destiny. But now the rest of the world is at our whims.

And when that "whim" is self-preservation of the USofA, the externalities, the econ set calls it, can bite the innocent.

In 2011 and 2012, with its "quantitative easing" program, the Fed created tens of billions of new dollars each month. Enough of those dollars flowed to Turkey that the economy there grew by around 9 percent for two years. "That's China levels," [Inan Demir, chief economist of Turkey's Finansbank] pointed out. In 2013, when Ben Bernanke, then the Fed chairman, announced that the Fed would stop making all those new dollars, the Turkish stock market fell by a third and hundreds of thousands of Turks lost their jobs. The story is similar in South Africa, Hungary, Indonesia, Brazil, Lebanon and many other emerging markets, where economic policy makers and corporate executives anxiously await Yellen's every word.

Much the same thing happened in the race to the Great Recession in Spain, where Germans in particular, shifted large amounts of moolah into seaside residential real estate. Then, they didn't. Oops.

These days Yellen and the Fed, it seems, are out to force the string to straighten up and do its duty to the economy. The idea behind QE was always to incentivize the Job Creators to make real investment and Creat Jobs by lowering the cost of capital to the point where just sitting on it made the opportunity cost so horrible that not Creating Jobs wasn't sensible any more. Still hasn't happened, on the whole. Corporations, and the .1%, are sitting on trillions of dollars, hoping for a depression and the resulting deflation. If some Palin is in the White House, they'll get to keep their winnings; Palin-lite won't re-set The Buck to diminish the windfall. We'll be the New Ireland. I can't wait. The force is inflation. Sitting on moolah when there's no inflation in the economy (even, some months, outright deflation) waiting for The Big One to drop in your lap follows the incentive. On the other hand, if there is material level of inflation, the incentive is to use the moolah in real physical investment to earn something. So far, the Masters of the World have not been able to find such investments. The crux of the matter is: have the MoW been obstinate, or have we reached the point in our understanding of the Newtonian world that new and better stuff just isn't out there? Did all that moolah go to real estate not because the MoW were infinitely risk averse, but because they just couldn't find anything better to do with the moolah? For once, having the MoW quaking in their boots is actually the better reason.

Davidson ends up with some musing on finance, Newton, Heisenberg, and the Great Recession. Then he spoils it all,

The financial crisis came about because people believed they were in a world of risk -- where the chance of default on mortgages and more complex derivatives can be plotted with great precision -- when instead there was deep uncertainty afoot.

Wrong, wrong, wrong. They could be plotted, and were, by those not beholden on the scam. All one had to do was look at the median house price to median income ratio to see that deceit was afoot; the end game wasn't the least bit uncertain, but foreordained. But both the perps and the business press chose to be blind. The former because they were raking in the moolah, and the latter because they wanted continued access to the perps for stories.

27 February 2015

There's something of an open secret in the financial quant world: it just doesn't work any better than passive investing. Every now and again yet more data appears to bolster that truth. Today's comes in James B. Stewart's column. A mother lode of quotes; enough to last a year.

But, here's the punchline:

Large investors are still pouring money into hedge funds. They added $1 billion during January and more than $88 billion in 2014, according to data compiled by the investment consultancy eVestment. Total hedge fund assets are now over $3 trillion.

Where's the punch?

Even as their high fees have minted scores of new billionaires, hedge funds have now substantially underperformed a simple blend of index funds -- 60 percent stocks and 40 percent bonds -- for three-, five- and 10-year periods. And the 10-year numbers cover the period of the financial crisis and the sharp decline in stocks -- the very calamity that hedge funds are supposed to protect against.

That last bit is the loony bit.

For those too bludgeoned by the remorseless drum beating from these here parts to go off and read the whole thing, just some of the high points.

"There's no money in being against hedge funds," [Simon Lack, founder of the financial consultancy SL Advisors and author of "The Hedge Fund Mirage"] said. "If you're a consultant and say, 'Put it in Vanguard,' they won't need you anymore."

Kind of the same sort of notion of web sites paid for by adverts: in the web site case, the client is not the user of the site but the various advert pushers; in the hedge fund case, it's the funds who are the real client.

Others I spoke to cited data suggesting that hedge funds have a lower standard deviation, a measure of risk, and higher risk-adjusted returns than stocks. But Mr. Lack warned that such data is necessarily backward-looking and does not account for the larger amounts of capital now invested in hedge funds. When he wrote his book in 2012, "I said hedge funds were overcapitalized and returns would go down, which is exactly what has happened," he said. "The best funds know this, which is why they're closed to new investors."

As always, the only way to avoid significant loss is to exit before that last straw lands on the camel's back. How to recognize when the straw is coming in for a landing? (Re)-read your Samuelson. Tidal shifts in moolah movements are what matters to the hedge funds and the pension funds and the .1% wealthy who seek them. (Why did they miss the silly acceleration in house prices, one might ask?) When there's tens or hundreds of billions of dollars in need of a resting place, buying a few thousand shares of a soon-to-skyrocket biotech isn't sufficient.

Simon Lack:

"There's an enormous amount of research that shows hedge fund returns aren't persistent. They revert to the mean. Of all the hedge funds I looked at, only 7 percent were consistently in the top 40 percent. What chance do you have of picking them?"

26 February 2015

The latest place I've seen it is in the preface to The Elements of Statistical Learning, with the caveat that there's no proof Deming actually said it. The problem with Deming is that he was grounded in manufacturing quality control, Shewart control charts and such, where processes obey God's laws. In the human world, data isn't really the issue. Changing behavioral incentives are the issue. We humans, some of us, change the rules/incentives as suit some of us.

If we consider what caused The Great Recession, it's easy to blame The Quants. I've sipped that Flavor Aid some times, alas. Still, one cannot forget The London Whale and his mess. That, beyond question, was a quant going off the reservation. But, what exactly, motivated The Great Recession?

First, and mostly, was the massive increase in availability of funds into US, and Europe lesserly, housing. It's reasonable to ask, why? Did the quants, somehow, fiddle it. The answer is no. After the bursting of the DotCom Bubble, moolah began to pile up, yet again. Corporations' real investment demands just couldn't keep up, at a level of risk holders of the moolah were willing to accept. As usual, they wanted money for nothing (and chicks for free).

The subprime to liar loan spectrum was created by mortgage companies, not commercial banks, built into mortgage backed securities for the purpose of sopping up a tsunami of risk-averse holders of moolah. We see exactly the same motivation with the "Greek Crisis" (Spain is similar): holders of moolah want above market rate of interest at lesser risk. Housing, up until then, had been largely risk free; same with sovereign debt. But, because all the lemmings were headed in the same direction, they all went off a cliff. If they hadn't dragged the rest of the global economy with them, it would have been a minor event. The instruments came not from quants, per se, but from bankers, loosely defined.

Once the instruments came to exist in quantity, then the quants started to move the levers of arbitrage to make their money. Anticipating when the money flows are zigging before anyone else is lucrative. Such an exercise is closer to God's laws, in that the lemmings are blindly following the butt in front of them. With sufficient, accurate, data the quants could see where the plot was going.

Not to mention that folks like Paulson made smart bets, so it seemed, by putting a heavy thumb on the scale.

As some say, you can only sell a bad instrument to someone who is looking the other way. That happened in Florida, the Spanish coast, Ireland, and Greece. There remains trillions of dollars of "savings" looking for a place to sit. A lot of it sits on corporate balance sheets. Ever more of it moved to buy back stock, thus moving moolah from the pockets of 1%ers to pockets of other 1%ers. The right wing bleating about inflation is misdirection. Not all of them are idiots, and know full well that inflation, caused by too much moolah floating around rather than output shortage, happens only when Joe Sixpack has the moolah to spend on stuff. The QE monies, ours and Europe and Japan, have been wholly sent to the financial sector; thus the stock markets have shown impressive capital gain. D'oh!!! But this also means that the following must be true: corporations have about run out of productive ways to turn fiduciary capital into physical capital, at least relative to the supply of fiduciary capital. In other words, there is, by definition, a savings glut. Which deadly sin is gluttony?

Shiller, in a recent piece, had the advice that if one continued to live as a student, then the moolah would pile up and a better life to follow. He ought to know better. We already have, globally, more savings than can be productively used; that's why so much went into non-productive housing. Adding billions or trillions more from whatever letter generation is au courant will only drive down the interest rate more. So, yes by not consuming, your money will pile up. (And by not consuming en masse, we get a Depression, by definition. The 1%, with their hoard of moolah, will be very happy.) But it is only your deferred consumption, not growing by some fat rate of compound interest. That latter is among the ripest chestnuts in the econ/finance lexicon. Up through the beginning of the 20th century, when new bits of science were discovered daily and thus new forms of physical investment could be made to exploit such, the permanency of compound interest in the economy was obvious. But, as we've filled out our knowledge of math and physics and chemistry and biology, we're like that old paradox: "how long does it take to get to that wall if you step half-way each step?" The answer, of course, is forever. But the paradox also means that each step of progress is of diminishing size. Don't assume that the second, or millionth, step is as great as the first.

23 February 2015

Now, this isn't DB2 and R, but Netezza (aka, tweaked Postgres), but still. IBM appears to get it. Too bad they didn't ship me much moolah for guiding them to the obvious. Oh well.

PureData System for Analytics introduced the next level of analytics by running analytical functions inside the database, which simplified the overall development process and allowed more people to use the analytical functions and benefit from it.

20 February 2015

One of the differences, if not the motivating difference, between micro-quants and macro-quants is the maximization function. That last bit is econo-quant speak for "what's the source, amount, and purpose of profit"? For the micro folks, it's just as much as the laws allow for my client company. For the macro folks, it's a bit murkier. Generally, macro refers to the sovereign, but could also be a region, continent or planet. The max function for the macro folks is "benefit to everyone" in the sphere. So, in many places water supply is held communally through local or regional government, and price is set to balance household, farm, and industrial/commercial demands. We see the conflict going on in the western states in these days of drought.

What with ACA and baby boomers and the poor banging on the door of health care, there's a particularly nasty example of the conflict betwixt the micro and macro quants. The guy's name is Martin Shkreli. If you plug that name into your favorite search vehicle, you'll get a long history of his activities. The short version: a one-time hedge analyst who creates "pharma" companies with the sole purpose of buying up old, little used drugs (generally from the sole provider) and raising the price a whopping amount. Doesn't do anything else with the drug.

He got kicked out of the first one he started, and with his current one, attempted to take an old Bayer drug and move it from $100 to $100,000, according to reports. Today, comes another piece on the effort. Bayer, seeing that they'd been ignoring free money, bumped the price themselves, although not so much.

If there were a "free market" in pharma, with bans on patents, what would happen? R&D would fall to governments entirely; as things stand now, governments and academia do far more R&D than the general public is aware. In fact, there is growing controversy over the practice of universities claiming patent incomes on the R&D they do, especially that which is funded in part or whole by the Damn Gummint.

What Shkreli is attempting is simple: if my company makes a life saving drug, patients owe my company the rest of that patient's life earnings. After all, without that drug there would be no life. Ah the twin myths of democracy and civilization; enough of us remain Cro Magnon. Ayn would be so proud.

19 February 2015

As mentioned here more than once (I'll leave gentle reader to dig out the articles), the notion that Apple Watch would be some sort of groundbreaking health-o-meter have gone up the pipe. This is just one of many precis` of a WSJ story that's behind a paywall. Nevertheless

Apple's original concept for the Apple Watch was one that would track blood pressure, heart activity, stress levels and other functions, the Wall Street Journal reported Monday, citing sources familiar with the device. But none of those features will make it into the final product due to a variety of issues, according to the Journal. Some features didn't work properly. Others proved too complex. And some would have required regulatory approval.

As described in these musings, health functions are measured *under* the wrist where all the plumbing is close to the surface. You do recall that the nurse takes your pulse there, not on top? And that, for most people, the watch is worn on top? It was silly from the get go. Well, unless Apple could harangue God into moving sense points around to suit The Watch.