Skip to content

A deterministic, ACID-compliant Primary Market Book Building Engine capable of handling concurrent bidding, dynamic price discovery, and auditable pro-rata allocation.

License

Notifications You must be signed in to change notification settings

Rakeshks7/The-Syndicate-IPO-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

The Syndicate: Primary Market Book Building Engine

Python License Status Architecture

โšก Overview

The Syndicate is a backend simulation of an IPO (Initial Public Offering) Book Building System. It solves the critical engineering challenges of high-frequency financial markets: Fairness, Determinism, and Auditability.

Unlike standard e-commerce systems, an IPO engine cannot rely on "eventual consistency." It requires strict ACID compliance to ensure that when a Qualified Institutional Buyer (QIB) bids for $10M worth of shares, the allocation logic is mathematically reproducible and legally defensible.

๐Ÿ— Architecture

  • Database: SQLite (Strict Mode) using SQLAlchemy ORM for atomic transactions.
  • Logic Engine: Deterministic Python algorithms for Price Discovery and Pro-Rata Allocation.
  • Audit Module: A dedicated system that mathematically "replays" the logic to explain rejection or allocation to investors.

๐Ÿš€ Key Features

  1. Dynamic Price Bands: Validates bids against the regulatory High/Low band.
  2. Real-Time Discovery: Calculates the "Cut-off Price" based on demand vs. supply.
  3. Pro-Rata Algorithm: Handles oversubscription (e.g., 50x demand) by calculating fractional allocation factors.
  4. Audit Logs: Explains exactly why a bid was rejected (e.g., "Bid Price < Cut-off").

๐Ÿ› ๏ธ Installation

  1. Clone the repository

    git clone [https://github.com/yourusername/The-Syndicate-IPO-Engine.git](https://github.com/yourusername/The-Syndicate-IPO-Engine.git)
    cd The-Syndicate-IPO-Engine
  2. Create a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt

๐Ÿ’ป Usage (Simulation)

Run the main.py file to spin up an IPO for "TECH_AI", simulate a rush of 1,000 random investors, and perform the allocation.

python main.py

## ๐Ÿ“œ License
Distributed under the MIT License. See LICENSE for more information.

## โš ๏ธ Disclaimer
This software is a simulation intended for educational and engineering demonstration purposes only. It is not a licensed financial trading platform and should not be used for actual monetary transactions or regulatory compliance without significant modification and legal review.

About

A deterministic, ACID-compliant Primary Market Book Building Engine capable of handling concurrent bidding, dynamic price discovery, and auditable pro-rata allocation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages