Why decentralized?

Because this is how the future looks like, the power will be taken from imagined-organizations and put back into the hands of individuals.

Why meta-learning?

There are two problems in the world, not enough information and too much information. The first one was solved…

Ruby library for Deribit API

I just want to introduce the new open-source Ruby library for Deribit API. Here is a short intro, for more information please check the source code repo and documentation. Installation gem install deribit-api Successfully installed deribit-api-0.1.2 1 gem installed Usage require 'deribit-api' client = Deribit::Client.new Get last 3 option trades via HTTP API: trades = client.trades 'options', count: 3 trades.first.instrument BTC-10MAY19-5500-P Stream ongoing trades via Websocket API: [Read More]

From Jekyll to Hugo

Blog migration

Since nobody wants to embrace the dark side of Wordpress anymore, the easiest way (that I knew of) to bootstrap a personal website was Jekyll and Netlify. I am a huge advocate of getting things done fast, no fluff, just real stuff and this is what I did, but quite soon I realized that static Jekyll is not enough anymore and I needed to find new home. Well, the old/new kid in town is called Hugo and works like a charm with GitLab Pages, they even have a project template for it. [Read More]

Cryptography: ECDSA

Overview "If you can't explain it simply, you don't understand it well enough" Albert Einstein Elliptic curve cryptography (ECC) and digital signature algorithm (ECDSA) are more complex than RSA or ElGamal but I will try my best to hide the hairy math and the implementation details. Here is the ELI5 version in 18 lines of SageMath / Python code. I use Sage because it provides elliptic curves as first-class citizens (`FiniteField` and `EllipticCurve`) and we can take multiplication operation for granted. [Read More]

Cryptography: ElGamal

Overview "If you can't explain it simply, you don't understand it well enough" Albert Einstein ElGamal is a public key cryptosystem that is used in encryption , digital signature and homomorphic cryptography. Here is my take in 12 lines of Python code: 1 p = 7 2 g = [x for x in range(1, p) if len(set([x**i % p for i in range(1, p)])) == p-1][0] 3 k = 4 4 t = g**k % p 5 m = 6 6 import random 7 r = random. [Read More]

Cryptography: RSA

Overview "If you can't explain it simply, you don't understand it well enough" Albert Einstein RSA (Rivest-Shamir-Adleman) needs no introduction, it is well known and most used public-key cryptosystem that governs our digital lives. Here is my take, a simple implementation in 10 lines of Ruby code that is neither the best implementation nor the most efficient one but is enough for the purpose of this article. 1 p = 7 2 q = 11 3 n = p * q 4 phi = (p-1) * (q-1) 5 gcd = ->(a, b) { while(b ! [Read More]

Tradingview indicators: weekly/monthly close

I’ve decided to release a few personal indicators that I use in day by day trading and here is the first one: Weekly/Monthly close. Here is the the source code if you want to dig more into it. It’s a simple support/resistance indicator that overlays last week/month’s close price and can be configured in two modes: tracking mode - to display last week/month’s close as a single price line (1st image) history mode - to display all weekly/monthly history close prices (2nd image) Close prices are great deal to me, especially on higher timeframes and I see the price bouncing off these close lines again and again. [Read More]

Open-sourcing Actihunt project

I’ve decided to open-source an old and rusty project called Actihunt that sits there for more than 3 years. Check it out @ www.actihunt.com The project does one thing and one thing only, it synchronizes activities between Runkeeper and Strava, this is all, and it did its job pretty well in all this time. Bitbucket source code and SemaphoreCI and a few screenshots for the curious minds. Activities index page It shows activities listing for the selected provider where you can ‘Sync’ or view activity details by clicking on ‘Show’, see below. [Read More]

Idiomatic Ruby library for BitMEX API

Fully featured, idiomatic Ruby library for BitMEX API. Support for both REST and Websocket APIs as described in API Overview. Installation gem install bitmex-api Usage Listen for live trades in 3 lines of code: # Importing library... 2.5.3 :001 > require 'bitmex-api' => true # Create client... 2.5.3 :002 > client = Bitmex::Client.new => #<Bitmex::Client:0x00007fae7a569598 @host="www.bitmex.com", @api_key=nil, @api_secret=nil> # Spit out live trades as they happen... 2.5.3 :003 > client. [Read More]

Year 2018 in review

Back to annual review after 8 years, hopefully for real this time with the goods and the bads of 2018: Trading: overall a good year but it could have been better CFDs (Forex & Commodities) account - UPnL: 5% Crypto futures account - RPnL: 440% (aka 4.4x), UPnL: 180% (aka 1.8x) Bitcoin options account - UPnL: 2% Crypto: the come back and I am “all in” this time finally understanding the underlying tech/math/cryptography invested in coins that I love (Bitcoin, Monero, etc) and plan to HODL lots of study/courses and research Technology: a bit of slow down security research study, pen-testing and forensics analysis kick off cryptos-ruby project and bitmex-api, deribit-api REST-API libraries Sports: set back due to multiple injuries :( Running - still recovering after an ankle injury in Sep Walking - did a lot of walking and listen to 10 audio books and lots of podcasts Snowboarding - carving is getting better and better but had a shoulder injury and I still feel a bit of pain Swimming - paused swimming in summer due to shoulder injury, hope to resume soon Travel: mostly business travel Ukraine - winter snowboarding vacation India - spent 6 weeks in Delhi to do knowledge transfer and a few days in Goa USA - 3 weeks in Conshohocken with business matters Business: new horizons Zuppler - stepping down and unwinding responsibilities/work getting ready to start my next gig with all the pros and cons C ya in 2020. [Read More]

Introducing Cryptos-ruby project

I just want to announce the very first release [v0.0.3] of Cryptos-ruby project, a simple and very easy to use Ruby API to manipulate multiple crypto coins. For more information please check Github project page. Features Generate private/public keys Generate Bitcoin/Litecoin addresses (more to come) Create Bitcoin/Litecoin transactions Execute atomic swaps between Bitcoin and Litecoin Installation gem install cryptos Usage # Importing library... 2.5.1 :001 > require 'cryptos' # Generating private key. [Read More]