TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do HFT systems store position and order data?

1 点作者 robinrheem将近 5 年前
HFT systems are really sensitive in latency. Which means it can't actually use traditional databases like MySQL, PostgreSQL, or etc. But then, how do we actually persist order and position data that the algorithms make? Would we just print it in the screen like application logs? I'm not sure that will be viable since logs can actually get lost. Maybe write on local files as CSV or HDF5? And perhaps make a cron or something to read those files and persist it into somewhere else? Or is there a solution that runs in memory but persists to disk?

1 comment

pnako将近 5 年前
The hot path involves the network card, the CPU, RAM and nothing else. The trading algorithm will keep various data structures in memory to keep track of current position and position limits.<p>Outside of the hot path&#x2F;thread, you can do pretty much whatever you want. You typically broadcast your trades on the network for other systems to pick them (and put that data into SQL databases, typically). The databases used for risk and compliance, etc. will most likely get their data directly from the exchange.<p>The idea is that you don&#x27;t need to query a central system for every single trade you want to make. HFT systems have some limits set up at the beginning of the trading session, telling they can take a position of up to X in security Y.
评论 #23507523 未加载