您的位置:首页 > 产品设计 > UI/UE

bond trading - requirement spec

2015-10-18 15:41 465 查看
Simulate a SimpleBond Trading Processing

Overview

This system need to simulate a simple bond tradingprocessing. We simplified the logic, so it might be not the same as the tradingprocessing in the real world.

In this system, we suppose it is made up of 5 subsystems,front-end .Net UI system, front-end Java server, simulator, back-end tradingservice and messaging channel (JMS broker, such as ActiveMQ). The architecturediagram is shown as below.

Figure 1:Architecture diagram
Ø Front-end .net UI System

o Traders can buy/sell bonds on this UI system.

Ø Front-end Java Server

o This subsystem can handle all requests from .netUI side and talk with other subsystems via JMS messages.

Pleasenote blow tips for front-end client and server:

1, Eachteam need to implement a front-end client and server. You can assume thefront-end system like 光大证券交易系统/中信证券交易系统.

2, Youcan have your own database and JMS broker for each team if needed. (It isoptional)

3, Don’taccess database and JMS broker directly in front-end .net UI side. Onlyfront-end java server accessing database and JMS broker is allowed.

Ø Simulator

o It simulates a front end system that cangenerate some sell/buy requests.

o It generates a number of sell/buy bond requestsevery minute.

Ø JMS Broker

o Act as an intermediator between front endsystems and back end systems.

o Front-end systems do not allow talking withBack-end service directly. They can communicate by passing message via anymessaging infrastructure. Currently, we are using Tibco EMS as the messaginginfrastructure.

o We created some topics and queues to servedifferent functions and clients.

o The format of messages is based on JSON that wehave listed in the below table.

Ø Back-end Bond Trading Service

o It is playing an important role in thisexperimental application. It is similar to Shanghai Stock Exchange Corporation.It needs to handle all trade requests from front-end trading system, includingbuy/sell/bid/offer and compute price of each bond.

Use Cases

1. Simulator publishes a message to sale bond inevery 1 minute (The parameter is configurable).

We have listed some bond templates in belowsection. You can pick up a bond out of them randomly and broadcast the salemessage to everyone via JMS broker.

(Tips: you can change some values of bond,so it looks like a true bond much)

After front-end java servers received thesale messages, they can pass these messages to corresponding front-end .net UIclients, so traders can make a decision to buy or do nothing for this bond.

If several traders buy the same bond fromthe same front-end system, the front-end java server should only pick up thehighest price and send the bid message to JMS broker.

Once the bid messages that sent by tradersreached to simulator, the simulator need to store the bid messages in memorytill the bidding time is expired (for example, 20 seconds), and then pick upthe highest price to deal, and the bidding price should be greater
than PresentValue (you need to compute the PV against the standard valuation format).

If no traders send the buy requests forthis bond, this bond will be closed after 5 minutes (The parameter isconfigurable).

2. Simulator publishes message to buy a bond inevery 1 minute (configurable).

Similar to #1, you can refer to thedetailed message format in the next section.

3. In front-end side, you should show the bondrequests that are being sale, buy and processing. (To see figure 3)

4. Trade statistic report for this trader. (figure4)

5. To view trading history for this trader. (figure5)

6. Login:

In front-end side, the end user (a trader)need to login before using it. You can design simple password verificationlogic.

7. Entitlement:

The trader can only see something owned byhimself. For example, tradeA can’t sell the bonds that bought by tradeB before.

You can create a particular super user tosee everything owned by this front-end system. For example, the ‘root’ can seeany trading history for tradeA/tradeB/traderC who did trading in your application.

Sequence Diagram

Figure 2: Tradingwork flow
The high level process is as below:

1) Back-end trading service (Simulator): Create a randombond message in every minute and then publish the new bond message to EMStopic. So Front-end systems (java server, not .Net UI side) can subscriber themessages and decide to buy or sell the bonds.

2) Bid: If there are multiple clients sent the buymessages from multiple front-end systems, so simulator need to evaluate theprice and choose a client who offers the maximum price to deal.

3) Back-end trading service (Simulator): Sendtrading result to every buyer/seller.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: