Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

Explain what makes the structure of the human language so unique

Answered: 1 week ago

Question

Compare and contrast large and small power distance cultures

Answered: 1 week ago