The final code is Spreads_final.py
Our strategy operates as a delta-neutral market-making algorithm. It engages in trading within illiquid markets (new country) and swiftly offsets its positions in more liquid markets. We chose to fucus on only TECH_INC and tried to manually tune parameters for that stock. stock_B is TECH_INC_NEW_COUNTRY and stock_A is TECH_INC.
By consistently maintaining both buy and sell orders in the illiquid market, it ensures that the bid-ask spread for stock_B is consistently wider than that for stock_A. This strategy allows for instant hedging in the liquid market, resulting in a virtually risk-free position with a minimal overall exposure. To further reduce risk, the algorithm incorporates a safeguard mechanism referred to as a pillow, which guarantees a minimum profit on each trade, preventing participation in unprofitable transactions.
Over time, as the market experiences random fluctuations, the time gap between our bid and the actual execution of our spread narrows, effectively converting the initial position into profits. To ensure convergence of the positions in both instruments towards zero, a process called "unwinding" is implemented. This involves transferring positions from the instrument with negative positions to the other when a trade generates profit or maintains neutrality. As a result, the algorithm consistently generates genuine profits without holding imbalanced positions.
Log in or sign up for Devpost to join the conversation.