What's funny is that everything you would need to figure out this strategy would be taught to you in first 2 years of your CS degree, yet it is so revolutionary. Creazy.
Yes, finance people are just mostly stupid. Most of the work is done by people of other fields and are just hired by them. Smart people will not want to make money when they are 12 tears old. Most of them want to make usefull products like video games or other stuff. Finance is something you do because your forced by your family. Or because you have no idea what to do with live and then selects a easy education wich gets to mutch repect.
what's funny to me is: something that's a federal crime (DDoSing by holding connections hostage with corrupt packets), is a slap on the wrist, and a fine, for the finance bros.
This is crazy that you dive into TCP protocols.... I was not expecting this and wish I knew this when my , non-finance, company was using optimized TCP stacks for other purposes.
In order to effectively pull this off you need to have massive $ in infra, all colo'd at the exchange. We're dealing in microseconds here, and this is not something that anyone at home could have done, even if they had the knowledge. Requires the infra too.
Once I cheeses some API by crafting my entire request in a single packet while other applications where sending 2 or 3 packets. But this is on another level, I did that to save resources in a GPRS network and get priority over the other credit card transactions of the other customers, thus my system would complete transactions faster and give a better sensation for the end user when the CC network was congested.
Cheese strategy = a strategy which focuses on the holes in the system (the cheese) Eg if a broker has a glitch you exploit that glitch for a winning strategy This cheese strategy for trading is based on exploiting TCP in the technical stack (OSi model)
My first job in what would become my career field was the "physical layer monkey" for a large aviation company and OSI was beat into me. That was 20+ years ago. Trading is a new hobby for me so I found this fascinating. Thanks for the quality video :)
It's kind of funny how they are literally exploiting every single layer of the communication stack. Since they have gotten their fiber link and reduced their latency now they have to cheese the communication stack and possibly any other layer of the communication layer to maximize their execution. It's actually quite interesting.
Really enjoyed this. Brought back happy memories of working in Data Comms/Networking in the mid'80's - early '90's. Even though most of my career was in Software Sales, I so enjoyed 'hooking stuff up' from PCs with Modems, LANs using base/broadband/LU6.2 TR, Mainframe connectivity - ICL C03 and IBM SNA 3270 and implementing first versions of Novell Netware (how many disks & manuals?!?), Banyan-Vines, Ungermann-Bass and OS/2.
I traded at a major brokerage with it's own widely used platform. I remember either reading or hearing they used the transport layer to read customer orders before they hit the trading platform
The fact I just got done making my own networking tool where I learned how to craft the IPv4 header, TCP header, etc and validate and manipulate packets and checksums is ironic.
that's a cool thing to do, I also implemented a TCP stack once, it was an upgrade for a embedded POS (point of sale) that was able to only use external COM modems, and I implemented the entire network card driver and the TCP stack, and I used the sodium for cryptography. The entire thing had to fit in 512KB of RAM.
@@monad_tcp Wow that’s impressive I have made drivers before but doing it on emended systems with very limited amount of ram while also having to remake the TCP stack is on another level nice work.
@@onlyms4693 Depends what you mean by documentation. I am working on making a website for it containing documentation on how to use it but if you are talking about documentation on how it’s made I do not.
the patent is just countermeasures. The CME didn't do this for our sake, or to stop them from making money, they did this because it's essentially DDoSing their systems: flooding a system with corrupt tcp packets, in order to hold open connections, is considered abuse of a computer system...except in finance, apparently.
One can, with varied accuracy, determine where stops are with MBO data. This is another reason why order splitting makes sense even for smaller orders.
the father of this type of trading is JAMES SIMONS. he started the medallion fund back in like 1989 i think and has on average made like 55% return EVERY YEAR SINCE THEN....he was really the first successful quant trader with his partner
I am being very picky here, because you gave a great explanation. But the 7 layer OSI model is different to the 5 layer Internet Protocol Suite, aka TCP/IP.
Love the theme. Can you make a video on Ken Griffin and how someone potentially could do what he does? Im in College for Finance and he is an idol. Thanks CJ!
@@chankayau 'cept, with hpc cloud services, anyone can virtually access advanced hardware ...located within close proximity of exchanges, that's an altogether different matter.
Now if I traded like this I am pretty sure JP was hawkish, but less hawkish than expected or answered the questions after the meeting somewhat dovish. Or maybe he was outright hawkish but considering the job numbers it was considered dovish... It would be like being the first to place money in the casino....
Not milliseconds, but tens or hundrends of nanoseconds, which is 10^4~10^5 times less. If by 'normal' you mean discretionary than usually yes, however high-end execution could benefit any kind of trading
Incredibly interesting. This is the intersection of 3 disciplines that I am very active in. Too bad i cant use this knowledge to make myself some money. It does make me wonder how in the world they were crafting this trade with the manipulated packets in the first place? Custom software thats talking to an API?
Does the S.E.C and Federal Register release this type of info right, what would the best place to keep up to date with new regulations/ rules / patents for finance related topics
I think perhaps its not the TCP "messages" that are incomplete, since it is just a packet stream and knows nothing about the contents. Its the FIX messages that are being split over multiple TCP packets, such that any given FIX Buy/Sell message is incomplete. So not the transport layer, but the session layer that is being held up on incomplete messages?
Also seems like little advatnage to be had here. A FIX Buy/Sell message could be only a few hundred bytes and fit into a single TCP packet. The last byte will also take a single TCP packet. Unless these Buy/Sell messages are unusually large for some reason (like trading more complex instruments that need many more parameters or something)?
@@rupertsmith6097 that's really a marginal advantage. Before that becomes useful you have to make sure that 1. Your model is very light-weight, 2. If you're getting info from other location, you transfer it via microwave instead of cable (which 1.5 faster because of cable refraction index) 3. You run your strategy on ASIC, regular computer or even FPGA won't be fast enough. After all of that you may gain maybe extra 100 nanoseconds. It might seem insignificant but if there's someone else who've done 1,2 and 3, but not your trick, then you're going to be faster and you will consume all this HF alpha. It doesn't matter whether you win by an inch or by a mile, winning is winning
I think what is also being exploited is the latency caused by the back and forth messages required to make a single trade. That could represent lots of time (in the microsecond scale).
Why make a patent? Do they want to stop companies from doing this by claiming patent infringement? How would anyone outside of a company know this was happening? Are regulators watching packets go back and forth and checking if they are complete or corrupt?
Hi, great video. I had a suggestion: Can you just use the mic or the way you recorded earlier videos? this was a bit difficult to hear compared to other videos you have put. Thanks!
They copied it from link accelerators when you doing long distance over oceans , reduce acks, and merged the layers further into the app stack, but when half your app code in fpga nic cards, you trading app is the fpga nic card, and you dont want the acknowledge ack back , ie latency times if traditional tcp ip, ping test is a different app stack but a good test
In your analogy, you still mention that the last (non-corrupt) byte gets sent to the corresponding trade order (for instance, to a "bullish trade" for good news). Does that not mean that they would have to wait for the news to decide which trade should go through? So the order would be: wait for news - interpret as bullish or bearish - send last byte to corresponding trade. How would that be faster than *not* having your trade already 99% of the way to the exchange, since you still have to wait for the news? Surely it can't be due to the time difference that it takes to send the prior 9 bytes of info (in your example)? Is that all the edge they need?
I just dont get why an item is allowed to hang out in the stack and is not asked to go to the back of the line. Its like you're grocery shopping you get to the front and just jang out there until the store has a sale and a runner goes fills up a cart and brings it to you in the front of the line. Great video by the way.
Coding Jesus, thanks for the video. Very informative 🎉. I have a question. I have several openings in the quant / hedge fund space recruiting RADIUS specialists. Why do we need such a specialism in quant networks?
This would only be viable if they were to complete or corrupt the message before sending heartbeat to the exchange to maintain the connection, right? As if they were to send heartbeat before completing the message, it would corrupt the heartbeat itself.
Depends on implementation. It's basicly a slow lorris attack on a exchange that apperently did not have a computernerd working for them. It's older then a VIC20 this technique. Also using TCP for exchange is a bit overkill. Just look at the different order types there are and how big a order is in information terms. Think you can fit a order inside just a couple of bytes. I see it more as s business men crying like a baby when they meet a computer nerd. Computer nerds go to jail when they cancel a order, business men do not. And autistic people go to jail for growing there account to astronomic sizes and not taking actual profits.
@@RogerKeulenYeah exactly, the implementation has changed wayy too much for every other exchanges as well. And I don't think we are trying to fit the order in a couple of bytes as the ordering of data is going to matter as well but thinking about you have build a full order knowing what price, quantity and other stuff you are going to send before hand then you can basically send the full order and not send the last couple of bytes.
Can someone please explain how as a normal retail trader with a 5 pip spread on the SP500, how can you make money with a method like this. Firstly, spread would engulf any profit, secondly, the news can run the market either way, so assuming you have a tool to read the comments the ability to predict its next direction is almost impossible. I am just asking the question. I can understand if you don't have any spread and you drop millions on a trade, this may well be possible. but, what about the average guy in the street.
Interesting topic! By the way, the content loudness is very silent (On desktop, right-click, Stats for Nerds, Content loudness -17.1dB). It should be above -3 dB to have better audio.
good explanation except I still dont understand how being a few microseconds ahead translates to billions of dollars, which seems like a big oversight.
Neo: What are you trying to tell me - that I can "manifest abundance"? 🙃✨ Morpheus: No Neo, I'm trying to tell you that when you're ready - You won't have to.🧀✨
The rules say something along the lines that you can't send an order without having an intention to trade and i think it applies to partial and corrupted orders
@@CodingJesus Yeah, but I mean you still have to choose one before the move happens. How do you know which way the move will go? Interest rate cut of 0.25%, which way is price going? No one knows.
10:09 not equals sign looks like this ≠ Just FYI. // Figured that for a coder the details matter. Considering you probably use forward slash all day anyways.
What's funny is that everything you would need to figure out this strategy would be taught to you in first 2 years of your CS degree, yet it is so revolutionary. Creazy.
Yes, finance people are just mostly stupid. Most of the work is done by people of other fields and are just hired by them. Smart people will not want to make money when they are 12 tears old. Most of them want to make usefull products like video games or other stuff. Finance is something you do because your forced by your family. Or because you have no idea what to do with live and then selects a easy education wich gets to mutch repect.
Sometimes not even that
I had lessons about networking including the whole TCP/IP and ISO/OSI stack on my high school.
what's funny to me is: something that's a federal crime (DDoSing by holding connections hostage with corrupt packets), is a slap on the wrist, and a fine, for the finance bros.
@@RogerKeulen"usefull things like videogames" 😂😂
@@RogerKeulen calling finance people stupid, yet you state making video games useful 😂. Fucking 🤡. Also, your English is trash.
This is crazy that you dive into TCP protocols.... I was not expecting this and wish I knew this when my , non-finance, company was using optimized TCP stacks for other purposes.
In order to effectively pull this off you need to have massive $ in infra, all colo'd at the exchange. We're dealing in microseconds here, and this is not something that anyone at home could have done, even if they had the knowledge. Requires the infra too.
Once I cheeses some API by crafting my entire request in a single packet while other applications where sending 2 or 3 packets.
But this is on another level, I did that to save resources in a GPRS network and get priority over the other credit card transactions of the other customers, thus my system would complete transactions faster and give a better sensation for the end user when the CC network was congested.
i like ur brain
very smart
amazing video, please do more breakdowns of publicly available defunct strats
Cheese strategy = a strategy which focuses on the holes in the system (the cheese)
Eg if a broker has a glitch you exploit that glitch for a winning strategy
This cheese strategy for trading is based on exploiting TCP in the technical stack (OSi model)
i'm not proficient enough to have implemented this, but it's still valuable in a sense to understand the breadth of Alpha. great vid!
My first job in what would become my career field was the "physical layer monkey" for a large aviation company and OSI was beat into me. That was 20+ years ago. Trading is a new hobby for me so I found this fascinating. Thanks for the quality video :)
Amazing! Thanks for posting. Just subscribed on first ever watch. Very rare for me. 👍🏻
Thanks and welcome
E e 2😅😅@@CodingJesus
It's kind of funny how they are literally exploiting every single layer of the communication stack. Since they have gotten their fiber link and reduced their latency now they have to cheese the communication stack and possibly any other layer of the communication layer to maximize their execution. It's actually quite interesting.
Really enjoyed this. Brought back happy memories of working in Data Comms/Networking in the mid'80's - early '90's. Even though most of my career was in Software Sales, I so enjoyed 'hooking stuff up' from PCs with Modems, LANs using base/broadband/LU6.2 TR, Mainframe connectivity - ICL C03 and IBM SNA 3270 and implementing first versions of Novell Netware (how many disks & manuals?!?), Banyan-Vines, Ungermann-Bass and OS/2.
I traded at a major brokerage with it's own widely used platform. I remember either reading or hearing they used the transport layer to read customer orders before they hit the trading platform
Would love more of this type of content! Great Video!
Patent attorney here. I reviewed the patent and can confirm that coding jesus is the messiah.
The fact I just got done making my own networking tool where I learned how to craft the IPv4 header, TCP header, etc and validate and manipulate packets and checksums is ironic.
that's a cool thing to do, I also implemented a TCP stack once, it was an upgrade for a embedded POS (point of sale) that was able to only use external COM modems, and I implemented the entire network card driver and the TCP stack, and I used the sodium for cryptography. The entire thing had to fit in 512KB of RAM.
@@monad_tcp Wow that’s impressive I have made drivers before but doing it on emended systems with very limited amount of ram while also having to remake the TCP stack is on another level nice work.
Do you have full documentaion of you doing it?
@@onlyms4693 Depends what you mean by documentation. I am working on making a website for it containing documentation on how to use it but if you are talking about documentation on how it’s made I do not.
I have no idea whats going on but I am enjoying this.
this is going to be fucking insane if this video actually does a deep dive on the patent and its implementation.
the patent is just countermeasures.
The CME didn't do this for our sake, or to stop them from making money, they did this because it's essentially DDoSing their systems: flooding a system with corrupt tcp packets, in order to hold open connections, is considered abuse of a computer system...except in finance, apparently.
Thanks for covering these topics which are typically not covered on RUclips
love this content. make a series about explained version of known quant models.
Wow - really demonstrates the tangible value trading shops bring to society!
Really insightful vid...... Please do a vid reviewing the Certificate in Quantitative Finance (CQF) next
This was such a good watch. Feels like its in a very similar vein/spirit of front running but definitely different.
Well explained. Even just listening with headphones fully understood this fascinating innovation.
Thanks for your videos! What you are doing is fantasticly interesting and very educative. Each video is filled with really useful info. Best wishes!
16mins for what could have been explained in 3
Really good explanation. Thanks!
Incredible, thank you for breaking it down so cleanly
It should be clear to anyone who read the paper that the gentleman has not. The applicant of the patent is the CME themselves.
Awesome explanation. Thank you
Just say that your THE economics genius and get over with it. Love you.
Thats a really great explanation!
so simply by this strategy you knows the prices earlier than others and according to the prices you sell or buy to make profit . right?
Mind blowing, now i know why they are always ahead
One can, with varied accuracy, determine where stops are with MBO data. This is another reason why order splitting makes sense even for smaller orders.
Nice video, I am curious how you heard about it in the first place. Any website you recommend?
the greatest trick that quants ever pulled, was convincing the world they are smart
the father of this type of trading is JAMES SIMONS. he started the medallion fund back in like 1989 i think and has on average made like 55% return EVERY YEAR SINCE THEN....he was really the first successful quant trader with his partner
imagine if you go through all the trouble of doing this an then the stock goes in the other direction than you expected on the news
I am being very picky here, because you gave a great explanation. But the 7 layer OSI model is different to the 5 layer Internet Protocol Suite, aka TCP/IP.
Love the theme. Can you make a video on Ken Griffin and how someone potentially could do what he does? Im in College for Finance and he is an idol. Thanks CJ!
You should change your name from coding Jesus to trading Jesus
Quant jesus
Wow, I didn’t realize that HFT is mostly about computer science than math.
not even. it's an arm race of hardware indeed
@@chankayau 'cept, with hpc cloud services, anyone can virtually access advanced hardware ...located within close proximity of exchanges, that's an altogether different matter.
Its 0 math, 100% hacking.
Now if I traded like this I am pretty sure JP was hawkish, but less hawkish than expected or answered the questions after the meeting somewhat dovish. Or maybe he was outright hawkish but considering the job numbers it was considered dovish...
It would be like being the first to place money in the casino....
would love to see more models like this used in Quants
You only able to gain few millisecond so if you do HFT this is a great technic, but 'normal' trading not really count I think.
Not milliseconds, but tens or hundrends of nanoseconds, which is 10^4~10^5 times less. If by 'normal' you mean discretionary than usually yes, however high-end execution could benefit any kind of trading
Damn actually really hyped for this one
How is your comment 14 hours old when the video was uploaded 40 mins ago? Edits? Just curious.
@@40sUphillBothWays the video premiered. So comments were open like 16 hrs before the video actually went live
@@grantmartin2002 Thanks for your reply--means a lot.
Incredibly interesting. This is the intersection of 3 disciplines that I am very active in. Too bad i cant use this knowledge to make myself some money. It does make me wonder how in the world they were crafting this trade with the manipulated packets in the first place? Custom software thats talking to an API?
Excellent explanation, despite the bad drawings.
Does the S.E.C and Federal Register release this type of info right, what would the best place to keep up to date with new regulations/ rules / patents for finance related topics
But you are waiting for the feed which will take time to trigger your buy or sell TCP packet. This case is applicable for only scalping trading.
I think perhaps its not the TCP "messages" that are incomplete, since it is just a packet stream and knows nothing about the contents. Its the FIX messages that are being split over multiple TCP packets, such that any given FIX Buy/Sell message is incomplete. So not the transport layer, but the session layer that is being held up on incomplete messages?
Also seems like little advatnage to be had here. A FIX Buy/Sell message could be only a few hundred bytes and fit into a single TCP packet. The last byte will also take a single TCP packet. Unless these Buy/Sell messages are unusually large for some reason (like trading more complex instruments that need many more parameters or something)?
@@rupertsmith6097 that's really a marginal advantage. Before that becomes useful you have to make sure that 1. Your model is very light-weight, 2. If you're getting info from other location, you transfer it via microwave instead of cable (which 1.5 faster because of cable refraction index) 3. You run your strategy on ASIC, regular computer or even FPGA won't be fast enough. After all of that you may gain maybe extra 100 nanoseconds. It might seem insignificant but if there's someone else who've done 1,2 and 3, but not your trick, then you're going to be faster and you will consume all this HF alpha. It doesn't matter whether you win by an inch or by a mile, winning is winning
"I'm not cheating, I'm cheesing!"
In the first 5 minutes I’m able to understand very clearly what is being said, but I have no idea what we are talking about.
Super interesting! Thank you!
But how does a software track a positive news for a ticker? Is it automatic or with human assistance? Great video by the way. ❤👍👍👍
Nice simple explanation bro
🤝
I think what is also being exploited is the latency caused by the back and forth messages required to make a single trade. That could represent lots of time (in the microsecond scale).
Transparency counts, therefore, DeFi
Great video! Thanks for sharing
Really enjoyed this video - thank you so much. Now I can see how some quants make seven figures.
@codingjesus: Can this concept be scaled down and be profitable for an individual trader?
Where do you find the patents? What’s your process?
Why make a patent? Do they want to stop companies from doing this by claiming patent infringement? How would anyone outside of a company know this was happening? Are regulators watching packets go back and forth and checking if they are complete or corrupt?
Hi, great video. I had a suggestion: Can you just use the mic or the way you recorded earlier videos? this was a bit difficult to hear compared to other videos you have put. Thanks!
They copied it from link accelerators when you doing long distance over oceans , reduce acks, and merged the layers further into the app stack, but when half your app code in fpga nic cards, you trading app is the fpga nic card, and you dont want the acknowledge ack back , ie latency times if traditional tcp ip, ping test is a different app stack but a good test
This is fucking brilliant
Insanely interesting !
opened my eyes, good stuff
Wild that 3 microseconds can have such a difference😵
In your analogy, you still mention that the last (non-corrupt) byte gets sent to the corresponding trade order (for instance, to a "bullish trade" for good news). Does that not mean that they would have to wait for the news to decide which trade should go through? So the order would be: wait for news - interpret as bullish or bearish - send last byte to corresponding trade. How would that be faster than *not* having your trade already 99% of the way to the exchange, since you still have to wait for the news? Surely it can't be due to the time difference that it takes to send the prior 9 bytes of info (in your example)? Is that all the edge they need?
Run a 100 meter race where you begin at the starting line and your opponent is 1 meter away from the finish line.
I think also, this tcp packet has priority over newly sent packets because it was sent before.
I just dont get why an item is allowed to hang out in the stack and is not asked to go to the back of the line.
Its like you're grocery shopping you get to the front and just jang out there until the store has a sale and a runner goes fills up a cart and brings it to you in the front of the line.
Great video by the way.
Coding Jesus, thanks for the video. Very informative 🎉. I have a question. I have several openings in the quant / hedge fund space recruiting RADIUS specialists. Why do we need such a specialism in quant networks?
Coding jesus is cooking! This year we getting that 100k plaque with this one🗣️🗣️🗣️🙏🙏🙏
I think all trades should be randomly be delayed by 3 seconds or more to prevent flash trading.
This would only be viable if they were to complete or corrupt the message before sending heartbeat to the exchange to maintain the connection, right? As if they were to send heartbeat before completing the message, it would corrupt the heartbeat itself.
Depends on implementation. It's basicly a slow lorris attack on a exchange that apperently did not have a computernerd working for them. It's older then a VIC20 this technique. Also using TCP for exchange is a bit overkill. Just look at the different order types there are and how big a order is in information terms. Think you can fit a order inside just a couple of bytes. I see it more as s business men crying like a baby when they meet a computer nerd. Computer nerds go to jail when they cancel a order, business men do not. And autistic people go to jail for growing there account to astronomic sizes and not taking actual profits.
@@RogerKeulenYeah exactly, the implementation has changed wayy too much for every other exchanges as well. And I don't think we are trying to fit the order in a couple of bytes as the ordering of data is going to matter as well but thinking about you have build a full order knowing what price, quantity and other stuff you are going to send before hand then you can basically send the full order and not send the last couple of bytes.
Isn't it allowed on some exchanges? They obviously charge extra for high load on their servers and internet line for so many corrupted messages
im surprised OSI is mentioned in a Quant video =)) it brings back a few decades memory of network theories =)))
Interesting content. Hey any videos on Oil trading analysis strategies
In the mean time, Warren Buffet was just buying
under valued companies...
Thanks for the information :)
What would be the time difference between executing the whole trade instruction vs. the last 1% ?
that was actually awesome
Did they do this strategy in 2018? The patent has publicacion date June 2018
Appreciate your work very cool
A better solution might be to add a delay equal to the amount of time total spent sending the message.
Can someone please explain how as a normal retail trader with a 5 pip spread on the SP500, how can you make money with a method like this. Firstly, spread would engulf any profit, secondly, the news can run the market either way, so assuming you have a tool to read the comments the ability to predict its next direction is almost impossible. I am just asking the question. I can understand if you don't have any spread and you drop millions on a trade, this may well be possible. but, what about the average guy in the street.
Yes
Interesting topic! By the way, the content loudness is very silent (On desktop, right-click, Stats for Nerds, Content loudness -17.1dB). It should be above -3 dB to have better audio.
good explanation except I still dont understand how being a few microseconds ahead translates to billions of dollars, which seems like a big oversight.
well you would buy or sell ahead of everyone else before the market moves, wait for it to move and hedge
Is this the same as adding a 3ms timeout window?
Neo: What are you trying to tell me - that I can "manifest abundance"? 🙃✨
Morpheus: No Neo, I'm trying to tell you that when you're ready - You won't have to.🧀✨
what i don’t get is, wouldn’t the receiving server just drop the incomplete packet after waiting for a few milliseconds?
Can someone explain why the socket wouldn't timeout after waiting?
The rules say something along the lines that you can't send an order without having an intention to trade and i think it applies to partial and corrupted orders
3 to 8 MICROseconds. Do you have a rack on co-location?
Extremely well explained.
Excellent clarity
This is essentially The Sting, right?
My only complaint is that this minute could have been two minites long
This assumes there's some correlation between events and price, which almost never predictable.
Price other goes up or down, front loading playing both sides.
@@CodingJesus Yeah, but I mean you still have to choose one before the move happens. How do you know which way the move will go? Interest rate cut of 0.25%, which way is price going? No one knows.
Why do most quant traders seem phony at best, has he made a penny in market or just enjoying is time at a big firm doing nothing.
10:09 not equals sign looks like this ≠ Just FYI.
// Figured that for a coder the details matter. Considering you probably use forward slash all day anyways.
2:25 pretty sure internet data is not sent on copper wires any more