Question
You will be trading a security ALGO . It is an uneventful day, and you do not expect the price of ALGO to change significantly
You will be trading a security ALGO
. It is an uneventful day, and you do not expect the price of ALGO to change significantly over the course of the day (represented by a 5-minute trading simulation). You will write a market-making algorithm in VBA to run on the Rotman Interactive Trader. Your algorithm can be as complicated as you like, but must satisfy the following:
1. You should make an Excel spreadsheet containing the time remaining, the bid, ask, and last traded prices of ALGO.
Your spreadsheet should also contain any parameters needed for your function (trading volume, spread, etc.)
You will create a VBA function to trade algorithmically. This function should run once per second. Your function should cancel any open orders.
Your function should then submit two limit orders, one to buy and one to sell.
You should attempt to limit your exposure, either by reducing your trading volume as your position increases, or adjusting your spread. The case has some parameters: Your max trade size is 5000 shares. Your position limit is 25000shares. You will not be able to exceed this limit. Trading commissions are $0.01, but you get a $0.005 rebate for submitting limit orders (providing liquidity to the market). So far I have the following:
Option Explicit
Function MarketMaking(timeRemaining As Integer) As String
'Declare the Rotman API Dim Trader As RIT2.API Set Trader = New RIT2.API
Dim status As Variant 'Needed to place orders
MarketMaking = "Have 2 Orders"
If Range("B6").Value <> 2 Then 'Cancel my open orders Trader.CancelOrderExpr ("Price>0") 'All orders have price > 0
status = Trader.AddOrder("ALGO", 1000, Range("D4").Value - 0.05, Trader.BUY, Trader.LMT) status = Trader.AddOrder("ALGO", 1000, Range("D4").Value + 0.05, Trader.SELL, Trader.LMT)
MarketMaking = "Placed 2 Orders" End If
End Function How do I limit my exposure?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started