{"id":16907270,"url":"https://github.com/keli-wen/matchengine","last_synced_at":"2025-04-05T13:24:47.395Z","repository":{"id":193717025,"uuid":"684466233","full_name":"keli-wen/matchEngine","owner":"keli-wen","description":"The UBI Challenge Works: a simple match engine.","archived":false,"fork":false,"pushed_at":"2024-06-26T15:51:00.000Z","size":260,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T03:35:56.669Z","etag":null,"topics":["cpp","finance"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keli-wen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-29T07:23:03.000Z","updated_at":"2024-07-07T16:27:56.000Z","dependencies_parsed_at":"2023-09-09T16:49:27.163Z","dependency_job_id":"385ba90f-e808-4498-8feb-0daafe4d33b2","html_url":"https://github.com/keli-wen/matchEngine","commit_stats":null,"previous_names":["keli-wen/matchengine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keli-wen%2FmatchEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keli-wen%2FmatchEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keli-wen%2FmatchEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keli-wen%2FmatchEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keli-wen","download_url":"https://codeload.github.com/keli-wen/matchEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247340674,"owners_count":20923300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","finance"],"created_at":"2024-10-13T18:46:47.316Z","updated_at":"2025-04-05T13:24:47.373Z","avatar_url":"https://github.com/keli-wen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UBIQUANT CHALLENGE: MATCH ENGINE\n## TODO\n- [x] Use `mmap` to read the file and test the performance between `mmap` and `read` system call.\n- [ ] Use multi-thread to accelerate the match engine.\n- [ ] Try to design a better network communication framework such as `epoll`.\n\n## Environment Setup\n### Step 0: Clone the Repo\nUse the following command to clone the repo (since we contain the submodule, we need to add `--recursive`)\n```bash\ngit clone --recursive https://github.com/keli-wen/matchEngine.git\n```\n\n### Step 1: Check for CMake\n\n1. Open a terminal window.\n2. Type the following command to check if CMake is installed on your system:\n\n```bash\ncmake --version\n```\n\nIf CMake is installed, you should see the version number in the output. If it's not installed, follow the instructions below to install it.\n\n#### For Ubuntu:\n\n```bash\nsudo apt-get update\nsudo apt-get install -y cmake\n```\n\n#### For macOS:\n\nYou can install CMake using [Homebrew](https://brew.sh/), a package manager for macOS. If you don't have Homebrew installed, you can install it by pasting the following command in your terminal:\n\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\nOnce Homebrew is installed, you can install CMake with the following command:\n\n```bash\nbrew install cmake\n```\n\nNow you have CMake installed on your machine and you're ready to move on to the next step of your environment setup.\n\n### Step 2: Check for Boost\n\n1. Open a terminal window.\n2. To check if Boost is installed on your system, type the following command:\n\n```bash\nwhereis boost\n```\n\nIf Boost is installed, you should see the directory paths to the Boost library. If it's not installed, follow the instructions below to install it.\n\n#### For Ubuntu:\n\n1. Update the package list for the latest version of the repository:\n\n```bash\nsudo apt-get update\n```\n\n2. Install the Boost library:\n\n```bash\nsudo apt-get install -y libboost-all-dev\n```\n\n#### For macOS:\nOnce Homebrew is installed, you can install Boost with the following command:\n\n```bash\nbrew install boost\n```\n\nAfter the installation is complete, verify the installation of Boost by checking its directory paths again:\n\n```bash\nwhereis boost\n```\n\n### Step3: Test the `matchEngine`\nNow that you have set up the environment, you can use the following commands to build this project:\n```bash\nmkdir build\ncd build\ncmake ..\nmake test_order_run # To ensure the environment is set up successfully.\n```\n\nOnce you have built the entire project, you are now ready to run the engine, provided you have the appropriate dataset at hand:\n\n1. **Dataset Preparation**:\n   Begin by executing the script below to create the necessary dataset folder structure:\n   \n   ```bash\n   bash scripts/create_datafolder.sh\n   ```\n\n   This will result in an example dataset tree structure as follows:\n   ```\n   .\n   ├── input_data\n   │   └── 20160202\n   │       ├── alpha\n   │       ├── order_log\n   │       └── prev_trade_info\n   ├── output_data\n   │   ├── pnl_and_position\n   │   └── twap_order\n   └── output_standard\n       ├── pnl_and_position\n       └── twap_order\n   ```\n\n2. **Engine Activation**:\n   Now, navigate to the `build` directory and run the following command to activate `matchEngine`:\n   \n   ```bash\n   cd build\n   make engine_main_run\n   ```\n\n3. **Output Verification**:\n   Lastly, utilize the `check_twap.sh` and `check_pnl.sh` scripts to verify the correctness of the engine output. Here are example commands and their expected output:\n   \n   ```shell\n   $ bash script/check_twap.sh\n   ✅ Files 20160202_3_1 are identical.\n   Pass: 1/1\n\n   $ bash script/check_pnl.sh\n   ✅ Files 20160202_3_1 are identical.\n   Pass: 1/1\n   ```\n\n## Introduction\n...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeli-wen%2Fmatchengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeli-wen%2Fmatchengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeli-wen%2Fmatchengine/lists"}