{"paper_id":"2309.04259","title":"C++ Design Patterns for Low-latency Applications Including High-frequency Trading","authors":["Paul Bilokon","Burak Gunduz"],"paper_date":"2023-09-08","paper_type":"empirical","paper_url":"https://arxiv.org/pdf/2309.04259v1","page_url":"https://thequant.space/flowcharts/c++-design-patterns-for-low-latency-applications-including-h/","scores":{"empirical_rigor":6,"math_complexity":4.5,"quadrant":"Street Traders"},"proposes":{"status":"available","statement":"The paper proposes three contributions: a Low‑Latency Programming Repository, an optimised market‑neutral statistical arbitrage pairs‑trading strategy, and a C++ implementation of the Disruptor pattern.","quote":"the creation of a Low-Latency Programming Repository, the optimisation of a market-neutral statistical arbitrage pairs trading strategy, and the implementation of the Disruptor pattern in C++.","summary":"This work aims to bridge the existing knowledge gap in the optimisation of latency-critical code, specifically focusing on high-frequency trading (HFT) systems. The research culminates in three main contributions: the creation of a Low-Latency Programming Repository, the optimisation of a…","strategy":null},"assumptions":{"status":"available","items":[{"assumption":"The price spread between correlated assets is mean‑reverting, enabling a market‑neutral strategy.","type":"model","stated":"implied","quote":"By leveraging the mean-reverting nature of price spreads between correlated assets, it provides a market-neutral approach to investment"},{"assumption":"Cointegrated asset pairs exhibit a stationary linear combination, allowing mean‑reversion trading signals.","type":"statistical","stated":"implied","quote":"If Yt and Xt are both non‑stationary but their linear combination, say Zt = Yt −γXt, is stationary, then Yt and Xt are cointegrated."},{"assumption":"Historical daily closing prices from Yahoo! Finance accurately represent the price dynamics of the assets used for cointegration testing.","type":"data","stated":"implied","quote":"The data for this analysis was obtained from Yahoo! Finance containing the relevant adjusted closing prices."}]},"datasets":{"status":"available","items":[{"name":"Adjusted closing prices for Goldman Sachs (GS) and Morgan Stanley (MS)","provider":"Yahoo! Finance","kind":"market-prices","access":"public","period":null,"universe":"Goldman Sachs and Morgan Stanley stocks","quote":"Multiple US equities were tested for cointegration over five year period with daily closing price as the intervals. Goldman Sachs Group Inc (US:GS) and Morgan Stanley (US:MS) showed strong cointegration.","known_id":"yahoo-finance"}],"known":[],"sample":{"start":null,"end":null,"market":null,"asset_class":null,"frequency":null},"data_resolution":"unclear"},"transaction_costs":{"status":"none_found","modeled":"unclear","headline_net_of_costs":null,"detail":null,"quote":null,"source":"none","rule":"R0b","candidates":{"front_matter":"unclear","evidence_card":"no","evidence_card_quoted":false},"meaning":"no cost treatment was found in the passages the extractor read; that is not evidence that costs are not modeled"},"results":{"status":"available","evaluation_type":"trading-pnl","findings":[{"finding":"Reduced branching technique cut average execution time from 7.35 ns to 4.68 ns per iteration, a ~36% speed increase.","kind":"performance","quote":"The conventional branching approach resulted in an average execution time of 7.35 nanoseconds per iteration. In contrast, the reduced branching technique yielded an average time of 4.68 nanoseconds per iteration, marking an approximate speed increase of 36%."},{"finding":"Prefetching improved function speed by ~23.5%, reducing execution time from 8,235,924 ns to 6,301,400 ns.","kind":"performance","quote":"prefetching has improved the execution speed of the WithPrefetch function by approximately 23.5% (8235924 ns for NoPrefetch vs. 6301400 ns for WithPrefetch)."},{"finding":"Cache Warming and Constexpr each delivered roughly 90% latency gains in repository benchmarks.","kind":"performance","quote":"Cache Warming and Constexpr showing the most significant gains at approximately 90% each."},{"finding":"Optimised pairs‑trading algorithm reduced latency by 87.38%, from a mean of 517,559 ns to 65,588 ns.","kind":"performance","quote":"optimised version of the trading algorithm significantly reduced latency by 87.38%, reducing the mean time from 517,559ns to 65,588ns."},{"finding":"Individual techniques contributed: Inlining 21.41%, SIMD 31.28%, Buffer Data Structure 48.58% latency reduction.","kind":"performance","quote":"Techniques like Inlining, SIMD, and Buffer Data Structure individually contributed to latency reduction by 21.41%, 31.28%, and 48.58% respectively."}],"reported_performance":null,"out_of_sample":{"method":"none","headline_out_of_sample":null}},"independent_evidence":{"status":"none_found","supports":[],"contradicts":[],"qualifies":[],"compared_with":26,"citations":{"cited_by_in_corpus":0,"by_independent_authors":0,"how_cited":{"used_as_baseline":0,"uses_method_or_data":0,"extends":0,"discusses_findings":0,"mentions":0,"unclassified":0},"independent_papers":[],"scope":"Citations between papers in this corpus only; citations from outside it are not counted."}},"implementation":{"status":"available","public":false,"code_url":null,"note":"No repository presented by the authors as their own was found in the paper. Absence here is not proof that no code exists."},"replication":{"status":"none_found","card":null,"note":"No replication of this paper has been run by thequant.space yet."},"extraction":{"text_source":"fulltext","model":"openai/gpt-oss-120b","version":1,"extracted_at":"2026-11-14T18:22:19Z"},"provenance":{"claims":"Everything here is what the authors state in the paper. Nothing was re-run or reproduced by the platform.","quotes":"Assumptions, datasets, cost detail and findings were extracted by a language model. Every quote is verbatim paper text. Where an item has `support`, \"full\" means every figure in it appears in the quoted sentences and \"partial\" means a figure is stated elsewhere in the paper; items with a figure found nowhere in the paper were discarded.","datasets_known":"datasets.known lists well-known vendors and public datasets by a stable id, found by a dictionary over the full text where the sentence says the data is used; it is independent of the model and covers only names in the dictionary.","flags":"transaction_costs.modeled, results.evaluation_type and results.out_of_sample.method are platform classifications (structured-decision models); see https://thequant.space/score-guide/#penalty-flags","comparisons":"supports / contradicts / qualifies are a language model's reading of two papers' quoted findings, restricted to closely related papers that share no author. They are pointers to read, not verified replications, and coverage is partial.","implementation":"code_url is a repository the paper itself presents as its own (rule-scored, ambiguous cases judged by a model), checked for liveness when it was recorded."},"docs":"https://thequant.space/agents/"}