Don’t Renko; Wicko!

WickoViewerThere are countless ways to chart price movement (interval or tick-count-based candlesticks, range-bars, Kagi, etc.) but my hands down favorite is Renko. Well, not Renko, per-se, but rather a Renko variant I like to call “Wicko.”  Renkos track fixed price movements irrespective of time, which is super useful if you want to filter out noise.  Unfortunately, a traditional Renko only includes Open and Close prices; not High’s and Low’s.

As to why I bothered to create my own Wicko feed (or to use the QuantConnect term: consolidator), I couldn’t find a single bug-free C# implementation even though I spent something like four hours looking.  There are plenty of contenders, of course—the internet is rife, after all, with iffy code!—but each and every implementation had one or more obvious bugs.  The rounding errors and lack of edge-case handling were the least of it, but the deal-breaker was the marked ignorance of gap handling.

Dare I say, my own implementation handles things beautifully, proved out by a bunch of unit tests.  You can download the source from my GitHub repository.

BTW, the name Renko come from the Japanese term for bricks: renga.  I’ve always liked the notion of laying down bricks on a chart, so that’s another reason to love ’em.

San Diego, Seattle, then Seattle; Oh My!!

TractorTis the season for peregrination, la de dah de dah, de dah, de dah.  For a start I’m off to a fun-filled family reunion in sweltering San Diego (in Ramona, CA, if I’m being particular; to get that gen-u-ine desert during prolonged drought experience!) followed by two back-to-back weeklong internal Microsoft conferences in Seattle.  Yes, the joys of professional development know no bounds, but if that wasn’t enough, I also get to attend a three day team offsite in Baltimore a couple of days after I get back home to Philly.

Anyway, I’m complaining overmuch because for a start (a) I love my family and (b) I’ve heard mention that this time around I get to ride my brother-in-law’s newish 1937 tractor on his “gentleman-farmer” farm, whooping it up and bellowing  my trademark “Yowza” at the top of my lungs as the barely motile beast tops an eye-watering 10mph.  To be sure, life doesn’t get any better!

Continue reading

Koza’s Ant (A Modern Take on the Canonical Genetic Programming Problem)

Koza's Ant EvolverWe’ve all had those less-than-notable-at-the-time yet ultra-significant inflections in our world view that in later days loom large.

I had one of those “moments” in 1993, on an otherwise ordinary fall day when I’d squired my not-yet wife to an unmemorable building on the Northwestern campus, in Chicago.  Marie is a Set and Costume Designer so I have to imagine that we were there for some sort of rehearsal, or maybe a design meeting; something about Orpheus Descending at the Chicago Lyric Opera teases at my memory, although given the remove of 22 years the details have faded.

One thing I vividly remember, though, is reading Steven Levy’s “Artificial Life:  A Report from the Frontier Where Computers Meet Biology;” a book I picked up at the campus bookstore while waiting for Marie to finish whatever she was doing.  She must have been at it for hours because I managed to gulp down something like half of the thickish volume before she emerged from the building.

Continue reading

You’d do better to “Exaggerate the Losses”

A line from Jackson Browne’s excellent song “The Road” keeps running through my head: “You forget about the losses, you exaggerate the wins.”  While often true in life, I’ve found this to be especially true in trading.  Indeed, I’ve only met a mere handful of traders who excel at record keeping.  The irony, of course, is that it’s literally insane to be a trader and do otherwise; sort of like swatting at an overpriced piñata that they keep on moving out of reach.

Continue reading

Squid’s Don’t Have Lids

Human Eye Compared To Squid Eye

Human Eye Compared To Squid Eye

Squids and humans have little in common.  Indeed, our last common ancestor was a small Precambrian “worm” that lived some 750 million years ago; way before the evolution of our camera-like eyes.  Even so, cephalopods use a lens to project an image onto a retina; just like us.  The amazing thing is that the eyes of the vertebrates and cephalopods evolved independently; in very different ways and at very different times.  Scientists have a lovely term for this: Convergent Evolution.  (Note: P.Z. Myers, of Pharyngula fame—and one of my all-time favorite bloggers—has a slightly different take on this which, for the scientifically inclined, makes an interesting read.)

So what does this have to do with trading? A lot, as it turns out. I’ll leave the details for another day but suffice it to say that the majority of trading systems, commercial or otherwise, are incomplete, unusable or simply crap.  One need only look at one of the market leaders, like NinjaTrader or TradeStation, to know this is unquestionably true.  After all, no one gets into trading to sit in front of a console and “trade;” they want to “make money.”  The platforms, however, are all about mechanics but nothing about methodology.  It’s like being asked on the operating table to pick your own anesthetic.  Even worse, the second they put you under you have to somehow manage to wield the knife too.  No sane human would allow such a thing to occur in an operatory, so why do they allow it with their equally vital finances?

So back to squid, there are plenty of trading choices out there, but inasmuch as each and every one is a demonstrable fail, it’s time for a little re-evolution. Hence the squid; who I declare henceforward to be my most favored mascot…

BTW, squids really don’t have eyelids, although the Myopsids (gotta love the name!) do have a sort of cornea which, according to Danna Staaf, “…satisfies all their eye-covering needs…”

I’d Rather Blather Than Talk Sensible Matter

HeadshotInasmuch as this is my very first post, you might expect me to take the opportunity to lay out a cogent well-reasoned plan of action, maybe even the raison d’être for foisting my blather on the world.  I’m not going to do that, though, since the entirety of my plan is to have “no plan.”  With that said, I do hope to start a conversation with a tiny fraction of the population.  My intended audience: those few individuals who are both interested in automated trading and have the wherewithal to design, develop, or otherwise participate in the fabrication of such systems.  I’ll consider this blog to be an outrageous success if it introduces me to a mere handful of them.

To give a quick bio that omits most of the essentials, I was born and remain—for the present—very much alive.  More to the point, I spent a good part of the preceding 12 years writing custom automated trading systems, historical tick-data feeds and repositories, technical-analysis agents, order-management systems and services, and trade visualization tools.  I also wrote six different FIX-protocol trading libraries from scratch.  Then, to cap things off, I ran countless simulations.  By countless, I certainly mean a number in the low millions, although I might be underreporting things by as much as a full order of magnitude.  To put things in perspective, a typical run would iterate five or six ranged parameters against three years of tick and/or bar-level Forex data, using self-tuning genetic programming-based AI frameworks.  The simulations typically ran on four desktop-grade PCs, although in the last year or so I’ve taken to running simulations in the Azure cloud.

Having delivered myself of an exceedingly long mouthful, I’ll have to leave all of the interesting personal bits for another post.  In the meantime, welcome!