Skip to content
View thecatfix's full-sized avatar
💬
Will reply if u direct mention me on GitHub or Twitter/X.
💬
Will reply if u direct mention me on GitHub or Twitter/X.

Sponsoring

@withastro

Highlights

  • Pro

Block or report thecatfix

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
thecatfix/README.md

Let me start by making one thing absolutely clear: I'm not a developer.

If you see a pull request from me, it was probably a mistake, OR I figured something out and you just stumbled upon someone who really wants to contribute. More than likely, it will be the former rather than the latter.
Github blows my mind because of its wealth of incredible resources and the vibrant community it hosts.
I clone, fork and paste code into my experiments in order to learn.

Here are my Gists

Gists Home Page

What Am I learning:

All Things Google Cloud

Python

Decision Science, Artificial Intelligence and Machine Learning

My Story

A stroke of serendipity brought me into the orbit of pioneering minds at ING and Katana Labs, where I played a key role in selling their state-of-the-art intellectual property that identified bond pair trades that were dislocated and would revert to their mean spread difference.

Identifying Less Obvious Highly Correlated Pair Trades

If you're unfamiliar with pair trades or bonds, here's an example using Walmart (WMT) and Costco (COST) in the stock market. Both companies excel at selling products but have different business models. Costco sells in bulk and requires a membership, while Walmart has numerous stores and sells individual items. Their stock prices are highly correlated and usually move together.

Now, imagine Costco starts doing exceptionally well, and people flock to shop there. Their stock price surges, but Walmart's stock price remains relatively unchanged. This scenario is known as a "dislocation," where the stock prices of the two companies no longer move in tandem as they typically do.

A trader or money manager would notice this anomaly and think, "Costco and Walmart are usually priced similarly. Something unusual must be happening." They might decide to "short" Walmart (bet that its stock will go down) and "long" Costco (bet that its stock will go up). This strategy is known as a "pair trade."

The concept is that eventually, Costco and Walmart's stock prices will "revert to the mean," returning to their usual correlated movement. If Costco's stock price decreases and Walmart's increases, the trader or money manager profits from their pair trade.

Now, let's apply this concept to the fixed income market. Walmart and Costco might each have 20 or more active bonds. The correlation metrics for their bonds differ slightly from those for their stock prices due to different factors. Attributes such as industry, currency, and issuer rating remain consistent. While pair trades for highly correlated issuers are well known, Katana has solved the challenge of identifying less well-known highly correlated bond pairs that are predicted to revert to the mean with high confidence.

How Does It Work?

Good question! When I first acquired the technology, I would have told you, "I have no idea, but these invoices from Google Cloud are not cheap!"

The technology was developed by a multidisciplinary team of experts in quantitative modeling, machine learning, distributed systems engineering, and financial markets trading. The team included a PhD in Astrophysics, a PhD in Statistics from Oxford University with post-doctoral research in next-generation sequencing data analysis, a 10-year veteran cloud systems engineer, and the former Global Head of Credit Trading at ING Bank with 20 years of financial markets experience. They had a unique combination of quantitative skills, machine learning expertise, distributed systems engineering, and deep domain knowledge that refined an intricate architecture pivotal in pinpointing mean-reverting fixed income pair trades. In my opinion, they developed an ETL tool that was ahead of its time for the fixed income market. Of course, I am very biased because I own the technology, but this is all I have worked on for a long period of time. Trust me, your Excel spreadsheet or Power BI tool cannot do this. This is data engineering, and I can only try to understand. The data pipelines utilize a scalable, distributed processing framework with Apache Beam to analyze vast amounts of bond reference and pricing data. The algorithm employs the Cartesian product to exhaustively compare each bond with every other bond, identifying highly correlated pairs. A neural network was then used to forecast pairs with the highest probability of mean reversion. The service went to market in early 2020 (worst luck ever!) and delivered some very profitable pair trade ideas for the early adopters of the product.

What is the Tech Stack?

I have been trying to come up with a good acronym, but if you can think of one, let me know. Here are the key components:

  • Languages and Frameworks: Go, Node.js, JavaScript, TypeScript, React, Python
  • Databases: PostgresDB
  • Hosting and Authentication: Firebase
  • Cloud Platform: Google Cloud Platform (GCP)
  • Data Processing: Apache Beam
  • API: GraphQL for connecting to Bloomberg Terminal and App Store
  • GCP Services: Cloud Functions, BigQuery, GCP data storage, and more, totaling about 25 services
  • Bonus: Frontend includes an application on the Bloomberg App Store

What Have I Been Doing with the Product?

I've been focusing on cutting costs without touching a line of code by identifying which cloud services can be turned off and which need to be retained for a minimal architecture. Imagine my surprise when I discovered Terraform and then found Terraform files scattered throughout our mono-repo! I've had to dive into the deep end to control costs effectively. I am immersed in the complexities of pair trading strategies, data engineering (ETL, ELT, Big Data… you name it), and cloud-based platforms. I'm always actively exploring a range of technologies to deepen my understanding of what I own and how to make it more cost-efficient. My learning curve has been steep, and I currently consider myself a student. I've been gaining knowledge from The University of Texas, where I completed the Cloud Computing program and am currently enrolled in the Full Stack Development program. It might not be the formal McCombs School of Business, but it's damn good.

What Now?

My plan for the future is to leverage all that I've learned to build a product and business plan suited for the market. While Katana was originally designed for fixed income, I'm discovering that it has many more potential use cases.

'It’s down there somewhere, let me take another look,'

Posts From The Soggy Blog

Pinned Loading

  1. ultimatecheatsheet ultimatecheatsheet Public

    Forked from Fechin/reference

    ⭕ Share quick reference cheat sheet for developers.

    EJS

  2. thecatfix.github.io thecatfix.github.io Public

    An interwebs page hosted and published through GitHub http://thecatfix.github.io/

    SCSS 1

  3. Gist from Drafts Gist from Drafts
    1
    # Obtaining a List of Books from Amazon and Audible to Import into Goodreads
    2
    
                  
    3
    ## Problem:
    4
    You need a comprehensive list of all the books you have purchased from Amazon or Audible and want to import this list into Goodreads as a CSV file.
    5
    
                  
  4. freetools freetools Public

    Forked from ripienaar/free-for-dev

    A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev

    HTML 1

  5. amazonbookscrape.js amazonbookscrape.js
    1
    // See https://gist.github.com/thecatfix/60ba97638e223ccafe1a141852bafbee
    2
    
                  
    3
    // Select all elements with the class "book_info-title"
    4
    var titleElements = document.querySelectorAll('div[id^="book_info-title"]');
    5