News for hackers. Stuff that matters.
Re:Launch HN: Realize (YC W22) – Integrate brokerage account... by vmception on Wednesday February 16, 2022 @02:01PM (#30364182)
I've dealt with a lot of these over the last decade, here is my wishlist:

- Multi-legged options trading

- Portfolio Margining (and SPAN) system

- Cross asset and cross portfolio margin management, inherited by Portfolio Margining regulations

most API trading services don't allow access to options contracts, or if they do (such as Tradier), they only have the inferior plebeian Reg-T margin which barely makes any sense. Although most of retail doesn't know the difference so its probably fine for your service.

PM and SPAN margining are similar, but I think PM is easier to calculate one way: just take Reg-T margin requirements and calculate the loss in a +/-15% move (6% for indices), and make that loss the margin requirement. Reg-T margin assumes something closer to a +/-100% move in the underlying asset, which winds up taking up too much capital.

Re:Launch HN: Realize (YC W22) – Integrate brokerage account... by timothygoltser on Wednesday February 16, 2022 @02:42PM (#30364725)
You're right that most retail investors don't pay attention to the specifics of how margin requirements are calculated. To my knowledge, the only brokerage that's readily accessible to retail investors that provides SPAN margining is IB, and relatively few (US) retail investors use them compared to the more mainstream brokerages.

In terms of cross-asset-and-portfolio margin management, it definitely makes more sense to base risk calculations on a broad view of positions rather than the composition of a single portfolio.

I'm slightly out of my depth here; this is an interesting perspective I haven't seen yet, so I'll definitely be doing some more research into the problems you described.

Re:Launch HN: Realize (YC W22) – Integrate brokerage account... by bdkoepke on Thursday February 17, 2022 @12:18AM (#30369776)
None of the retail brokers (including ibkr) do this correctly, although ibkr is probably the best for retail. Their cross-margining for futures options doesn't work (since the options are treated as "securities" and the futures are treated as "commodities", they treat them as segregated accounts).

They do handle multi-legged options trading, and implement SPAN correctly within the futures space. Portfolio Margining is not always correct (they don't implement customer portfolio margin baskets right), and be aware that margin can *and does* change drastically, particularly during financial crisis.

https://www.federalreserve.gov/econres/feds/an-empirical-ana... (p38-45).