首页 > > 详细

辅导program编程、辅导Python,c++程序

Quantitative trading strategies – Trading Assignment 4 – distributed 11/2/21,
due 11/23/21
You will design an execution algorithm that uses order book data to beat a TWAP
algorithm, i.e. an algorithm that sells 100 shares every 50 quotes.
Collect the data - 2pts
• Install ib insync package via pip or pip3 (e.g. ”pip install ib insync”)
• Download and install latest TWS application (not stable) from the interactive brokers
website
• Open TWS, log in with your IB account, open File - Global Configuration - API
- Settings, make sure the ”Enable ActiveX and Socket Clients” option is activated
and the Socket port is 7496 by default. This step can be found here, ”Enable API
connections” part.
• Open the ib insynch-template.ibynb notebook. When TWS is open, run the first cell
in notebook to set up connection, then run other cells.
• Run the notebook for at least 2 hours to create a file with quotes for SDS and SH
• You should upload a data file named netID.csv
Write the algorithm - 6pts
• Calculate the average price obtained from a TWAP algorithm that sell 100 share of
SDS at the bid at the end of every 50 quotes.
• Write a ”smart algo” that has the option to sell earlier in each 50 quotes interval,
based on the value of the imbalance and spread. Express the over/under performance
of your algorithm
• Do the same for a TWAP algorithm that buys 100 shares of SDS at the ask, vs your
”smart algo” that can buy earlier in each 50 quotes interval.
• Write a function called smartalgo, that takes in a file name and outputs the average
buy minus the average sell price
Performance - 2pts
We will run your algorithm on all submitted data files and determine which algorithm
minimizes the output.
 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!