30 October 2013

Show Me The Money!

Gentle reader, do you recall what I've been saying about quants, that Giant Pool of Money, and predicting the future? That, even without the various QEs, interest rates would still be falling, since there's less demand for physical capital. And that's because paybacks are getting longer, plant and equipment (especially in anything semi-conductor related) is getting more expensive, and thus monopoly/monopsony becomes the state of the world?

Well, lo and behold, we have today's bit of news, and there's a link to the original EETimes piece.
If we take things back another step, the reality of the semiconductor business is that fabs are expensive to build and maintain. Then they need to be updated every couple of years to the latest technology, or at least new fabs need to be built to stay competitive. If you can't run your fabs more or less at capacity, you start to fall behind on all fronts. If Intel can more than utilize all of their fabrication assets, it's a different story, but that era appears to be coming to a close.

A fab ain't a steel mill, which you can milk for decades. Ah, if only we had the good old days. And some label Buffett a silly old man.

Oh, and the PPI/CPI numbers out this week are benign. All that QE money still ends up with Mr. Market and ABC Corp. trading old, expensive (on a relative basis) debt for cheap debt. And some quants wonder why there's no job creation?

28 October 2013

Obligatory Post Mortem: healthcare.gov

Phil Factor has a piece on Knight Capital, to which I was obliged to comment. The comment closed with a bit of snark (you're surprised?):
I haven't yet found more than vague descriptions of the architecture of healthcare.gov (herein, hc.gov), but I'm willing to bet a quid that it's a labyrinth of xml data streams exploding all across the InnterTubes. If ever there were a case for federated/distributed data, that would be it. Just like kumite', it's always easier to cut corners around the right way to do things. At least in the short term.

At first, and second, blush, about right. It's built as a client heavy, javascript heavy, static application, with JSON and Ajax. JSON, aka almost-xml, and ajax to make an applet-like system. Hmm. Moreover, Ajax (XMLHttpRequest) is still considered dangerous, and I'd be willing to bet that many users' browsers either don't support it (all those IE7/8 XP machines) or have it disabled.

Some pointed to Ruby as the culprit, since jekyll is a Ruby gem, but, ah the detail. jekyll generates the static pages (and a boat load of 'em, it seems), but Ruby on Rails doesn't seem to be in the mix. Thank Codd for small favours.

There are references to CORS, in addition to regular ajax. Add in that SSL/HTTPS must be in use during the personal information transfers... Moreover, some published response testing showed that midwest users had worse response than the northeast and west coast. Differential bandwidth? I vote yes. Moreover, the Wiki has this to say (quoting a 2009 document):
However, since SSL is designed to highlight hidden intermediaries, Akamai has struggled to make secure web pages work with their service, and an attempt to connect to a popular website over HTTPS will often reveal Akamai.
Still an issue?

In pre-launch interviews, the front-end folks bragged about needing just two servers (one active, one backup) rather than 32 (or some other number). Talk about penny wise and pound foolish? A dual Xeon, 384 gig, SSD balls out machine can be had for about $17K at System76. They've dropped nearly $100 million on creating the system? Get real.

The front-end 'open source' code has been closed at GitHub, but there're dozens of postings/articles/rants about the structure. Moreover, the real meat of the system, the backend, is closed contracted code from CGI Federal. That part's interesting: a Canadian beltway bandit that got tossed out of at least one contract in its native country. It appears that said backend resides in some sort of Oracle database.

Which leads to another source of sluggishness: commits. It could be that the hc.gov database has to sync with other agency/state databases. I'd wager that's a lead pipe cinch. So, either two-phase commit twixt the hc.gov database and the foreign databases, or some convoluted COBOL/java transaction management. According to hc.gov runs on Apache server. That's fine for simplistic web sites, but no where near right for, what amounts to being, an OLTP application. WebSphere, IBM or not, or another industrial strength webserver. Since it appears that the backend RDBMS is Oracle, then WebLogic. Kiddie koders need to grow up. Not everything on the web is simple search or "eventual consistency". Yikes.

Ultimately an OLTP application, from a front-end culture that is CMS based, and a database which is MVCC. The former knows from nothing about transactions, and the latter thinks they don't matter (at least, the inexperienced). As a pig singing, it's not so much that the singing is done badly, but that any is done at all.

25 October 2013

Will You Still Feed Me, When I'm 64?

Remember what I've said about policy and data, when they conflict? Policy drives data. Well, here's the prototypical result.

Tell the (technical) truth, lose your job.

24 October 2013


Some recent readings have me musing once again on the notion, "there's many a slip twixt the cup and the lip."

After finishing school, I set out into the world of work, at a time when the USofA was contracting. Not quite so bad as The Great Recession, but pretty close. I ended up mostly in my chosen profession, and got exposed to systems' building and stats-in-the-wild (SPSS). I also found that not all jobs are as time consuming as graduate school, and thus leaving significant number of hours in the day to fill; more or less meaningfully. I sought out forms of physical activity, a welcome change from six years of sitting in class, library, and impromptu study hall.

Off to the Boston Y, next to the Green Line as was my abode at North Station. How about karate? Dave Edwards was teaching a class, so I talked with him about taking his class. He advised me to study with his teacher, George Gonis over in East Boston. George taught (near as I can tell, he's no longer teaching) his branded version of Gojo Ryu, which he first learned from a man in New York City, and later continued with the man's father in the mountains of India. I don't recall ever knowing their names. As fanciful as it sounds, my all too brief (soon after I was off to DC, and Dr. McElhone) tutelage covered the time of one of his trips to India, so I was around when he returned from promotion (a higher level of black belt, but I've long since forgotten what number). Not having a hair on one's body is kind of striking. Unlike olympic swimmers, this process was part of ritual cleansing, not a mode of faster movement.

To complicate matters further, I also found an arts/meditation/foobar workshop in Cambridge, where I found a tai chi teacher, Julian Miller. His brother, Don would be there occasionally. Julian learned from William C.C. Chen, while Don with T.T. Liang, who has since passed on, although I did get to see him perform a double sword form in Boston when he was about 74.

Karate is considered a hard style, while tai chi is the ultimate soft style of eastern martial arts. Kung fu is generally considered in between. Never did do a kung fu, although I've toyed with the idea of aikido. They all teach in two parts: forms and free fighting. In most karates, the latter is called kumite'.

Now, what you see in 99.44% of mixed martial arts, kung fu movies, and the like has little to do with what is taught. More interestingly, the same is true in the kumite' section of tournaments put on by legitimate practitioners. This is particularly true of kicks. And most particularly true of the signature kick of karate (not so much in tai chi), the roundhouse.

Much to my surprise the Wiki has a description, and pretty accurate from my history anyway:
The original method involved bringing up the knee, and then swiftly turning the hip over and snapping the leg outwards from the knee to deliver a strike...

What part of the foot is used varies. When first taught, the instep. But the preceding quote is farther down the page. This is what the opening paragraph says:
A roundhouse kick (also known as swinging kick or a power angle kick but often confused with the round kick) is a kick in which the attacker swings his or her leg around in a semicircular motion, striking with the front of the leg or foot.

The difference in wording is critical. What passes, today, for a roundhouse kick is merely a leg swing. It isn't of much use, as it telegraphs it's intentions like a horny sailor on shore leave. The true roundhouse begins with the knee thrust upward. If you've studied with a veteran, you've been taught that from the knee elevated position, at least two kicks can be completed: a front snap or a roundhouse. Yes, a true roundhouse is a front snap on its side. The front snap extends the energy of the moving glute and thigh through the lower leg to the foot, and thus the target. Whichever part of the body the opponent has left least protected determines how to finish the kick; either the head or the kidneys. Take your choice. If you've studied well enough and long enough, both kicks take the same time to complete. There's no speed advantage to the simpler front snap.

What the hell has this got to do with databases and stats, I can hear from the peanut gallery!!!???

Just this. Folks who should know better de/un-normalize the schema because everybody else says it's for performance. Folks who should know better abuse the assumption of normality (not to mention homoscedasticity) in data without even thinking a second about it. There was a time when "thou shalt not estimate beyond the data" was the First Commandment. Not so much these days. The trigger for this stroll down memory lane were some recent posts.

This on the problem with backtests.
This on joy of honest data analysis.
This on backtests.
(all links posted on R-bloggers; you do spend time there as I suggested?)

It's easier to do a leg swing and call it a roundhouse, but that doesn't mean you should.

22 October 2013

Klein Bottle

When I was in high school, or perhaps even as early as junior high, I discovered geometric topology (algebraic topology is a tad tougher to grok), in the form of various conundra. Prime among equals was the Klein bottle.
... informally, it is a surface (a two-dimensional manifold) in which notions of left and right cannot be consistently defined.

Lawrence Klein, on the other hand, certainly knew left from right. He was, on the whole, of the left.

And, contrary to certain mealy-mouthed economists of late (nudge, nudge; go read recent musings):
"The only satisfactory test of economics is the ability to predict," he wrote.

Pop Quiz

Claaaaaaaaaaaaaaaassssssssssss!!!!!! Listen up!!

From today's newsfeeds, Briefing.com:
08:34 am : [BRIEFING.COM]
September nonfarm payrolls came in at 148K versus the 183K expected by the Briefing.com consensus. Nonfarm private payrolls added 126K against the 183K consensus. The unemployment rate was reported at 7.2% while the Briefing.com consensus expected the rate to hold at 7.3%.

Jimmy, how does the answer get smaller when the numerator got bigger? Jimmy?? Jimmy, you stupid sloth, what's the answer!!!!!!!!!!!!!

21 October 2013

Politically Incorrect

More bloviating on the Nobel choice of economics winners. Today it's one Raj Chetty who argues that "Yes, Economics Is a Science". He's wrong, of course, despite living in a saltwater economics environment with Krugman, et al.
I'm troubled by the sense among skeptics that disagreements about the answers to certain questions suggest that economics is a confused discipline, a fake science whose findings cannot be a useful basis for making policy decisions.

No, what's troubling is that the likes of Fama live in a bubble, often parodied by Maher. And the likes of Chetty don't call bullshit.

And the reason: the data is used to support the a priori policy decisions. Each side hires quant guns to defend it. I don't think Chetty even read his piece before submitting it, because he tells the tale of dueling data over the question whether extending unemployment insurance duration leads to a welfare society of entitlement junkies.
These studies have uniformly found that a 10-week extension in unemployment benefits raises the average amount of time people spend out of work by at most one week. This simple, unassailable finding implies that policy makers can extend unemployment benefits to provide assistance to those out of work without substantially increasing unemployment rates.

Economics isn't a science, it's political economics, as it was called in Adam Smith's (the real one) day, and with good reason. Economics of the sort of Fama, which serves only to defend social Darwinism from protest, was what motivated Smith and those a generation or two on both sides of his life to coin the term Political Economics. They were well aware that the commonweal is different from the benefit to the very upper class, and set about devising an explanation for why the 99% ought to reap more of the benefits of an economy. And they understood that the key was the political process. With autocracy one had monopoly. Which the chicken and which the egg? Flip a coin, because it doesn't matter. Once one abides the other comes along for the ride. Left alone, the monopolist/autocrat would grind the rest into subsistence poverty. The only way to combat this devolution was a set of law which protected the majority from the minority.

If autocracy is the form of "government", then the autocrats, by definition control that which is of value. If monopoly, such as oil fields in third world countries, then the monopolist has to be "protected" from protest by autocracy. Or, who is the NSA protecting?

These days the likes of Fama continue to garner great gelt from the deepest pockets, just as F. Lee Bailey once did. The other issue is data itself: micro data is readily available to corporations/lobbyist/etc. since they have dominion over the process under study. Macro problems, on the other hand, are supplicants to governments (and a few NGOs) for orts of data. Most often this is sample data of shaky provenance. Just read the entirety of a monthly BLS employment report; you'll be in tears.

One of the quite recent indictments of the Fama myth of perfect information, and such, is the cost/price/margin situation with the iPhone 5C/S. If there were rational consumers and perfect information, as the Fama acolytes insist is the way the real world works, then the price difference would reflect the marginal cost difference. According to iSuppli there's a $26 difference, which ends up being a $100 difference in price. In Fama's world, that can't happen. But it does.

Economics will remain not-a-science so long as the mass of economists engage in advocacy to the highest bidder, irregardless.

15 October 2013

Noble Gases

These are the noble gases:
Helium, atomic number 2
Neon, atomic number 10
Argon, atomic number 18
Krypton, atomic number 36
Xenon, atomic number 54
Radon, atomic number 86
A bunch of guys in Stockholm, intellectual number 0

Yes, a bit of spleen regarding the good burghers of StockholmM who decided to award the economics prize to two right wingnuts from Chicago and one rationalist from New Haven. Talk about schizoid? Or, perhaps, they were intimating that sometimes the quant/micro guys are right and sometimes the behaviourist/macro guys are right?

In one sense, I suppose one could make such an argument. The problem is: what's good at the micro/quant level (corporation or hedge fund) is seldom good at the macro level. As Charles Erwin (not Roger Smith, and not what's commonly quoted) infamously said, "...I thought what was good for our country was good for General Motors, and vice versa". Not that there's much semantic difference between the two statements. Turns out, not so much.

The underlying problem of quants versus the world, is that quants engage in gaming a zero sum game for their employers, while the macro folks worry about the greater good. Micro folks, not surprisingly, both deny that value judgments are meaningful and that whole is greater than the sum of the parts. In other words, an economy which produces 1 billionaire is just as good and fair as one which produces 20,000 $50,000 households. Chew on that for a minute.

Fama adds a snarky quote:
Asked in 2010 about those who warned that housing prices would crash, he responded, "Right. For example, Shiller was saying that since 1996."

Sometimes you just want to slap the brat.

A New Coat of Paint

This isn't going to go well. The data make it quite clear that the high-end cellphone market is full up. With countries, outside the Euro in particular, aiming to aggressively control their exchange rate, it is foolish to assume that US/Euro upper-class exist elsewhere in large numbers. One fiat from the Berserkerstan Central Bank, and all that moolah goes poof!

Angela Ahrendts was able convince the well-to-do that a Burberry coat was only good for one season, therefore only the poor had one. The truly conspicuous consumer must have a different one for each season.

From an interview. What is Apple thinking? Can't imagine a worse fit.

Furthermore, we were almost ignoring some of our strongest assets. Our weaving facility in Yorkshire produced the exclusive waterproof gabardine on which the company was founded. Thomas Burberry had created this fabric and the trench coat design for those early military and exploration commissions. The weaving facility was near the Castleford trench coat factory, in the north of England - fortunately, we hadn't resorted to outsourcing in faraway places. What could be better than an authentic heritage brand with a great vertical supply chain? But we weren't investing in it. We weren't optimizing it.

So, Burberry was the best maker of its products? And Apple, et tu? Round nut, square hole.

Burberry used to have just a few basic styles of trench coats: Almost all were beige with the signature check lining, and the differences between them were minor. Now we have more than 300 SKUs, from capes and cropped jackets to the classic Burberry trench in a range of vibrant colors and styles, with everything from mink collars and alligator epaulets to studded leather sleeves.

Somehow, this just isn't going to work for Apple. 300 different iPhones? What, one for each day of the year? Cellphones aren't coats, for crying out loud! Oh, boy.

10 October 2013

When Quants Collide

Apple's decisions regarding the 5C encapsulates nearly all of the micro-economic, macro-economic, and quant issues into one compact ball of dirt. I'm here to 'splain it all. Hopefully, this will help you sleep better as the days go on.

Let's start with the macro view, which boils down to: are there enough folks with moolah out there to buy whatever the XYZ Corp. has to sell? If XYZ aims for the .1%, and understands that there's not much growth there, in terms of bodies as opposed to $$$, then all well and good. XYZ will toddle along pretty much until some global revolution guillotines them all. Rolex comes to mind, and I've documented how they're attempting to grow. Now, for Apple. What does the data say about its market?

In the process of looking for data, delineating the problem, I found this piece from 2008. I'm not aware that I'd seen it before. Reads like something I've written. On point.
"If you aren't gaining ground," Mr. Levy added, "then you look for other ways to pay for consumption, going into debt or, until recently, refinancing your home."

Boy howdy! The article lays out part of the basic premise: that the blue collar middle class wasn't just an appendix to some much larger groups making up that middle class, but a core component. Kill off the core, and you kill off the class. Kill off the middle class, and much of physical production has nowhere to go. (One should ponder the following conundrum: China and India have, among them, two and one-half billion souls, yet choose to export much of their production (direct and indirect, acting as labor overseer for US corporations) to the much smaller USofA. Why do that?) By extension, neither will the higher priced "service" jobs in all of the financial services sectors which can't survive on just the .1%. They need more families getting rich, not rich families getting richer. But, they're just too dumb to see that. The Koch's send boatloads of moolah to the Tea Baggers, and laugh out loud. Money makes the world go round, but it does so by... going around. Suck it all into the .1%, and the carousel stops. Abruptly.

So, the macro point of view isn't good for Apple as a growth company. If anything, the continued concentration of income and wealth bode ill for the likes of Apple. And Apple hasn't released a "new" device in some years. The Apple bulls have to rely on the company vacuuming ever more money out of that high end group of consumers. Assuming that individuals in that group will have more than one of each iThing isn't smart. Apple had iPod, iPhone, iPad. What next? Because without a Next, there is no future.

On to Apple itself, the micro venue. Apple has publicly disdained market share for unit margin for decades. Steve spiked the clone contracts just after he'd warmed up his executive chair upon his return. Market share went from 10% to 3%. Apple computers now account for a tad more than 10% of Apple revenue. There's no chance that computers will be the vehicle for Apple growth. Despite rumblings, that iPad (tablets, generally) will become the New PC doesn't strike me as credible. What has certainly been proven: many, if not most, knucklehead civilians had some version of PC only because their form of amusement was tied to it. As an amusement device, the phablet is fine. Putting a mediocre digital camera in a phone was marketing genius.

The act of making and pricing the 5C is telling. Cook clearly thinks he can party like it's 2009. It isn't. The rise of no contract cellular is very much a problem. At the same time, carriers are pushing early upgrades. What gives? Other than blatant schizophrenia? Well, yes. The no contract phone will be kept for ... ever? That's really the main reason to own one. When I was a kid, one mark of middle class existence was a new car every two or three years. This was before widespread leasing. If your family had real money, you traded in that Olds or Buick every other year for another. Planned obsolescence and conspicuous consumption. Everybody else? Ran the car into the ground, then went to the used car lot (or, my Pappy, the junk yard) for some marginal heap. Apple has been the GM of phones for the last few years, moving sheep to a barely different model ("look, taller tail fins!!!") every year or so. The carriers are caught in the middle. In their heart of hearts, if you remember the post-mortem on Apple's disembowelment of Cingular with iPhone/1, they'd just as soon sell their pipe and be done with it. Will folks JUMP or stand pat? Trite though it may be: the rich get richer and the poor have kids. Apple's market is sustained by adolescents, from well off parents, of course. Get them hooked on iThings while their brains don't fully work. But white, upper middle class parents (Mormons and Hassidim excepted) don't breed like rabbits. Not making new customers.

Now for the quants, financial services division. They can't make up their minds. Some figure Apple is doomed, unless it drops the 5C price (and commits to expanding its market base). Others see it going the Rolex route, with or without the forced upgrade shenanigans. The problem for quants is both having the right data, and using it wisely. The Great Recession happened because 99.44% of them used the wrong data wrongly. Given Apple's historic secrecy, and lack of "new" device type in almost a decade, there just isn't enough grist for that computer mill. Behavioural economics might well be the proper method of analysis. Galbraith summed up the issue: financial genius is a rising market. With the continued QE flooding moolah into the hands of haves, much (most?) ends up chasing equities. A rising market. A number of the amateur financial geniuses that aggregate through R-bloggers have said they've given up and will just ride the tide. And that's the core of the question.

If you're a multi-billion dollar entity, making placement decisions based on event data is just not practical. What to do? Look at some figures and decide where the best arbitrage rests. In the final analysis, for equities more than most other venues, when you've got that much to place, getting ahead of the mass of moolah yields the most capital gain. Buffett is the exception, in that he invests, or so he claims, on long term viability. Thus, physical production, mostly. Market manipulating hedge funds (at least, that's how targeted companies feel) that short specific companies for short term gain are another aberration.

Buy low. Sell high. The American Way. If everybody could do it, we'd all be rich. And we'd all be the same. So we'd all be poor.

Not looking good: In a research report Monday, Jefferies analyst Peter Misek said Apple had cut iPhone 5C build orders to 15 million or 20 million from 30 million because of slow sales.

08 October 2013

What's the German for "Get Stuffed"?

Putting together "Toxic Shock", the Mercedes-Benz ploy slipped my mind. For those who haven't heard: M-B is going down-market (for them) with a model called the CLA. Cheap, but not inexpensive, it turns out.
Apart from whether it's a full-blooded Mercedes, points to consider are whether it's a good car: pleasant overall, satisfying to drive, practical to use, handy to operate. It does not pass those tests.

Will Apple be any more successful? In the medium to long term, of course. Or will Apple do the Rolex thing (forced obsolescence), or the MicroSoft thing (ride out the string)?

This Will Only Hurt for a Second

Damn, that was painful!

I've been putting off upgrading the Postgres, R, PL/R setup. Haven't upgraded Ubuntu, either? Went smoothly last time...

Postgres wasn't so bad; still in the 9.x release. No sweat.

R 3.x had some unresolved differences with 2.x, dll hell in Windoze terms, so that was one reason to wait. But Joe just released a new version of PL/R, so must be time. The latest version of R is 3.0.2, so why not?

The R part isn't too bad, only that you have to build from source. No shared library binaries out there. Follow directions, avoid excessive use.

OK, so now PL/R. Just open the tarball into ./contrib/plr, and
make install

Fails. Can't find the libR.so. But it's there. I can see it. R_HOME is there, and correct (after some fiddling about deciding where to put it this time.) Joe's instruction tips make it all simple. Still nada.

Turns out that ldconfig on Ubuntu has a (or, some) quirks. The purpose is to setup the linker and libraries. PL/R, at build and runtime, needs to find the R shared library. The final step is to call ldconfig as sudo to do that hand waving.

Still nada. Can't find libR.so for the install.

Turns out that ldconfig/Ubuntu wants a directory in /lib. The details are here. And the only way to discover that is to redirect the output from ldconfig to a file. Then, and so far as I can see only then, does one get the console message that it can't stat the directory. Unlike that poster, this did cause a problem.

Back in business. Much as I dislike both MicroSoft and Apple, admin is generally easier. Well, when I didn't have to hack the Registry. Or use Norton Disk Doctor to rebuild part of the FAT. Ah, those were the days.

07 October 2013

The Gumby Phone

Some months ago, I mused that the flip phone will return, once the manufacturers (not Apple, of course) figure out a way to put (O)LED in plastic. Well, more news: LG is about to ship a flex phone. Not a flip phone, yet. But the compactness will win out, in the end.

03 October 2013

Tape From California

Some good news from California.
Elaine Jones showed how her IBM tape storage manufacturing group achieved some serious cost cutting by replacing an expensive ($150K) SAS group license with R to do a number of ETL tasks that are fundamental to the production workflow. Critical tasks such as extracting raw data from DB2, summarizing it, formatting it and loading it into a different DB2 databases that used to take 30 or so SAS programs are now handled by R scripts.

Kind of amazing, considering that IBM dropped a billion bucks, or thereabouts, to get SPSS. SAS and SPSS, passed over for R. Sweet.