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

Kumite'

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.