*************** OPTIVER CHALLENGE SUBMISSION - Team-04 *************** SORRY THERE WAS TECHNICAL ISSUES IN THE VIDEO IT CAN STILL BE SEEN, RUNNING AND US EXPLAINING The bot decides to open a position, keep it open or close it at every moment by calculating some technical indicators. When opening a position, we look at 2 ratios. 1 - (bid google + bid amazon) / ask tech_basket 2- (ask google + ask amazon) / bid tech_basket
For each of the ratios, we calculate the mean ratio over the past 5 seconds as well as the last available ratio.
Regarding ratio 1, if the mean ratio and the last available ratio are above a certain threshold, then we decide to buy an amount of tech basket and sell an equal amount of amazon and google (i.e. if we buy 1 tech_basket then we sell 1 amazon and 1 google). The threshold against which we compare the ratio can be adjusted based on the level of risk and the properties of the market. The volume that we buy or sell depends on the available bid volume, ask volume, our current position and a linear dependence on the size of the ratio. The latter is so that we take larger positions for more predictive signals. We always buy the same number of units of the tech basket as the number of units of amazon and google that we sell so that our risk remains low and we remain hedged. The reason we perform this operation is that by comparing the ratio with our threshold we are deducing that the tech basket is undervalued and that the individual stocks are overpriced. Hence, when they eventually converge we can perform the inverse operation with a profit.
Similarly, for ratio 2, if the mean ratio and the last available ratio are below a certain threshold, then we decide to sell an amount of tech basket and buy an equal amount of amazon and google. The threshold against which we compare the ratio can be adjusted based on the level of risk and the properties of the market. The volume that we buy or sell depends on the available bid volume, ask volume, our current position and a linear dependence on the size of the ratio. As before, we opted for a hedging process to keep our risk low. The reason we perform this operation is that by comparing the ratio with our threshold we are deducing that the tech basket is overvalued and that the individual stocks are underpriced. Hence, when they eventually converge we can perform the inverse operation with a profit.
How do we close our positions? Similarly to before, we calculate the same 2 ratios and examine them individually. If ratio 1 is >= 1, then we attempt to cash out by buying the basket (covering our open shorts) and selling the individual stocks (from what we are currently holding), all within a reasonable price. Through this process, we identify a converging instance that allows us to close our previously open positions such that we extract profit.
While if ratio 2 is <= 1, them we attempt to cash out by selling the basket (from what we are currently holding) and buying the individual stocks (covering our open shorts), all within a reasonable price. Through this process, we identify a converging instance that allows us to close our previously open positions such that we extract profit.
Overview - How did we use it in the challenge? Throughout the challenge, we mostly implemented a low-risk strategy. We had a high upper threshold and a small lower threshold so that we only executed orders when we were relatively confident that it was a good opportunity. We also adjusted these thresholds based on market conditions. In the early morning (4 am), the volume in the exchange was low so we decided to reduce the upper threshold and increase the lower threshold. Oppositely, at 8 am, when all the bots started operating again, we found that it was necessary to increase the upper threshold and reduce the lower threshold.
Built With
- cloud9
- optibook
- python
Log in or sign up for Devpost to join the conversation.