Recently, I opened another account with a broker as our liquidity provider for FX. So I add the new liquidity provider in my FIX server based on their FIX specifications.
Well, I have a scalping model utlizing the tick TOS, trading 40-50 trades a day. It's a typical scalping model you see around. So we start running the model with the new broker we just got and comparing the performance.
On the end of day 1, we find that the order execution speed has been spectacular.
During day 2, we check the trades realtime and we noticed why this has been happening. The order seems to be ignoring the FIFO to a large extent (not all the time but most of the time) so we run a comparison with the Market Depth data, and we find out that the trades, are filling semi-instant.
I run a small fund and have a small meeting about the results. Without giving them any ideas about the "problem", I called the brokers if there's been problems with the execution platform or the FIX engines, but they have no idea it and they told me they just updated their FIX engine to support FIX 4.4.
In our FIX server, we have a front-end monitoring software that lets us put manual trades for contingency reasons. So enter a few trades manually on a 1 lot and check every message log from top to bottom to find mistakes. But there's no mistakes on our side.
(Still Day 2... we all stayed up late)
While the other staff studied the manual trades and getting all hyped up, I started programming a code that analyzes the fills relative to the Bid/Ask volume.
At the start of Day 3, I finish my code, got it debugged... ran it on the demo FIX server the broker provides... and put in on live with a 1 lot. Basically, it places a limit order @ Bid when short, and limit @ Ask when long (or flat).
The night shift leaves and we explain to him what's going on to the day shift. And told him to wake me up in a few hours while I take nap.
...
So I wake up and take a look at the analysis. There's been over 2000 trades in the log so I code up a few more stuff to see what's going on...
I was still trying to figure out what the bug was but I started getting hypothesis about it. So I get back on the manual platform and start testing ideas.
After a few hours of more trades, I've started narrowing down the reason, but more-so, the tendency of the order.
Basically, the FIX order fore-runs the orders at some times, and with a small lot size. The provider is an ECN, matching orders internally with bank participators. On their proprietary trading software, everything works fine, but when it comes to their newly upgraded FIX execution, things get messed up. Within the FIX execution, what seems to be happening is that they first fill the orders internally and once the internal orders are exhausted they use banks to fill the rest. So:
There's 5 Bids on screen. The top 2 Bids are their internal orders. So at any point, when I place a limit order, I will always fore run, the bottom 3 bidders.
So what I start doing is once I get filled, meaning I will always be on top of the FIFO, I have the computer bid the size equal to the volume below me and vice-versa on limit. This is so that I can always scratch my trades out with the bank orders below me. Once the bids below me move out, I get out with them with a scratching trade or a loss.
The simple Algorithm worked manually so I, code up the simple algo to automate it. I got it coded up quite quickly and I tell my night desk about what the code does and to shut it off once the account goes red (waking me up too). In the meantime, I sleep inside my office, again...
I had a short but a good sleep, and get ready for Day 4. So confirm our edge during my sleep and we have a meeting with my staff. We came to a conclusion that:
1. We should come up with a Market Making model to utilize the edge we have now.
2. Alternate our trade execution algorithm while the edge sustains... meaning creating a switch between the current algo vs. the new.
I had a bunch of short term scalping and arbitrage trading models I kept in archive due to the lack of strong profits to cover costs. So bring them out and start testing them under the new condition. Some of them, were applicable to the edge and some weren't. I ended up with a comfortable number of short term systems to integrate into live mode.
Converting and testing the systems took me full 2 days. I was coding 2/5 of the time and 3/5 of the time waiting for the test results. Once all the systems were integrated into the live trading server, I double / triple checked the execution quality, confirming the differences between hypothetical and live results.
Of course, I haven't gone home yet. So finally, I go home at a regular hour and take a shower. Then sleep in my bed. I would have stayed another day in the office but everyone kept complaining about my hygiene.
For the next few days, I start working on the Algo-trading logic and code. First, I had to quantify and programming a live tracker for the execution quality.
Another important issue is to understand the edge in hand. What I have mentioned is only a hypothesis of what may be causing it. I can't tell the provider about the flaw or they can fix it up so I have to reverse-engineer and test every possibility. The closer I am to the cause, I can alter the logic based on it. The closer I am, I can place the most appropriate risk measures, too.
As a result of seeking the answer, I have an arbitrage between currency pairs. As long as the edge is there, it's a holy grail.
Anyways, this has been an example of what an edge is and what went through for the first few days. No bar charts, technical analysis, or other stuff most people talk about in ET.
If there was a question to this post, the answer would be Bad Hygiene.
Well, I have a scalping model utlizing the tick TOS, trading 40-50 trades a day. It's a typical scalping model you see around. So we start running the model with the new broker we just got and comparing the performance.
On the end of day 1, we find that the order execution speed has been spectacular.
During day 2, we check the trades realtime and we noticed why this has been happening. The order seems to be ignoring the FIFO to a large extent (not all the time but most of the time) so we run a comparison with the Market Depth data, and we find out that the trades, are filling semi-instant.
I run a small fund and have a small meeting about the results. Without giving them any ideas about the "problem", I called the brokers if there's been problems with the execution platform or the FIX engines, but they have no idea it and they told me they just updated their FIX engine to support FIX 4.4.
In our FIX server, we have a front-end monitoring software that lets us put manual trades for contingency reasons. So enter a few trades manually on a 1 lot and check every message log from top to bottom to find mistakes. But there's no mistakes on our side.
(Still Day 2... we all stayed up late)
While the other staff studied the manual trades and getting all hyped up, I started programming a code that analyzes the fills relative to the Bid/Ask volume.
At the start of Day 3, I finish my code, got it debugged... ran it on the demo FIX server the broker provides... and put in on live with a 1 lot. Basically, it places a limit order @ Bid when short, and limit @ Ask when long (or flat).
The night shift leaves and we explain to him what's going on to the day shift. And told him to wake me up in a few hours while I take nap.
...
So I wake up and take a look at the analysis. There's been over 2000 trades in the log so I code up a few more stuff to see what's going on...
I was still trying to figure out what the bug was but I started getting hypothesis about it. So I get back on the manual platform and start testing ideas.
After a few hours of more trades, I've started narrowing down the reason, but more-so, the tendency of the order.
Basically, the FIX order fore-runs the orders at some times, and with a small lot size. The provider is an ECN, matching orders internally with bank participators. On their proprietary trading software, everything works fine, but when it comes to their newly upgraded FIX execution, things get messed up. Within the FIX execution, what seems to be happening is that they first fill the orders internally and once the internal orders are exhausted they use banks to fill the rest. So:
There's 5 Bids on screen. The top 2 Bids are their internal orders. So at any point, when I place a limit order, I will always fore run, the bottom 3 bidders.
So what I start doing is once I get filled, meaning I will always be on top of the FIFO, I have the computer bid the size equal to the volume below me and vice-versa on limit. This is so that I can always scratch my trades out with the bank orders below me. Once the bids below me move out, I get out with them with a scratching trade or a loss.
The simple Algorithm worked manually so I, code up the simple algo to automate it. I got it coded up quite quickly and I tell my night desk about what the code does and to shut it off once the account goes red (waking me up too). In the meantime, I sleep inside my office, again...
I had a short but a good sleep, and get ready for Day 4. So confirm our edge during my sleep and we have a meeting with my staff. We came to a conclusion that:
1. We should come up with a Market Making model to utilize the edge we have now.
2. Alternate our trade execution algorithm while the edge sustains... meaning creating a switch between the current algo vs. the new.
I had a bunch of short term scalping and arbitrage trading models I kept in archive due to the lack of strong profits to cover costs. So bring them out and start testing them under the new condition. Some of them, were applicable to the edge and some weren't. I ended up with a comfortable number of short term systems to integrate into live mode.
Converting and testing the systems took me full 2 days. I was coding 2/5 of the time and 3/5 of the time waiting for the test results. Once all the systems were integrated into the live trading server, I double / triple checked the execution quality, confirming the differences between hypothetical and live results.
Of course, I haven't gone home yet. So finally, I go home at a regular hour and take a shower. Then sleep in my bed. I would have stayed another day in the office but everyone kept complaining about my hygiene.
For the next few days, I start working on the Algo-trading logic and code. First, I had to quantify and programming a live tracker for the execution quality.
Another important issue is to understand the edge in hand. What I have mentioned is only a hypothesis of what may be causing it. I can't tell the provider about the flaw or they can fix it up so I have to reverse-engineer and test every possibility. The closer I am to the cause, I can alter the logic based on it. The closer I am, I can place the most appropriate risk measures, too.
As a result of seeking the answer, I have an arbitrage between currency pairs. As long as the edge is there, it's a holy grail.
Anyways, this has been an example of what an edge is and what went through for the first few days. No bar charts, technical analysis, or other stuff most people talk about in ET.
If there was a question to this post, the answer would be Bad Hygiene.