Hacker Newsnew | past | comments | ask | show | jobs | submit | idispatch's commentslogin

I counted the word “sound” in this reply 8 times. When I the word sound there is always the word Rust nearby. It is just a coincidence, of course.


Related video for those who are interested: “When Nanoseconds Matter: Ultrafast Trading Systems in C++ - David Gross - CppCon 2024” https://youtu.be/sX2nF1fW7kI?si=komqKuZ0-eOH2v4V

This is basics for those who start creating anything HFT.

Your project is a nice start. It has a lot of things waiting to be added and improved. I’d also add it looks like a 1-2 week project (excluding benchmarks) in my company for people who just started doing trading systems, and it reminds me of the project that is given to people that have finished C++ training and need something to exercise on.

While it is a good start, I’d add you may find a lot of interesting ideas in QuantLib (https://www.quantlib.org/).

Please also be careful with double for price and quantity especially in HFT and especially with asset types like BTC. The precision issues may lead to some confusion and eventual losses here and there. I noticed that you use fuzzy floating point comparisons, even in tests. That may not be suitable for important use cases.

Please also add some examples for specific trading strategies. Let’s say if you have back testing and some simple historic data in JSON a good example could be a comparison of two trading strategies and the difference compared to most optimal trading strategy possible.


Appreciate your interest.

Yea, there is lot to be added, that's by design. I'm not aiming for one-pass toy, this is foundational infra, not a weekend simulator.

FP numbers wrapper are planned. Sharing strategies is not a priority, maybe I will add some just for demo. And for sure I'm not sharing backtesting engine.

Goal to build infra - not give away alpha.


On that angle - I like the project structure, overall, CMake use and documentation. It was helpful to understand, high level, before diving into code.

I also recall the discussion here related to fast associative containers, like unordered map/set. This is the implementation - https://github.com/martinus/unordered_dense

Combined with HFT CppCon talk that emphasizes the impact of node-based STL containers you may benefit from using some optimized hash maps on top of vectors, if you aim at top-performance in runtime. Also, abseil has some flat sets/maps implementation. All of this could be a nice addition if you experiment with performance (I figured that from std::pmr use in your project).


100% agreed, stl containers should be replaced. The problem here is that I'd like to keep the core dependency-free... However, functionality first, squeeze maximum later. I'll definitely give a try for non-stl containers and if measurements beat - make the usage of container implementation controllable by compilation options, keeping things configurable as much as possible.

Thank you for your ideas and advice! Great and valuable feedback


Classic masterpiece, for those who experienced it in 1990s and wanted to know how it was done: https://github.com/mtuomi/SecondReality


I remember being blown away by Second Reality! Thanks for the trip down memory lane! ;]


Sooner or later there will inevitably appear a new language, or an evolution of the current Rust, which will be significantly better than Rust and not just a minor tweak to the language we know today . Let’s say it is named Rust++ (any resemblance to existing languages is a pure coincidence). And the whole hype and rewrite starts over again… it is just a matter of time.


It is called human language, if current AI expectations turn out true, eventually there won't be a need to use current languages as intermediary step.


Human language is a poor medium for concise and clear communication.


Might be, yet that is the future our AI overlords want to bring us into, and already present in ongoing agents attempts.


It looks like you professionally sold 30 years of your life for money with no fun. You could have done something for fun all this time, and got payed for it, too. Much better that way.


I did no such thing, I spent the first 15 years as a part time fitness instructor mostly for the social aspect, hanging out with friends and training for and doing group runs and a little travel.

I spent the next 8 years married (still married) and raising two step sons and spent the last two and half years traveling extensively including over a year doing the “digital nomad thing”.

We have been averaging getting on a plane to do something on average over a dozen times a year since late 2021.

Of course the Covid lockdown slowed us down for two years.

When I am at home in Florida, I go swimming at one of the multiple pools or workout at one of the two gyms that’s part of our complex. It’s warm enough most of the year at least during the day.

During the weekends, I go downstairs and hang out at the bar and just sip soda while hanging out with my friend the bartender and whoever else is down there.

I “retired my wife” in 2020 when I was 46 and she was 44 8 years into my marriage so she could pursue her passion projects and we could pick up and travel as often as we wanted to - the joys of working remotely.


Great for you. You are almost certainly not the type of candidate these companies are looking for.


And VSCode will still be around.


Atom is not around. Not 100 percent sure that VSCode will be around. (But I also don’t think that this should hold anyone back who finds VSCode to fit their needs best. There’ll be something else that will take its place.)


Just as Sublime Text is still around :-)


Looks like a unipost in a uniblog


Unicycle: A digital document or data stream in Unicode with no distinct beginning or end, allowing for continuous looping.


It made me raise my unibrow


This is plainly not true


To be more precise, to e.


Mind you, before this goes to prod please add error handling and logging. What happens when bar fails? What about baz? Now, please rewrite this so your team mates can maintain and extend. Yawn, I’ll wait for the PR.


Gotcha, thanks for the feedback! We should also totally A/B test this! I'll make sure that this ties in with the quarterly OKRs, too! I hope I'll get promoted to E6 for that sweet 10% raise next cycle :fingers_crossed:


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: