联系方式

  • QQ:821613408
  • 邮箱:global@horysk.com
  • 工作时间:8:00-23:00
  • 微信:horysk8

您当前位置:首页 >> OS作业OS作业

日期:2024-03-20 07:35

Call Auction and Order Book

Advanced Quantitative Analysis in Finance

Exercise  1.  Call Auction.  With the Excel spreadsheet distributed in class, showing how the call auction works, write a general purpose call auction computer program in Python that does the following:

❼ Read from a file the buy and sell orders.  Fields within the file should consist of the price, side, quantity.

❼ Determine the opening price, i.e.  the price that matches all buy and sell pre-orders.

❼ Determine the initial opening order book after the call auction.

Exercise  2.  Order Book. Using your knwledge of Python which has built in data structures for lists and dictionaries, develop a Python class named OrderBook, that can model and store an order book. Please note the following:

❼ OrderBook should be able to handle both the bid and ask sides.

❼ OrderBook should be able to handle both market and limit orders.  A market order should be matched immediately, while the limit order may or may not be filled fully. A partially filled or totally unfilled order becomes part of the order book.

❼ Any any time, be able to output the best bid, best ask, bid/ask spread, and all market depth.

❼ Any any price, ensure time priority of orders by matching orders that were placed first.


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

python代写
微信客服:horysk8