Stage 4, day 21:
I fixed the issue reported in the last journal entry. I did receive some clarification from the exchange support person. Upon receiving this info, this has generated a click in my head.
While I was waiting for their answer, I started to plan very complex possible solutions to the problem. On receiving the reply, this made me figure out a very simple and elegant solution.
I did put it in place. A second also important issue is that for some reason, some updates are never received. The result of this is false positive since you work with stall and invalid data and this is also contributing to less than optimum execution. There are 3 major techniques for execution: joining, improving and lifting the price.
Joining is done by setting your order price to the best current price. Improving is to set the price one notch above the current best price. Lifting is simply to set your price just 1 notch below the opposite side best price. Of course, if you don't have the correct best prices, you cannot execute those strategies correctly.
For high volume pairs, the situation auto correct itself rapidly but it can stay there for quite some time for low volume pairs. This is one factor why I got stuck for so long in MLN the other night.
My plan to address this issue was to subscribe to the spread channels to validate and correct my local trade books data. I was apprehending this change because it is touching a module that I have left alone since last December and it did cause me quite some time to get it right. This is the module that receives about 1 million update per hour and it took me 3 weeks-1 month to make it rock solid and fail proof.
but carefully, I did add the spread update function. I'm quite satisfied of the result as it did give me the opportunity to perform some cleanup/refactoring of that module.
I went to bed after letting this new version running. It did turn out to be quite flawed. It didn't work at all and of course because of that, no trading opportunity got detected.
I did debug the problem this morning. It is quite an art to create good logs without flooding the log file with garbage. It is quite easy to flood the logs when the code receive 1 million updates/hour. The key is to craft logging conditions. You only log when certain conditions are met. This is filtering a lot of good updates and only print out when problems are detected.
Those extra logs takes a lot of room in the log file. I'll keep those extra logs for few hours just to make sure that all is good then I'll deactivate them.
Very happy of current state. 2 major issues got resolved.
I'll let it run and collect the trading execution to monitor them. I'm pretty close to be able to let it run unsupervised for longer periods and I have plenty of ideas for improvement...
but I need to give some attention to my marketing biz that I neglected a bit during last week...
To finish this entry. Here is some stats so far:
The trading volume generated by my tests are getting close to $3000 with a $100 budget. So roughly 30 trades done by my system so far.
I did lose some money but not too much. I had an initial $600 balance. I'm currently at $500 which isn't that much loss considering all the bugs and errors that my tests did encounter.
I fixed the issue reported in the last journal entry. I did receive some clarification from the exchange support person. Upon receiving this info, this has generated a click in my head.
While I was waiting for their answer, I started to plan very complex possible solutions to the problem. On receiving the reply, this made me figure out a very simple and elegant solution.
I did put it in place. A second also important issue is that for some reason, some updates are never received. The result of this is false positive since you work with stall and invalid data and this is also contributing to less than optimum execution. There are 3 major techniques for execution: joining, improving and lifting the price.
Joining is done by setting your order price to the best current price. Improving is to set the price one notch above the current best price. Lifting is simply to set your price just 1 notch below the opposite side best price. Of course, if you don't have the correct best prices, you cannot execute those strategies correctly.
For high volume pairs, the situation auto correct itself rapidly but it can stay there for quite some time for low volume pairs. This is one factor why I got stuck for so long in MLN the other night.
My plan to address this issue was to subscribe to the spread channels to validate and correct my local trade books data. I was apprehending this change because it is touching a module that I have left alone since last December and it did cause me quite some time to get it right. This is the module that receives about 1 million update per hour and it took me 3 weeks-1 month to make it rock solid and fail proof.
but carefully, I did add the spread update function. I'm quite satisfied of the result as it did give me the opportunity to perform some cleanup/refactoring of that module.
I went to bed after letting this new version running. It did turn out to be quite flawed. It didn't work at all and of course because of that, no trading opportunity got detected.
I did debug the problem this morning. It is quite an art to create good logs without flooding the log file with garbage. It is quite easy to flood the logs when the code receive 1 million updates/hour. The key is to craft logging conditions. You only log when certain conditions are met. This is filtering a lot of good updates and only print out when problems are detected.
Those extra logs takes a lot of room in the log file. I'll keep those extra logs for few hours just to make sure that all is good then I'll deactivate them.
Very happy of current state. 2 major issues got resolved.
I'll let it run and collect the trading execution to monitor them. I'm pretty close to be able to let it run unsupervised for longer periods and I have plenty of ideas for improvement...
but I need to give some attention to my marketing biz that I neglected a bit during last week...
To finish this entry. Here is some stats so far:
The trading volume generated by my tests are getting close to $3000 with a $100 budget. So roughly 30 trades done by my system so far.
I did lose some money but not too much. I had an initial $600 balance. I'm currently at $500 which isn't that much loss considering all the bugs and errors that my tests did encounter.