2023-06-10 at

Brokerage Engineering : Requirement Specifications

Industry chit chat :

(client side : pen and paper all workflows)

(Server side : ask finance dept what is tolerance for double orders etc. CRM workflows need to be codesigned at this time. How many errors per million opportunities. If error smaller than X, brokerage sucks it up, if larger than Y, CRM process triggers, etc. Standardised risk reporting framework and governance SOP)

Basically all customer orders need to go into a queue.

CRM and UIX has to cover scenario where the queue somehow missed or lost their order. Also when the order fails. All types of orders. Common types, limit, market, stop-limit, blah blah. Depending on brokerage feature surface

Database cannot be multimaster if tolerance for error is too low. Algorithms get complicated if you try to tolerate more error and turn on multimaster. Hence RMD needs their statistical models to be very tight. So if RMD is sane, RMD will ask for single master. Sorry, you can multimaster also ... but then your user has to wait for the masters to sync till consensus

Now all your users get notified when their order goes into queue. It is soft real time, not hard real time. They get notified when order is fulfilled or finally cancelled. Arguably not even real time. Haha

Load testing : Non-trivial. You have to model an entire stock market session. Say even if it's 3 minutes, 10x your current userbase, surge pattern, etc. Your business analysts need to come up with that model. Your techs just need to implement it. Eer not really expensive. Just need BA to have head screwed on right. Otherwise you're testing a fake usage pattern.

I think key requirement specifications will be :

  1. 1. minimum orders-per-second-per asset  ( you can scale-out across assets, but only scale-up per asset) ... 10^(1/2/3/4/5?)
  2. maximum milliseconds-per-order-processed
  3. maximum % errors of orders processed per ( second / minute / hour); triggers circuit breaker which stops trading
  4. maximum $ of errors processed per ( second / minute / hour ) ; triggers breaker

2023-06-09 at

Portfolio Review

 4:19 am. Half a pack of curry ramen. 200g of cheesy tofu. Half-shot highball. My friend is right - I'm basically turning into an old Japanese man.

The dopamine hit makes up for the absence of sensory stimulation. I spent the earlier part of the day helping friends with analytical problems, and sorting documents, mostly analytical work. Cognitive synthesis is thereby enforced via diet. 

In a few hours I must meet my son for coaching on his career. He's not really my son - I just make fun of myself when I say that my staff are my children.

After food, I sit on the balcony and look at the lights from the highway. I just reoriented the cloth chair to face outwards - it's nice to have a bit of a bench to lean on. I wonder why I spend so much time doing social stuff, instead of being a kiasu investor like many of my friends, then I quickly remember that we care about different things, and I am just more fortunate to have easy access to personal happiness - the sort which eludes most people.

2023-06-08 at

A Professional Opinion

Being professional, literally means doing as one says one will do. 

But in practice, the term is cluttered with the hidden expectations of slave. Unfortunately, professionals are often taken to be "people who share our values" ... it has come to mean, "people who do as we do, despite what we all say". This would not be a problem if people spoke their values openly. But in reality, people value one thing, and they speak about other values instead.

Many of my friends value relationships, because they would not know who they are without relationships. I don't value relationships much because I have a view of myself which isn't too dependent on  other people's views.

Ah. Society and its economics ... what a playground.

2023-06-07 at

Social Audit

Meditations on process. Much of the year (off) has passed, and much more threatens to pass very soon ... I am certainly not working as fast as I should be. The main factors of this are social life. For the sake of comprehension, here are what I regard as social distractions :


- dealing with my late mother's estate; dealing with my sisters in relation to this

- dealing with my father and his situation in life


- dealing with relatives on my mother's side who are enthusiastic about meetings for the sake of meetings; helping some furthermore to develop their ideas for small businesses

- dealing with relatives on my father's side who are incapacitated or ignorant about how to organise their welfare; helping to engage with related parties towards solutions


- dealing with colleagues who are under duress, and in need of legal and political support

- dealing with members of my business network who are in need of counsel, in areas where I have some experience; particularly on the governance of industrial relations and retail markets


- dealing with technology and restaurant industry parties who are searching for labour; often not being able to identify what they want exactly

- dealing with neighbours and their ignorance in self-organisation towards governing a 300 MM MYR asset


- dealing with intimate partners who express needs for support

- dealing with potential partners who are shopping themselves around in public markets 


- dealing with partners from past business activities