HeaderSIS.jpg

IS480 Team wiki: 2016T1 Ingenium Final

From IS480
Jump to navigation Jump to search
Ingenium-logo.png

Home-icon.png Home

Team-icon.png About Us

Overview-icon.png Project Overview

Mgmt-icon.png Project Management

Doc--icon.png Documentation

Main Wiki Midterm Wiki Final Wiki

Links & Slides

Project Progress Summary

Current Iteration: 10 (15-Nov-16 to 30-Nov-16)

  • Till date, 100% of project scope completed
  • We have complete a total of 3 UATs with our Client

Project Challenges

  • Difficulty in understanding the different process of stock trading in client's perspective thus extra time is spent on understanding before designing our functionalities.
  • Different brokers have different FIX format requirements, requiring patches to fit the OCBC broker requirements even though the API FIX format might state a certain way the broker have their own proprietary FIX messages and response.
  • Sponsor UAT delayed as infrastucture not up (need to be at the same collocation, but IDC couldn't thus had to change data provider).
  • Live trades was delayed as production environment not available for traders to send orders to broker.

Project Achievements

  • We have successfully conducted 4 live trades with our client.

The following shows the total number of stocks put up and transacted:

Date Put up Transacted
1st Live Trade (Buy/Sell)

8 November 16

  • 1,700 Stocks
  • 200 Stocks
2nd Live Trade (Buy/Sell)

11 November 16

  • 700 Stocks
  • 200 Stocks
3rd Live Trade (Buy/Sell, Buy-in)

14 November 16

  • 3,000 Stocks (Buy/Sell)
  • 100 Stocks (Buy-in)
4th Live Trade (Buy-in)

15 November 16

  • 40,000 Stocks ($0.194 per stock)
  • 40,000 Stocks
5th Live Trade (Buy-in)

17 November 16

  • 100 Stocks
  • 100 Stocks
  • Deployed on server
  • 170 stocks per second
6th Live Trade (Buy-in)

18 November 16

  • 54,000 Stocks ($0.184 per stock)
  • Deployed on server
7th Live Trade (Buy-in)

21 November 16

  • 49,990 Stocks ($0.183 per stock)
  • 25,000 Stocks
8th Live Trade (Buy-in)

29 November 16

  • 195,000 Stocks ($0.047 per stock)
9th Live Trade (Market Making)

29 November 16

  • Buy: 100 Stocks ($0.415 per stock)
  • Sell: 100 Stocks ($0.460 per stock)
  • Ran for 10 minutes

Project Management

Project Status

S/N Description Module Completion Confidence Comments
1 Retrieve Data from Data Provider Connectivity 100% 1.0 Implemented by Mingliang
2 Network I/O from IDC Connectivity Removed due to change in data vendor
3 CRUD Order Trading Platform 100% 1.0 Implemented by Hongkun
4 Display Order Book Dashboard Trading Platform 100% 1.0 Implemented by Hongkun
5 Order Execution Confirmation Trading Platform 100% 1.0 Implemented by Hongkun
6 Display Profit & Loss Trading Platform 90% 1.0 Implemented by Hongkun
7 Subscribe Stocks to Market Watch Market Watch 100% 1.0 Implemented by Mingliang
8 Display Market Watch Market Watch 100% 1.0 Implemented by Mingliang
9 Subscribe Stocks to Watch List Watch List 100% 1.0 Implemented by Mingliang
10 Display Watch List Watch 100% 1.0 Implemented by Mingliang
11 CRUD Market Making Orders Market Making 100% 1.0 Implemented by Huaswee
12 Market Making Automated Hedging Market Making 100% 1.0 Implemented by Huaswee
13 Market Making to Allow Manual Intervention Market Making 100% 1.0 Implemented by Huaswee
14 CRUD Arbitrage Algorithm Trading Algorithm Trading 50% 1.0 To be implemented by Huaswee
15 Rights Arbitrage Algorithm Trading 0% 1.0 Implemented by Huaswee
16 Buy-in Arbitrage Algorithm Trading 100% 0.8 Implemented by Hongkun
17 Index Arbitrage Algorithm Trading Huaswee is researching on Arbitrage Algorithm
18 Real-time update for Market Watch Design Architecture 100% 1.0 Implemented by Mingliang
19 Real-time update for Watch List Design Architecture 100% 1.0 Implemented by Mingliang
20 Real-time update for Order Book Design Architecture 100% 1.0 Implemented by Hongkun
21 Real-time update for Profit & Loss Design Architecture 70% 0.6 To be implemented by Hongkun
22 Real-time update for Transaction Log Design Architecture 100% 1.0 Implemented by Hongkun
23 Login / Logout Account Management 100% 1.0 Implemented by Hongkun
24 Access Rights Account Management 100% 0.5 Implemented by Mingliang
25 Display User Profile Page Account Management Removed due to scope ambiguity clarified
26 Account Module (Primary / Secondary Server / Trader) Account Management Removed due to scope ambiguity clarified
27 Add / Remove Broker Account Account Management 100% 1.0 Implemented by Mingliang
28 Set Trade Limit to Account Account Management 100% 1.0 Implemented by Mingliang
29 Display Transaction Log for Broker Accounts Account Management 100% 1.0 Implemented by Hongkun
30 Failover Secondary Function Removed scope due to change in data vendor
31 Concurrency for Market Watch Secondary Function 100% 1.0 Implemented by Mingliang
32 Concurrency for Watch List Secondary Function 100% 1.0 Implemented by Mingliang
33 Concurrency for Order Book Secondary Function 100% 1.0 Implemented by Mingliang
34 Concurrency for Profit & Loss Secondary Function 70% 1.0 To be implemented by Mingliang
35 Concurrency for Transaction Log Secondary Function 100% 1.0 Implemented by Mingliang
36 Code Revision for Lower Latency Secondary Function -% 0.5 To be implemented by all developers
37 Conditional Order Triggers based on Parameters Secondary Function Removed due to Team's Progress

Project Scope

Old Project Scope

Ign-midtermscope.png

New Project Scope

Ign-scope.png

Highlights of Changes Made in Scope

  • Removed cross and index arbitrage due to team's progress - Not confident of completing the function.
  • Removed implementation of conditional order trigger due to team's progress - Estimated that unable to complete the function.
  • Re-scoped Market Making to be more detailed in terms of functional requirements

Project Schedule

Old Timeline

Ign-overallschedule7.png

New Timeline

Ign-overallschedule9.png

Highlights of Changes Made in Schedule

  • Added tasks for Client's Request for UI Changes in Iteration 8.
  • Postponed P&L from Iteration 7 to iteration 9.
  • Re-scheduled UAT 2 from Iteration 7 to 8.
  • Re-scheduled UAT 3 from Iteration 9 to 10.
  • Removed Index Arbitrage & Conditional Order Triggers for Market Making.

Project Metrics

Ign-taskmetric.png Ign-bugmetric.png

Project Risks

S/N Description of Risk Likelihood Impact Risk Level Mitigation Strategy
1 Different brokers have different FIX format requirements, requiring patches to fit the new broker requirements. Even though sample FIX messages were provided for validation, they were very basic and insufficient for comprehensive testing. Medium High A Have constant communication with sponsors and brokers for preempt warnings, so any time we have issues or need clarifications on the system we can email them straight away.
2 Difficulty in understanding the different process of stock trading in client's perspective thus extra time is spent on understanding before designing our functionalities. High Medium A Set up communication channel with stakeholders for issues that require immediate feedback.
3 Sponsor UAT delayed. Medium High A Check back with Schedule, reaccess the impact and adjust schedule to account for later UAT. With VPN, more flexible for UAT to be done.

Technical Complexity

Technical Complexity #1: Interaction with Broker

The web application converts the user's order details into QuickFix format can contain fields such as symbol, price, currency, quantity, type of market, validity, account, force and type of SGX market. Each type of market and validity of stocks and broker custom fields have unique message fields which are unique within each option, our application must be able to create the stock order dynamically and fitting to the broker's standard or else the quick message would be rejected.

When we receieve broker messages, our application must be able to convert the quickfix messages and display onto our web user interface. A stock is able to have many different states such as cancelled, done for day, replaced, rejected, new, partial fill and filled status along with many other additional fields. These fields have to be recorded correctly as an error in the fields can prevent further transactions with this stock order.

On Top of that, it is possible for the broker to send us duplicate messages as a means of failover if they are unsure whether we receieved it. Our application must be able to handle duplicate messages by checking out the Executed ID of each broker message. We put each executed id from the broker into a hashmap and check if the current receieved message has already been processed before.

Technical Complexity #2: Market Making

Market Making allows stock traders to automatically create buy and sell orders to create liquidity in the market for specific stocks, based on user inputs including where the orders are specified to be in the watchList. Market making will also automatically change the sent orders to reflect changes in the stock prices from moment to moment.

The user inputs the buy and sell levels of the orders, as well as the max spread between the buy and sell prices. Market Making will then calculates the order price based on the current stock price and the price difference between the buy and sell price. once calculated, market making will then checks if the current order fits the calculated price. If not, it will cancel the order and sends a new order with the modified price.

Technical Complexity #3: Websocket for Real-time Concurrency

WebSocket allow us to achieve concurrent realtime data to client browser. In order to indivdually linked user to multiple unique session id, we created our own 3 way handshake to bind the user to all its unqiue session id.

  1. On user client initialization with WebSocket, WebSocket will return a session id to the user client.
  2. User client will then return the message state, username and session id.
  3. WebSocket on message receive, it will check state to see its a handshake message.
  4. WebSocket will then associate username with session id.
  1. In order to achieve realtime concurrency, we created a onMessageBroadcast to push data to the user with its associate session id.
  2. With that, we are also use WebSocket message to notify any changes on the user for events such as subscribe or unsubscribe stocks

Quality of product

Our development team has ensured constant communication with our client via meetings and emails to make sure there is no discrepancies between the development teams and the clients’ understanding in the functionalities. In addition, the development team have also had constant communication with other stakeholders that also have a role in the project, such as the data provider and the stock brokers.

Intermediate Deliverables

Type Description Documentation
Project
Management
  • Minutes
  • Metrics
  • Risk Management
  • Change Management
  • Project Schedule
Design &
Analysis
  • Architecture Diagram
  • Interaction Diagram
  • Use Case Diagram
  • Business Process Diagram for Market Making
Testing
  • General Test Plan
  • UAT #1
  • Internal Testing

Deployment

The application is deployed on North Point Global’s server co-located at SGX data center, which is connected to North Point Global logically to prevent others outside the office from accessing the system. As such, the application is not deployed on public domain. The deployment link is available at the top of the page.

Testing

Total number of testing done:

  • 3 UAT & Survey with our Client (North Point Global)
  • Internl testing done with the data provider and stock brokers

Reflection

Team Reflection

In a project that can only be developed in the hours of 9 to 5, constant communication, merticulous planning and adapative schedule is very important in ensuring the success of the project.

Learning Outcome

  • The Financial Information Exchange (FIX) Protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. It is intended for use between trading partners wishing to automate communications.
  • Level1 (L1) Market Data or Level 1 Quotation Data consists of the real-time Best Bid and Best Ask Prices and the Bid and Ask Sizes available at those prices.
  • Level2 (L2) Market Data or Level 2 Quotation Data is the list of all Bid and Ask Prices with sizes and order originators.
  • ISO 10962 is the standard code that classifies financial instruments.
  • ISO 10383 is the standard code that identifies exchanges and financial markets.