The Speed Game: Automated Trading Systems in C++ - Carl Cook - Meeting C++ 2016

Поділитися
Вставка

КОМЕНТАРІ • 43

  • @arduinoguru7233
    @arduinoguru7233 11 місяців тому +3

    I watch this couple years ago and here I'm watching it again .

    • @MeetingCPP
      @MeetingCPP  11 місяців тому +2

      You may also want to watch this talk then: ua-cam.com/video/8uAW5FQtcvE/v-deo.html

  • @danielyaacovbilar3537
    @danielyaacovbilar3537 7 років тому +22

    By far the most useful, insightful, practical tricks C++14 talk I have seen in 20 years, on par as specialized domain expert with Scott Myers / Herb Sutter - thank you so much for all this and the pointers (weak vs strong memory model, benchmarks, includeOS) .. you are a great teacher!

    • @colinmaharaj
      @colinmaharaj 7 років тому +7

      Semantic error on your part?, C++14 has been around for 4 years, so 20 years ago I doubt you saw a C++14 talk :)

    • @mapron1
      @mapron1 3 роки тому +5

      @@colinmaharaj That was the best youtube comment I've seen past 30 years of my life!

    • @muhdiversity7409
      @muhdiversity7409 11 місяців тому

      @@mapron1I've been coding in C++23 for the past 17 years and this was the best introduction to it I could have hoped for. My recruiters are so impressed.

  • @shrek22
    @shrek22 7 років тому +34

    if bjarne is the master of the language. this guy is the master of the language in a domain. which causes me to loose sleep and realize I must get better. does anyone else feel this way? he has left no stone unturned. it incredible and lets me know what I'm capable of but man. why does management get paid more than some one like him? with machine learning, a slight shift in intent, this guy could be lethal in upcoming healthcare market shifts with all the data coming on line. please tell me I am over thinking this.

    • @ShalomCraimer
      @ShalomCraimer 7 років тому +11

      Patrick, that's attitude is what drives me to stay up a night and keep learning more (and worries my wife). Grab on to it!
      Just remember that you're watching the fruits of the labor of months or years. So don't let yourself be disheartened by how far ahead someone else is. Start something today. Stick with it if you love it.
      As for machine learning... that's a totally different area of expertise. Writing high-speed code for HFT is almost diametrically opposed to anything that has to do with lots of data. It's about getting the computer to balance on a hair trigger, so that it's the very least amount of time between tick (market data) and trade (order execution). There are monstrous computer (lots of CPUs, lots of RAM) that do nothing for 99.99% of their day. They just need to read a single message every 100 milliseconds. But when the right message comes through, they have to POUNCE on it right away.
      Compare that with machine learning, or data processing of most other types. The focus is about throughput. About how many megabytes can you push through every second. And since they are running on a tighter budget than an HFT, the machines have to be used as much as possible. They can't sit around.
      Well, I'm not sure I'm explaining this properly. But my point is that these are very different, and would require a lot of retraining to switch from one to another :-)

    • @colinmaharaj
      @colinmaharaj 7 років тому

      I spent most of my life in C/C++ and I have always been an optimizing person, now I am into trading and algorithms so I have to get into algo trading.

    • @akarshy
      @akarshy 5 років тому +1

      this guy probably makes a shit ton of money (low 7 figures), I wouldn't worry about his salary compared to management

    • @perfumedsea
      @perfumedsea 3 роки тому +1

      Yes. I once had an interview with some similar quant firm and got rejection. I guess I could be accepted if I had watched his videos and practiced more.

  • @islamabouelata6575
    @islamabouelata6575 3 роки тому +4

    I think that the number one reason why microwave is faster is that the signal travels in a straight line. Fiber is very rarely able to travel anywhere near a straight line over land.

    • @bilinguliar
      @bilinguliar 2 роки тому +1

      Total internal Reflection In Action.

  • @CodersGang
    @CodersGang Місяць тому

    Goated talk! 🔥👏🙏

  • @StewartHenderson
    @StewartHenderson 7 років тому +6

    Awesome video, thanks!

  • @michaelz.1376
    @michaelz.1376 7 років тому +6

    Just wonder what kind of techniques as to kernel tuning that been used in the automated trading system

    • @carlcook8194
      @carlcook8194 7 років тому +18

      Plenty ;) Core isolation, power management, network bypass, interrupt control, etc.

  • @kerwinloukusa
    @kerwinloukusa 2 роки тому

    Super cool talk! Thanks for sharing!

  • @oschvr
    @oschvr 6 років тому +1

    Exceptional talk. Congratulations and greetings from Mexico !

  • @nitinlad6467
    @nitinlad6467 6 років тому +1

    Very good talk. Thanks

  • @BlitzIn4
    @BlitzIn4 4 роки тому +3

    Designing VR headsets faces similar challenges, as Windows & GPU's are designed for throughput, not low latency.

  • @BartoszBielecki
    @BartoszBielecki 7 років тому +2

    I was wondering, slide 30: I assume that the size of the inplace function is basically a buffer for all captures. Why does the "ClassOf64Bytes" need to be captured? It's a local variable created every time someone runs the functor. If that variable would be outiside the function, that's a different story.

    • @carlcook8194
      @carlcook8194 7 років тому +1

      Hi, good catch! Indeed, in this example, ClassOf64Bytes needs to be captured by value rather than locally declared, in order to hit the static assert failure.

    • @sami-pl
      @sami-pl 5 років тому

      Thanks

  • @IllumTheMessage
    @IllumTheMessage 6 років тому +2

    Good talk.

  • @aqg7vy
    @aqg7vy 7 років тому +1

    Slide 4, It's Mike Acton, not Action

    • @carlcook8194
      @carlcook8194 7 років тому +2

      Final Boss Thanks. Yeah, autocorrect. I fixed the slides but the wrong copy was uploaded.

  • @JamesB9782
    @JamesB9782 4 роки тому +1

    Can you suggest a platform for implementing c++ automated trading?

  • @xfreeman86
    @xfreeman86 7 років тому +2

    Do you use any publicly available software tools for measurement? What about static analysis tools for identifying potential speedups?

    • @carlcook8194
      @carlcook8194 7 років тому +6

      Hi John, sometimes I use Intel's vtune, but it hasn't been great for low latency to be honest (at least for me). Just the basic tools such as kcachegrind can be useful for spotting things that are clearly wrong with the callpath. And running strace is of course useful to make sure that system calls are not happening at unexpected times. Regarding static analysis tools, both cppcheck and also clang have been useful, but mainly for catching bugs rather than identification of speedups. Perf's c2c tool looks promising for checking for false sharing, but then again, I try to avoid threading anyway, because of many reasons, but one of them is accidental false sharing! Speaking of perf, I find this really useful for checking the number of cache misses, stalls, etc (this would be one of my favourite tools). I have been meaning to take a look at Intel's "architecture code analyzer", but if it's anything like vtune, I suspect I'll be somewhat disappointed by it.

  • @deathtrick
    @deathtrick 3 роки тому

    Slides link is not opening, does anyone have link to this presentation's pdf or any other source that could teach me about automated systems in c++.

    • @MeetingCPP
      @MeetingCPP  3 роки тому

      Slides are not linked for old talks unfortunately, here is the link: meetingcpp.com/files/mcpp/2016/Carl%20Cook%20-%20The%20Speed%20Game-%20Automated%20trading%20in%20C++.pdf

    • @deathtrick
      @deathtrick 3 роки тому

      @@MeetingCPP Thank you

  • @LukeGlue
    @LukeGlue 7 років тому

    What is the point trying to be made with slide 22?

    • @carlcook8194
      @carlcook8194 7 років тому +3

      Hi, just that lambda functions are often able to be inlined (whereas standard functions may incur an allocation, some copying, and then a function call). In this slide, the lambda (on the right hand side) can be completely inlined, and as such, could result in direct writes to the payload of a network packet (i.e. zero overhead). As a bonus, the caller of the function doesn't really need to care about the how the lambda (it supplies) is used.

    • @richardhickling1905
      @richardhickling1905 7 років тому

      Hi, C++ lambdas are great - well, certainly they are great fun. I think there's a temptation to overuse them that can lead to code that's difficult to read and probably bad in other ways.
      However, one question: clearly lambdas are shorthand - you can do the same thing functionally using a local class with a member function. Do C++'s lambdas offer anything more than can be provided (much more verbosely) via a local class?

    • @saurabhshukla4900
      @saurabhshukla4900 5 років тому +1

      @@richardhickling1905 But here you are not trying to write a readable code you just want it to be as fast as it can.

  • @Cal97g
    @Cal97g 6 років тому +1

    That's not how you say Cache!

  • @MindControlMethod
    @MindControlMethod 7 років тому

    It's not easy to understand his accent :/

    • @carlcook8194
      @carlcook8194 7 років тому +9

      Hi, UA-cam's auto-captioning works really well... give it a try!

    • @wesofx8148
      @wesofx8148 7 років тому +2

      Carl Cook LOL

    • @feraudyh
      @feraudyh 7 років тому +1

      Fair dinkum? I mean, it's not as if he sounds like he's from the back of Bourke. Don't split the dummy, mate!