联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codehelp

您当前位置:首页 >> CS程序CS程序

日期:2021-11-25 08:19

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.
1

相关文章

版权所有:留学生编程辅导网 2021,All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。