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

Handling Poison; Messages, I Mean

A poison message, for the uninformed, is a “queued” message that can’t be processed for one technical reason or another.  Doesn’t sound like much of a bother, but due to the way that queues operate, they can muck up the works if left unhandled.

Azure WebJobs does a decent job of handling poison messages out of the box. Basically, you’re given five tries (by default) to process a given message.  If, for instance, the database you’re trying to write to is unreachable or maybe the instructions embodied in an message were somehow malformed then the message would be automagically moved to a “poison” queue for further processing; but only after five failed attempts.  As to any further handling, it’d be up to you.

Continue reading

I Need a [Web]Jobs

Once again, with the new formed buds of spring a-budding, it only natural for a young man’s thoughts turn to . . . WebJobs.  OK, probably not.  But this (not quite young!) man has a good reason to be thinking of such things: I’m giving a WebJobs presentation at Philly Code Camp 2016.1 later today.  The session will be more than a little hands-on, but I also have a smallish deck, with a number of highlights and resource links, that you can download: Batch Processing with Azure WebJobs.

For the uninitiated, WebJobs can be thought of the newish Azure tech that (most usefully!) enables workflow for the modern web.  Think image processing, shopping carts, database administration, Monte Carlo simulations, app “glue,” process control, AI, custom testing, IoT facilitation, site scraping, backups, pipelining, log ingestion and more.  Even better, WebJobs are super-simple.  You can be up and running in minutes, but more importantly, the “hard” stuff rarely takes more than hours.

If you work with the cloud: run, don’t walk.

 

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

NoSQL? With DocumentDB, that ain’t quite true!

The Microsoft folks continue to beaver away in PaaS-land, serving up new Platform as a Service offerings on a seemingly weekly basis.  One of the best of these is the new pay-as-you-go DocumentDB service; a fully managed, highly-scalable NoSQL (JSON) document database service that provides:

  • Schema-free storage of arbitrary JSON documents
  • Automatic indexing that supports complex queries
  • Transaction support with ACID semantics
  • Service-side programmability with JavaScript
  • Write-optimized, SSD-backed and tunable via indexing & consistency
  • Open-source Client SDKs for NET, Node.js, JavaScript and Python (with C++ and Java on the way)

DocumentDB should be thought of as a complement to SQL Server, Table Storage, Blobs, etc.; not a replacement.  It’s a pretty new offering, but even so, there’s a fair amount of related documentation around on the net:

If you’re one of my fellow Neudesic-ies, I’ll be giving an in-depth DPG Presentation on the topic on Friday afternoon, at 1:00PM EST.  Please feel free to download my deck or clone the GitHub repository that contains the DpgDocDbDemo code that I’ll be showing in my talk.