Photo by Christopher Burns on Unsplash

Dear friends, long time no see. Hope you’re safe and healthy. :) Over the past several months we kept ours heads down on developing new features for ccapi. It is a C++ library (with bindings generated for other languages such as Python) designed and coded from scratch with a heavy focus on performance. There has been an increasing usage of the library to execute arbitrage strategies where opportunities are ephemeral and more-often-than-not the winner takes all. Therefore in the next couple of articles, we plan to discuss and highlight some of the features and improvements recently added to the library…


Photo by toine G on Unsplash

High-frequency trading, also known as HFT, is a method of trading that uses powerful computer programs to transact a large number of orders in fractions of a second. It uses complex algorithms to analyze multiple markets and execute orders based on market conditions. Typically, the traders with the fastest execution speeds are more profitable than traders with slower execution speeds.

This short article is focused on performance tuning of HFT programs and is tailored for an audience of retail programmatic traders. The techniques mentioned below are broadly applicable to any programs that touch C++ in one way or another. We…


Photo by Hitesh Choudhary on Unsplash

Cheers! In order to better serve retail and professional traders in the crypto community, we have worked very hard in the past few months on creating a Python API for our users, and we’ve finally completed this mission 🎉: https://github.com/crypto-chassis/ccapi. In this process we conducted extensive research trying to figure out the “best” approach. Finally we picked the same methodology as Bloomberg used to create their Python bindings for their C++ API: using Simplified Wrapper and Interface Generator (SWIG). One major advantage of SWIG is that by using a nearly identical interface file it is able to generate bindings for…


Photo by David Marcu on Unsplash

In the previous post, we had a thorough discussion on the challenges of and the solutions to backtesting market making strategies in high frequency trading (HFT). The demonstrational simulation run was performed on a pure market making strategy. We deliberately chose a bad day for Bitcoin throughout which its market price continuously dropped. By the end of the post, we saw that the performance of such a plain and simple strategy was disappointing in the context of a trending market due to adverse selection. In this post, we’ll present an interesting idea that aims at not only solving the adverse…


Photo by Jamie Hagan on Unsplash

In one of our previous posts entitled “Hammer Test Your Backtesting”, we provided an in-depth discussion on some technique called stratified sampling and demonstrated its use with a vivid example using backtrader framework. Leaving the territory of medium-to-low frequency trading, today we’ll climb up the mountains of high frequency trading (HFT) strategies. In this post, we will only focus our challenge on one particular type of HFT: market making. Backtrader framework was established to handle backtesting of medium-to-low frequency trading strategies relying on traditional OHLC datasets. For HFT market making backtesting, the problem becomes much more difficult (see https://quant.stackexchange.com/questions/38781/backtesting-market-making-strategy-or-microstructure-strategy). Because…


Photo by Pablo García Saldaña on Unsplash

In many quantitative finance studies and research, the correct assignment of trades as buyer-initiated or seller-initiated is paramount. Historically when this information was not available, traders devoted large amounts of time and effort trying to infer trade directions from tick data. The most classical work was Inferring Trade Direction from Intraday Data by Lee and Ready. For modern crypto exchanges, information regarding trade directions is available to any traders for free: we are such a lucky generation! However, we’ve noticed that this information was largely ignored by the crypto trading community: there are very few articles mentioning about it or…


Photo by Dorothea OLDANI on Unsplash

About 15 years ago when I started to experiment with quantitative trading for the very first time, there was always this big question mark floating in my mind: the backtested algorithm does work for historical data, but what is my confidence that this algorithm is going to work with real money? I believe that all of us had similar thoughts in the past when we were junior traders. It’s a healthy mentality for a trade to hold some skepticism towards a backtested strategy. More often than not, we can find people presenting their meticulously-crafted strategy which leads to a 40X…


Photo by Jeswin Thomas on Unsplash

Modern portfolio theory (MPT) is a mathematical framework for constructing a portfolio of assets such that the expected return is maximized for a given level of risk (or the risk is minimized for a given level of expected return). It is a formalization of the idea that investment diversification, i.e. owning different kinds of financial assets, is less risky than owning only one type. The model was first introduced by economist Harry Markowitz who was later awarded the Nobel Prize in Economics for this work.

Since on the internet there are already a plethora of materials about MPT and its…


Photo by Jeswin Thomas on Unsplash

In the past several posts¹ ² ³, we have focused our discussions on the order execution side of crypto tradings. From this post on, we will step back a little bit and put our attentions on the data science aspect of crypto tradings. The topics that we will cover in this series will be quite diverse, ranging from statistics to optimization, back-test to forward-test, low frequency data to high frequency data, etc. The purpose of these quantitative focused posts is to fill in the gaps on the internet found during our research and study: these are things that we encountered…


Photo by Adam Nowakowski on Unsplash

Every now and then we hear people talking about the ideas and practices of making cross exchange arbitrages in the world of cryptocurrency trading. Thanks to their inherent nature of decentralization, cryptocurrencies are traded by people on hundreds of exchanges all over the world 24/7. Democratization of crypto trading has brought the possibility and opportunity for retail traders to operate in a similar manner to professional ones. Running cross exchange arbitrage in the crypto world turns out to be very different from running it in the stock market world: very different in a good sense. In the stock market world…

Crypto Chassis

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store