Designing Machine Learning Systems for High Velocity Trading

As one of my works at Mu Sigma Labs, I was part of a research project on the High Velocity Time Series on early 2019. One of the goals was to create a high velocity trading app using Pair Trading. The Requisite terms Long and Short trades Long trades are buying a security. Short is selling a security even when you don’t own it. It generally means that you are borrowing someone’s securities and selling them in the hopes of buying it back for lower cost later and returning it and hence, making a profit. You don’t really have to do it though; exchanges take care of it and let you sell when you don’t own a security. ...

A blue and yellow python wrapped around C++ logo

Python with a Dash of C++: Optimizing Recommendation Serving

Serving recommendation to 200+ millions of users for thousands of candidates with less than 100ms is hard but doing that in Python is harder. Why not add some compiled spice to it to make it faster? Using Cython you can add C++ components to your Python code. Isn’t all machine learning and statistics libraries already written in C and Cython to make them super fast? Yes. But there’s still some optimizations left on the table. I’ll go through how I optimized some of our sampling methods in the recommendation system using C++. ...

Golang's Gopher with tentacles

Go faster with Go: Golang for ML Serving

So the ask is to do 3 Million Predictions per second with as little resources as possible. Thankfully its one of the simpler model of Recommendation systems, Multi Armed Bandit(MAB). Multi Armed bandit usually involves sampling from distribution like Beta Distribution. That’s where the most time is spent. If we can concurrently do as many sampling as we can, we’ll use the resources well. Maximizing Resource utilization is the key to reducing overall resources needed for the model. ...

A BPMN pipeline containing tasks 'fetch data', 'load data & train model', 'approval from owner', 'deploy model' and 'email on failure to fetch data'. All script tasks are python

Showcase: BPMN Pipeline Platform

Business Process Model and Notation (BPMN) is a graphical notation standard for business processes. Think of it as a flowchart for business processes. It is widely used in the industry for modeling business processes. Now, why would you use BPMN for automating / pipelining? We don’t use UML for writing software right? Yes, but BPMN’s adoption for automation and pipelining stemmed from its ability to cater to both technical and non-technical users. Whether orchestrating simple data flows or complex machine learning pipelines, BPMN empowered users to architect automated workflows with ease and flexibility. Moreover, platforms’s support for human-in-the-loop processes addressed a critical gap in conventional pipelining systems, offering robust mechanisms for human validation and approval—a necessity in the realm of machine learning and MLOps where human intervention is often required. ...