Trial and Epic Fail

Ventures of an ex indie game developer

Learning Java 8

I just built a small tool for a friend Dala. Dala runs an IT+hosting company and offers different backup solutions to his customers. Every day, he gets an e-mail per backup job. Currently 40-ish e-mails per day from four different backup suppliers.

I've automated the task of processing the e-mails, updating a database and posting a ticket whenever one or more backups goes to shit. This is right now 330 lines of Python code in a single source file (along with a couple of settings files for various e-mail accounts, etc.) Yesterday I was interviewed for a consultancy job where they use modern Java 8, so I'll try and convert whatever hack I have right now into pretty, modern Java using streams, lambdas, spring boot and whatnot and hopefully I'll be up to speed soon enough.

These are the features required:
  • IMAP login and fetch,
  • parse e-mails of various mime encodings, etc.,
  • move e-mails,
  • connect and update an (SQLite) DB,
  • serve a web page showing the latest status of each customer.


I expect this to become in the vicinity of 6 java files and 900 sloc if done "right," while still keeping all the sloppy hard-coding from the original.

First short documentary completed!

I just finished my first short documentary about ufology. It's in Swedish, unfortunately or fortunately depending on your view and language preference.

Om du är svenne så kasta ett getöga:

God's finest


Heard you were called home today. You were one of the finest people I've ever met. I'll be seeing you around.

To leverage or not to leverage

After my utter rekd'age I've gotten some better handle of leverage and market slippage, which can easily be summarized:
Use leverage, but with small amounts. Subdivide a huge chunk of backtesting data into time frames. Backtest each time frame for stability (Sharpe ratio).
I had assumed that stability was mostly relevant for the overall data, but my just optimized parameters show me that it is infinitely better (or say +130% annually) to use stability all the time!


My intuition told me that the blue one would be better (which profits off of the January '18 and November '18 down trends to a higher degree). And well, following the trend is always recommended by oldtimers (who really should know). My intuition may or may not have been right for non-leveraged trade, but when using (cross margin) leverage on BitMEX, you definitely want stability. And when you think about why, it becomes fairly obvious: stability means you can place higher sums in your orders (while still keeping your risk down). Trend following is also only stable as long as the trend continues, and no indicator or investor in the world knows when it starts or ends. Therefore we swing/scalp.

I now feel done with this project, I'll let it sit for a couple of months and see what comes of it. I expect to get 5-10% (which is of little comfort as I just lost 75% in two exceptionally bad mistakes). But if it looks promising, I'll raise my order sizes by 50%, and due to leverage there will be BitMEX blood. If everything goes as planned I'll rewrite the post-mortem and perhaps even make a youtube video about it.

Wim Hof done right

I've started Wim Hoffing and I find it exceptionally effective and fast; already on day one I felt a difference.


Quick'n'dirty is exactly what a westerner wants, without painstaking hours of meditation and mindful walks through the forest. These are my tips for anyone starting out:
  • The breathing part is the important part, at least for me.
  • Breathing exercises are actually tougher that one thinks, but just get them over with.
  • When you "hyperventilate," make sure to breathe sufficiently deep and fast to get to serious tingling in the face after 30 breaths.
  • Best is if you're able to reach tingling in your dental pulp after 30 breaths; then you feel like a million bucks and know for sure you're gonna come away with energy enough for two.
The cold really helps too, but to me it's more of a "booster" compared to the breething, which really is foundational.

Manual labor vs. programming

This is a rarely understood concept by managers in the software industry:



This fact, unfortunately, makes them prone to measuring things that have low correlation with long-term value in the output.

Rekd

Today I lost a ton of my crypto due to a bug in BitMEX's API. Somehow they let on that the price rose above my stoploss, which my bot then had to remove and try to rectify with limit orders. With 3100 disastrous results/USD gone in a couple of minutes.

I placed a ticket with BitMEX but haven't heard from them still after 3.5 hours. From here on, I'm keep the stop loss orders no matter what. And hoping they'll use 'em. Goddamn!

About the author

Mitt foto
Gothenburg, Sweden