FS_211_Regular Type v0.7(No names)

43
FS#211 Regular Type FS Number FS #211 Client BROKER DU Business Analyst Milton Ko Date 17/07/2014 Internal Enhancement Reference(s) Page 1/43

Transcript of FS_211_Regular Type v0.7(No names)

Page 1: FS_211_Regular Type v0.7(No names)

FS#211 Regular Type

FS Number FS #211Client BROKERDU Business Analyst Milton Ko

Date 17/07/2014Internal Enhancement Reference(s)

Page 1/29

Page 2: FS_211_Regular Type v0.7(No names)

Page 2/29

Page 3: FS_211_Regular Type v0.7(No names)

Revision history

Version Date Description By0.1 17/07/2014 Initial version Milton Ko

0.2 31/07/2014

Added the concept position, more

explanation in the requirement section for

including fee model, and more scenarios;

Changed some terms and headings Milton Ko

0.3 04/08/2014

Changed the concept of credit limit for

unexecuted buy orders Milton Ko

0.4 12/08/2014

Title changed; Added definitions of terms;

Added 4 subsections under 1.4.3.2.1 for

explaining formulas; Added descriptions for

scenarios under 1.4.3.2.1 Milton Ko

0.5 21/08/2014

Some modifications and corrections; added

commas to numbers more than 1000;

added descriptions in Section 1.4.3.3 Milton Ko

0.6 28/08/2014

Some modifications on the fee calculation

in 1.3.2; Added a remark explaining the

rationale of limit amount calculation when

cancelling trade report; Replaced “volume”

by “value” Milton Ko

0.7 29/08/2014 Added a remark under 1.4.3.3 Milton Ko

Page 3/29

Page 4: FS_211_Regular Type v0.7(No names)

Contents

1 Customer requirements............................................................................................................................. 4

1.1 Background and Objective................................................................................................................. 4

1.2 Scopes............................................................................................................................................... 4

1.3 Business Logic of the Regular Type Model........................................................................................5

1.3.1 Description of the Model Logic....................................................................................................5

1.3.2 Examples by Scenarios...............................................................................................................5

1.3.2.1 Scenario 1: Basics.............................................................................................................51.3.2.2 Scenario 2: Scenario 1 with Transaction Fees (Comm. + Vat.) Accounted...................61.3.2.3 Scenario 3A: Change Account of Buy Order - Transaction Transfer from Portfolio....71.3.2.4 Scenario 3B: Change Account of Sell Order - Transaction Transfer from Portfolio....81.3.2.5 Scenario 4A: Change Account of Sell Order - Transaction Transfer to Portfolio.........91.3.2.6 Scenario 4B: Change Account of Buy Order - Transaction Transfer to Portfolio......10

1.4 Business Requirements................................................................................................................... 11

1.4.1 Requirement Catalogue............................................................................................................11

1.4.2 The Notation F for Transaction Fees.........................................................................................11

1.4.3 Detailed Requirements..............................................................................................................12

1.4.3.1 Req001 – Credit Line and Limit Amount Import............................................................121.4.3.2 Req002 – Credit Check for Buy Order............................................................................12

1.4.3.2.1 Limit Amount Calculation for Execution....................................................................131.4.3.2.1.1 A = (L - L’)Q’, the Over Deducted Value..................................................................131.4.3.2.1.2 B =F(LQ) - F(L(Q-Q’)), the Projected Transaction Fee.............................................131.4.3.2.1.3 C = (F(x + L’Q’) – F(x)), the Actual Transaction Fee................................................141.4.3.2.1.4 Calculation of v and v’ in Different Scenarios...........................................................14

1.4.3.2.2 Limit Amount Calculation for Cancellation................................................................151.4.3.3 Req003 – Credit Check for Sell Order............................................................................161.4.3.4 Req004 Recalculation of Limit Amount for Transactions Transferal..........................18

2 Proposed Functional Solution..............................................................................................................20

(To Fill by the PL)........................................................................................................................................ 20

2.1 Products delivery.............................................................................................................................. 20

3 Authorization........................................................................................................................................... 21

Page 4/29

Page 5: FS_211_Regular Type v0.7(No names)

1 Customer requirements1.1 Background and Objective

This functional specification describes a credit limit model (which was called regular type) for retail trading in DECIDE. Such model is required to be applied to each of the portfolios which prevents client from over buying according to a preset limit amount and this limit amount is updated daily. There are 2 types of portfolios: type H and C1. DECIDE is able to handle credit limit as required portfolios with credit lines, on the day that this is written. On top of the import of portfolio types into DECIDE, this functional specification focuses on the regular type model on portfolios which have credit lines.

1.2 Scope s

In summary, this functional specification mentions the requirements that

1. portfolio types, limit amounts and credit lines are imported daily;

2. DECIDE works according to the credit type model.

And scopes are subjected to the following table:

Area In-Scope Out-of-Scope Description

Portfolio Type to which regular type applies

Type C, H Types other than H and C

As stated in Section 1.1, we will focus only on Type C for regular type.

Pending action when limit amount is over limit

Rejected Approval by Traders

Limit Approval is out of scope in retail phase. Therefore, orders whose values are greater than the limit amount are rejected

Pending action when short selling is attempted

Rejected Approval by Traders

No short selling is allowed for retail clients

Pending action when an attempted account change causes destination limit amount negative

Rejected Approval by Traders

Approval of account change bases on limit approval. The latter is out of scope, hence also the former

Pending action when an attempted account change causes short selling

Rejected Approval by Traders

No short selling is allowed for retail clients

1 Type H portfolios corresponds to accounts with real cash, which have limit amounts and possibly credit line; Type C corresponds to accounts with credit cash, which must have both limit amounts and credit lines.

Page 5/29

Page 6: FS_211_Regular Type v0.7(No names)

1.3 Business Logic of the Regular Type Model

1.3.1 Description of the Model Logic This credit limit model works on each portfolio (hence on each client) independently to other portfolios. Every day before trading hour, limit amounts and credit lines of all portfolios are imported to DECIDE. DECIDE then keeps track on the activities of these portfolios, and takes actions according to the rules defined by this credit limit model. We explain the concept of the model in the following.

Limit amount of a portfolio is the so called “buy power” of the portfolio at current time. Buy orders on a portfolio deduct amounts from its limit amount, while sell orders after matched will increase limit amount. Credit line is a number which bounds the limit amount from above. In other words, limit amount cannot exceed credit line if credit line information provided. For a particular portfolio, let us denote its credit line by CL and its limit amount by L. For an order on an instrument, we denote by v its value which include commission and VAT and by Q its quantity. Further let AQ be the available quantity (number of shares held) of that instrument on this portfolio. When such a trading order is sent using this portfolio, in general, the model performs the following logic.

1) For a buy order, if v > L, reject this order (See Section 1.2); if v L, subtract v from L.

2) For a sell order, if Q > AQ, reject this order (See Section 1.2); if Q AQ, AQ is deducted by Q, and if it is matched we add v to L, with the restriction that L can be at most CL (L = min (L + v, CL))

Moreover, transactions may be mistakenly placed on a portfolio/account and hence transferring back to the correct portfolio is required. This is called Order Account Change. Limit amount is then recalculated. However, order account change which causes negative limit amount or negative available quantity is prohibited (Please see Section 1.3.2.4).

To illustrate this concept, we use the following scenarios.

1.3.2 Examples by Scenarios Throughout this entire functional specification, for simplification, when we mention limit amount or credit line, it refers to the limit amount and the credit line of the portfolio on which the buy or sell order is placed. This section aims at providing a general idea of the dynamic of the limit amount under the interactions of Regular Type Limit Model with orders and account changes. Descriptions of step by step effect on the limit amount, from order entry, to cancelled or matched, is provided in section 1.4.3.2 and 1.4.3.3; Logic which involved available quantity of portfolios is also omitted in this section and will be discussed in 1.4.3.3 and 1.4.3.4.

1.3.2.1 Scenario 1: Basics

Now assume the credit line and limit amount are both 1,000 THB. Table 1 illustrates the changes of the limit amount after each trading activities, and the corresponding responses from DECIDE basing on the credit limit model. For the first scenario assume no transaction fee.

Page 6/29

Page 7: FS_211_Regular Type v0.7(No names)

Table 1

0 Buy/Sell

Value (THB)

Limit Amount (THB) Result and LogicBefore After

1 Buy 700 1,000 300 For buy order we deduct limit amount by its value, which is 700. Hence 300 of limit amount is left.

2 Buy 500 300 300 As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

3 Buy 100 300 200 For buy order we deduct limit amount by its value, which is 100. Hence 200 of limit amount is left.

4 Sell 300 200 500 For sell order, limit amount is rewarded by its value, which is 300. Hence 300 is added to the limit amount, which becomes 500.

5 Sell 600 500 1,000 Limit amount is rewarded but as 500+600 = 1100 > 1000, the credit line. Hence limit amount is revised to it maximum value, 1000.

6 Buy 600 1,000 400 For buy order, limit amount is deducted by its value, which is 600. Hence limit amount becomes 400.

1.3.2.2 Scenario 2: Scenario 1 with Transaction Fees (Comm. + Vat.) Accounted

We follow Scenario 1 with transaction fees taken into account. Description of fee model is out of scope in this functional specification. We simply assume for the remaining scenarios of this section that after all, 5% of the transaction value (Comm 3%, Vat 2%) will be deducted for a matched order for fees.

Table 2

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

Before After1 Buy 700 28 0.28 728.28 1,000 271.72 For buy order we deduct

limit amount by its value and fees, which is 728.28 in total. Hence 271.72 of limit amount is left.

2 Buy 500 20 0.15 515.15 271.72 271.72 As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

3 Buy 100 4 0.04 104.04 271.72 167.68 For buy order we deduct limit amount by its value and fees, which is 104.04 in total. Hence 167.68 of limit amount is left.

Page 7/29

Page 8: FS_211_Regular Type v0.7(No names)

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

4 Sell 300 12 0.12 287.88 167.68 455.56 For sell order, limit amount is rewarded by its value less fees, which is 287.88. Hence 287.88 is added to the limit amount, which becomes 455.56.

5 Sell 600 24 0.24 575.76 455.56 1,000 Limit amount is rewarded but as 455.56+575.76 = 1031.32 > 1000, the credit line. Hence limit amount is revised to it maximum value, 1000.

6 Buy 600 24 0.24 624.24 1,000 375.76 For buy order we deduct limit amount by its value and fees, which is 624.24 in total. Hence 375.76 of limit amount is left.

1.3.2.3 Scenario 3A: Change Account of Buy Order - Transaction Transfer from Portfolio

Assume Scenario 2 has happened already. The transaction of row 3 was mistakenly placed on this portfolio. That transaction is then transferred back to another portfolio. After that, Table 1Table2 becomes

Table 3

0 Buy/Sell

Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

Before After

1 Buy 700 28 0.28 728.28

1,000 271.72

For buy order we deduct limit amount by its value and fees, which is 735 in total. Hence 265 of limit amount is left.

2 Buy 500 20 0.15 515.15

271.72

271.72

As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

3 Buy 100 4 0.04 104.04

271.72

167.68

For buy order we deduct limit amount by its value and fees, which is 105 in total. Hence 160 of limit amount is left.

4 Sell 300 12 0.12 287.88

167.68

455.56

For sell order, limit amount is rewarded by its value less fees, which is 285. Hence 285 is added to the limit amount, which becomes 445.

5 Sell 600 24 0.24 575.76

455.56

1,000 Limit amount is rewarded but as 445+570 = 1015 > 1000, the credit line. Hence limit amount is

Page 8/29

Page 9: FS_211_Regular Type v0.7(No names)

revised to it maximum value, 1000.

6 Buy 600 24 0.24 624.24

1,000 375.76

For buy order we deduct limit amount by its value and fees, which is 630 in total. Hence 370 of limit amount is left.

7 Remove row 3

375.76

480.16

The value of the removed buy transaction, including the transaction fee, which is 104.4, is rewarded to limit amount, hence becomes 480.16.

1.3.2.4 Scenario 3B: Change Account of Sell Order - Transaction Transfer from Portfolio

This scenario means to show that removal of a sell order transaction may cause negative limit amount which should not appear in normal situation. Assume Scenario 2 has happened already. The transaction of row 5 was mistakenly placed on this portfolio. That transaction is then attempted to transfer back to another portfolio, but action is rejected since this causes negative limit amount. Table 4 in the following illustrates this idea.

Table 4

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

Before After1 Buy 700 28 0.28 728.28 1,000 271.72 For buy order we deduct

limit amount by its value and fees, which is 728.28 in total. Hence 271.72 of limit amount is left.

2 Buy 500 20 0.15 515.15 271.72

271.72 As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

3 Buy 100 4 0.04 104.04 271.72

167.68 For buy order we deduct limit amount by its value and fees, which is 104.04 in total. Hence 167.68 of limit amount is left.

4 Sell 300 12 0.12 287.88 167.68

455.56 For sell order, limit amount is rewarded by its value less fees, which is 287.88. Hence 287.88 is added to the limit amount, which becomes 455.56.

5 Sell 600 24 0.24 575.76 455.56

1,000 Limit amount is rewarded but as 455.56+575.76 = 1031.32 > 1000, the credit line. Hence limit amount is revised to it maximum value, 1000.

Page 9/29

Page 10: FS_211_Regular Type v0.7(No names)

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

6 Buy 600 24 0.24 624.24 1,000 375.76 For buy order we deduct limit amount by its value and fees, which is 624.24 in total. Hence 375.76 of limit amount is left.

7 Remove row 5

375.76

-200 If the value of the removed sell transaction is deducted from limit amount, it becomes -200. Hence this transferal is not allowed.

1.3.2.5 Scenario 4A: Change Account of Sell Order - Transaction Transfer to Portfolio

Assume Scenario 2 has happened already. A sell order transaction with value 300 which belongs to this portfolio was mistakenly placed on another portfolio. That transaction is then transferred back to this portfolio. After that, Table 2 becomes

Table 5

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

Before After1 Buy 700 28 0.28 728.2

81,000 271.72 For buy order we deduct

limit amount by its value and fees, which is 728.28 in total. Hence 271.72 of limit amount is left.

2 Buy 500 20 0.15 515.15

271.72

271.72 As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

3 Buy 100 4 0.04 104.04

271.72

167.68 For buy order we deduct limit amount by its value and fees, which is 104.04 in total. Hence 167.68 of limit amount is left.

4 Sell 300 12 0.12 287.88

167.68

455.56 For sell order, limit amount is rewarded by its value less fees, which is 287.88. Hence 287.88 is added to the limit amount, which becomes 455.56.

5 Sell 600 24 0.24 575.76

455.56

1,000 Limit amount is rewarded but as 455.56+575.76 = 1031.32 > 1000, the credit line. Hence limit amount is revised to it maximum value, 1000.

Page 10/29

Page 11: FS_211_Regular Type v0.7(No names)

0 Buy/Sell Value (THB)

Comm(4%)

Vat(1%)

Total Limit Amount (THB)

Result and Logic

6 Buy 600 24 0.24 624.24

1,000 375.76 For buy order we deduct limit amount by its value and fees, which is 624.24 in total. Hence 375.76 of limit amount is left.

7 Sell Transaction Added

300 12 0.12 287.88

375.12

663 The value of the inserted sell transaction, less the transaction fee, which is 287.88, is rewarded to limit amount, hence it becomes 663.

****Remark: System has to check the available quantity of the portfolio, if the quantity enough then allow to add sell transaction order

1.3.2.6 Scenario 4B: Change Account of Buy Order - Transaction Transfer to Portfolio

This scenario means to show that insertion of a buy order transaction may cause negative limit amount which should not appear in normal situation. Assume Scenario 2 has happened already. A buy order transaction with value 500 which belongs to this portfolio was mistakenly placed on another portfolio. That transaction is then attempted to transfer back to this portfolio, but action is rejected since this causes negative limit amount. Table 6 in the following illustrates this idea.

Table 6

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

BA

Page 11/29

Page 12: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Buy

7 2 07 1 For buy order we deduct limit amount by its value and fees, which is 728.28 in total. Hence 271.72 of limit amount

Page 12/29

Page 13: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Buy

5 2 05 2 2 As buy value is greater than limit amount, buy order is rejected. Hence no effect on limit amount.

Page 13/29

Page 14: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Buy

1 4 01 2 1 For buy order we deduct limit amount by its value and fees, which is 104.04 in total. Hence 167.68 of limit amount

Page 14/29

Page 15: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Sell

3 1 02 1 4 For sell order, limit amount is rewarded by its value less fees, which is 287.88. Hence 287.88 is added to the limit amou

Page 15/29

Page 16: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Sell

6 2 05 4 1 Limit amount is rewarded but as 455.56+575.76 = 1031.32 > 1000, the credit line. Hence limit amount is revised to it

Page 16/29

Page 17: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Buy

6 2 06 1 3 For buy order we deduct limit amount by its value and fees, which is 624.24 in total. Hence 375.76 of limit amount

Page 17/29

Page 18: FS_211_Regular Type v0.7(No names)

Buy/Sell

VC(

V(

T Limit Amount (THB)

Result and Logic

Buy Transaction Added

5 2 05 3 - If the value of the inserted buy transaction is deducted from limit amount, it becomes -44.44. Hence this transferal is not

600

24 0.24

624.24

1,000

375.76

For buy order we deduct limit amount by its value and fees, which is 624.24 in total. Hence 375.76 of limit amou

Page 18/29

Page 19: FS_211_Regular Type v0.7(No names)

1.4 Business Requirements

1.4.1 Requirement Catalogue

Req ID Requirement Description: Comments /Explanation /DetailsRQ001 Daily import of account types, credit lines and

limit amounts for portfolios. DUBI file will be provided by BROKER for this daily

RQ002 For a buy order, when attempted, either deduct corresponding value from limit amount or reject if its value is greater than limit amount

Take row 1 and row 2 of Table 1 as an example.

RQ003 For a sell order, when attempted, either the available quantity is greater than the order quantity or the order is rejected otherwise. After transaction is done, reward limit amount according to credit line

Take row 4 and row 5 of Table 1 as an example.

RQ004 Recalculation of limit amount after transaction transfer and reject transaction transferal when the transferal causes negative limit amount after recalculation

Take row 4 of Table 3 as an example, and take row 5 of Table 4 and of Error: Reference source not found as examples

1.4.2 The Notation F for Transaction Fees

In the next section we describe in details the credit check involving transaction fees in 1.4.3.2, 1.4.3.3 and 1.4.3.4. Accounting transaction fees in the calculation, the logic is more complicated. To help explain the logic, we denote by F(x) the transaction fees that the underlying portfolio is charged according to the corresponding fee model, where x is the daily accumulated trading value on this portfolio at the moment. In general, the transaction fee of a newly executed order with price L and quantity Q is F(LQ + x) – F(x) (The fee accumulated with this order minus the fee accumulated without this order). Let us illustrate this notation by the following examples.

Suppose we use the simple fee model of Scenario 4 in Table 5. Then F(x) = 0.0404x, and after row 6 in Table 5, the transaction fee on the underlying portfolio is F(2,800) = 0.0404*2,800 = 113.12. Assume furthermore in the same table, a new buy order is placed and its value is 200. Then the transaction fees on this portfolio is F(3,000) = 0.0404* 3000 = 121.2. The additional transaction fees due to this new buy order is F(3,000) – F(2,800) = 8.08.

Suppose now we are using a more sophisticated model, as follow:

Table 7 A More Sophisticated Fee Model

Fees in (%) Lower Limit Upper Limit Min. Fee Max. Fee0.25780000 5,000,000.00000000 0.0000 12,890.00000.22780000 5,000,000.00000000 10,000,000.00000000 12,890.0000 24,280.00000.18780000 10,000,000.00000000 20,000,000.00000000 24,280.0000 43,060.00000.16780000 20,000,000.00000000 43,060.0000

Moreover, suppose on a portfolio, there are 2 matched buy orders and 1 matched sell orders already, with value 2,000,000, 3,500,000 and 4,000,000 respectively. Then the daily accumulated value is 9,500,000 (in between 5,000,000 and 10,000,000), and according to Table 7, the accumulated transaction fees can be calculated as follow:

Page 19/29

Page 20: FS_211_Regular Type v0.7(No names)

Value Slide# Rate (%) Commission5,000,000 1 12,8904,500,000 2 0.2278 10,251

Total 9,500,000 23,141

In other words, F(9,500,000) = 12890 + 4,500,000 * 0.2278% = 23141. Assume now, a new sell order with value 3,000,000 is matched. The daily accumulated value on this portfolio becomes 12,500,000, and the table above becomes

Value Slide# Rate (%) Commission10,000,000 2 24,2802,500,000 3 0.1878 4,695

Total 12,500,000 28,975

In other words, F(12,500,000) = 24280 + 2,500,000*0.1878% = 28975. The addition transaction fees due to this new sell order is F(12,500,000) – F(9,500,000) = 5834.

Assume again, another sell order with value 3,000,000 is newly matched. Daily accumulated value becomes 15,500,000, and we calculate the transaction fee by the following table:

Value Slide# Rate (%) Commission10,000,000 2 24,2805,500,000 3 0.1878 10,329

Total 12,500,000 34,609

Hence F(15,500,000) = 34609, and the addition transaction fees charged on this new sell order is F(15,500,000) – F(12,500,000) = 34,609 – 28,975 = 5,634. Please be noted that the two sell orders with the same value have different transaction fees.

Furthermore, assume the sell order with value 4,000,000 is mistakenly placed on this portfolio. Obviously, the transaction fees overcharged is required to refund to the portfolio. The transaction fee has been paid now is F(15,500,000), while the portfolio should only pay F(11,500,000). F(15,500,000) = 34,609, and F(11,500,000) = 24,280 + 1,500,000*0.1878%) = 27,097. Hence 34,609 – 27,097 = 7,514 should be rewarded to the portfolio.

This notation F will be used frequently when we go over the calculation of limit amounts in later sections.

1.4.3 Detailed Requirements

1.4.3.1 Req001 – Credit Line and Limit Amount Import

The file ocus_acc.dat is used for import. For a sample file for importing credit line and limit amount please refer to FS_213, Back Office Batch for Import. Portfolios types are supposed to be imported as Account Type under Deposits; Credit lines (Credit limit) and limit amounts (Buy_Total_cr) are supposed to be imported to “Credit Line” and “Limit Amount” respectively under Order Value Limits.

1.4.3.2 Req002 – Credit Check for Buy Order

When a buy order is attempted to be placed, DECIDE checks first if the value of this buy order exceeds the limit amount of the corresponding portfolio. If it does, reject the entry of this order, an error message, stating that the turnover limit is violated, will be shown in the status bar. If the value

Page 20/29

Page 21: FS_211_Regular Type v0.7(No names)

of the buy order is within the limit amount, the order is then placed, and this value is deducted from the limit amount. The value of a buy order, denoted by v, is calculated in the following way:

Let L be the limit price of the order (For ATO, ATC, market orders, special market orders and market-to-limit orders, L is the ceiling price of the corresponding instrument), and Q be the remaining/open quantity of the order. Then v = LQ + F(LQ).

To understand the above formula, first note that LQ is the projected value of the order, as if it is fully matched at price L. F(LQ) is the projected transaction fee, as if this order is fully matched, assuming there is no previous transaction on this portfolio before. For example, suppose a limit buy order with price 300 and quantity 10,000 is now placed. Then F(LQ) = F(3,000,000) = 3,000,000 * 0.002578 = 7,734, hence v = 3,007,734 is deducted from the limit amount.

In the case when there are previous transactions (usually there are!), F(LQ) may be overcharged. Continuing the above example, assume before the order is placed, the daily accumulated value is 4,000,000 already. If the order is fully executed, the accumulated value becomes 7,000,000, and the transaction fee charged on this buy order is F(7,000,000) – F(4,000,000). As F(7,000,000) = 12,890 + 2,000,000 * 0.002278 = 17,446, and F(4,000,000) = 4,000,000 * 0.002578 = 10,312, the real transaction fee is 17,446 – 10,312 = 7,134. Therefore, the deduction 7,734 for transaction when the order was placed is more than the actual transaction fee 7,134, and 7,734 – 7,134 is 600. Thus one should expect that when this order is fully matched, 600 is rewarded back to the limit amount.

Indeed, when a buy order is placed, the value of the buy order v is calculated in the most conservative manner. As in the example in the previous paragraph, when the order is executed, the actual amount deducted from limit amount may be less than the amount deducted when the order was placed, and hence some amount will be rewarded to back to the limit amount. The following two sections are dedicated to explain how execution (partial or full) and cancellation of buy orders reward a certain amount v’ from the deducted limit back to the limit amount.

1.4.3.2.1 Limit Amount Calculation for Execution

Suppose now the placed buy order is executed, and the executed quantity is added to the available quantity of the underlying instrument on the portfolio. We denote the last executed quantity by Q’ (if the order is partially matched, Q’ < Q), the execution price is L’ (if the order is a limit order, L’ = L). We further let x be the daily accumulated value. Then the rewarded amount v’ = A + B – C, where A = (L - L’)Q’ is the over deducted value, B = (F(LQ) - F(L(Q-Q’))) is the projected transaction fee of the quantity Q’, and C = (F(x + L’Q’) – F(x)) is the actual transaction fee of the quantity Q’.

We will explain the 3 terms A, B and C one by one in the following 3 subsections.

1.4.3.2.1.1 A = (L - L’)Q’, the Over Deducted Value

For limit orders, L = L’, hence this term (L - L’)Q’ = 0. This term is meaningful in the case when a market order is executed and L > L’. In this case, when the executed quantity Q’ was placed and before execution, LQ’ is the projected value deducted from the limit amount. However, after executed at price L’, the actual value is L’Q’. The over deducted value is LQ’ – L’Q’ = (L - L’)Q’, and this should be rewarded to the portfolio.

1.4.3.2.1.2 B =F(LQ) - F(L(Q-Q’)), the Projected Transaction Fee

When an order with quantity Q is placed, F(LQ) is the projected transaction fee deducted from the limit amount. After Q’ is executed, the projected value of this order drops from LQ to L(Q – Q’), implying that the projected transaction fee drops from F(LQ) to F(L(Q-Q’)). The decrement F(LQ) - F(L(Q-Q’)) caused by this execution is therefore the projected transaction fee of the executed quantity Q’. In the case when the order is fully executed, Q’ = Q, hence the projected transaction of

Page 21/29

Page 22: FS_211_Regular Type v0.7(No names)

quantity Q’ is the same as the projected transaction fee of the entire order, which is F(LQ) (as F(L(Q-Q’)) = F(0) = 0), coinciding with the second term of the formula for v.

1.4.3.2.1.3 C = (F(x + L’Q’) – F(x)), the Actual Transaction Fee

When the order with quantity Q’ is executed at price L’, the daily accumulated value increases from x to x + L’Q’, implying that the accumulated fee increases from F(x) to F(x + L’Q’). The increment F(x + L’Q’) – F(x), is the actual transaction fee caused by this execution of Q’.

Conclusion from the 3 subsections above: For value, as (L - L’)Q’ is over deducted, this amount should be rewarded back to the limit amount. For transaction fee, the projected is usually more conservative and when it is over estimating the actual transaction fees, the fees over charged, is (F(LQ) - F(L(Q-Q’))) – (F(x + L’Q’) – F(x)) (the projected transaction fee minus the actual transaction fee), is rewarded to the limit amount. The sum of the two over charged amounts is hence the rewarded amount v’. This explains the formula of v’.

1.4.3.2.1.4Calculation of v and v’ in Different Scenarios

Let us assume the model stated in Table 7 for illustrating the above concepts by the following scenarios. We will also assume that the daily accumulated value x is 8,000,000. As we proved the formula for v and v’ in the previous subsections, we will simply apply those formulas in the following scenarios.

Scenario 0 (Value of order exceeds limit amount): The limit amount left is 1,000,000. A limit buy order with quantity 10,000 at price 100 is placed.

Here we have L = 100 and Q = 10,000. Therefore, the value of this buy order is v = 1,000,000 + 1,000,000*0.002758 > 1,000,000, greater than the limit amount. Hence the placement of this order is rejected. An error message will be shown in the status bar.

Scenario 1 (Calculation of the limit amount when a limit order is fully executed): A limit buy order with quantity 10,000 at price 100 is placed. Then it is fully executed.

Here we have L = 100 and Q = 10,000. Therefore, the value of this buy order is v = 1,000,000 + 1,000,000*0.002758 = 1,002,578, and this will be deducted from the limit amount. After the execution, as L’ = 100, and Q’ = 10,000, v’ = 0 + (1,000,000 * 0.002578 – 0) – (F(9,000,000) – F(8,000,000)) = 2,578 – (22,002 – 19,724) = 300 is rewarded to the limit amount. The daily accumulated value x becomes 9,000,000, and remaining quantity Q becomes 0.

Scenario 2 (Calculation of the limit amount when a limit order is partially executed): A limit buy order with quantity 30,000 at price 100 is placed. Then 20,000 is executed.

Here we have L = 100 and Q = 30,000. Therefore, the value of this buy order is v = 3,000,000 + 3,000,000*0.002578 = 3,007,734, and this will be deducted from the limit amount. After the execution, as L’ = 100, and Q’ = 20,000, v’ = 0 + (3,000,000 * 0.002578 – 1,000,000 * 0.002578) – (F(1,000,0000) – F(8,000,000)) = 5,156 – (24,280 – 19,724) = 600 is rewarded to the limit amount. The daily accumulated value x becomes 10,000,000 and the remaining quantity Q becomes 10,000.

Scenario 2B (Calculation of the limit amount when a larger limit order (using more than 1 sliding level of fee model) is partially executed): A limit buy order with quantity 30,000 at price 200 is placed. Then 20,000 is executed.

Here we have L = 200 and Q = 30,000. Therefore, the value of this buy order is v = 6,000,000 + (12,890 + 1000000*0.002578) = 6,015,168, and this will be deducted from the limit amount. After the execution, as L’ = 200, and Q’ = 20,000, v’ = 0 + (15,168 – 2,000,000 * 0.002578) – (F(12,000,000) – F(8,000,000)) = 10,012 – (28,036 – 19,724) = 1,700 is rewarded to the limit

Page 22/29

Page 23: FS_211_Regular Type v0.7(No names)

amount. The daily accumulated value x becomes 12,000,000 and the remaining quantity Q becomes 10,000.

Scenario 3 (Calculation of the limit amount when a market order is fully executed): A market buy order with quantity 20,000. The ceiling 150 is used. Then it is fully executed at price 100.

Here we have L = 150 and Q = 20,000. Therefore, the value of this buy order is v = 150 * 20,000 * (1 + 0.002578) = 3,007,734, and this will be deducted from the limit amount.

After the execution, as L’ = 100, and Q’ = 20000, v’ = 50 * 20,000 + 3,000,000 * 0.002578 – (F(10,000,000) – F(8,000,000)) = 1,000,000 + 7,734 – (24,280 – 19,724) = 1,003,178 is rewarded to the limit amount. The daily accumulated value x becomes 10,000,000 and the remaining quantity Q becomes 0. Scenario 4 (Calculation of the limit amount when a market order is partially executed): A market buy order with quantity 20,000. The ceiling 150 is used. Then 10,000 is executed at price 100.

Here we have L = 150 and Q = 20,000. Therefore, the value of this buy order is v = 3,000,000 + 3,000,000*0.002578 = 3,007,734, and this will be deducted from the limit amount.

After the execution, as L’ = 100, and Q’ = 10,000, v’ = 500,000 + (3,000,000 * 0.002578 – 1,500,000 * 0.002578) - (F(9,000,000) – F(8,000,000)) = 500,000 + 3,867 – (22,002 – 19,724) = 501,589 is rewarded to the limit amount. The daily accumulated value x becomes 9,000,000, and remaining quantity Q becomes 10,000. Scenario 4B (Calculation of the limit amount when a large market order (using more than 1 sliding level of fee model) is partially executed): A market buy order with quantity 20,000. The ceiling 300 is used. Then 10,000 is executed at price 200.

Here we have L = 300 and Q = 20,000. Therefore, the value of this buy order is v = 6,000,000 + (12,890 + 1,000,000*0.002278) = 6,015,168, and this will be deducted from the limit amount.

After the execution, as L’ = 200, and Q’ = 10,000, v’ = 1,000,000 + (15,168 – 3,000,000 * 0.002578) - (F(10,000,000) – F(8,000,000)) = 1,000,000 + 74,324 – (24,280 – 19,724) = 1,002,878 is rewarded to the limit amount. The daily accumulated value x becomes 10,000,000, and remaining quantity Q becomes 10,000.

Scenario 5 (Calculation of the limit amount when a partially executed market order is fully executed): Continue from Scenario 4, assume the remaining of the order is executed at price 101.

Here we have L’ = 101, Q’ = 10,000, x = 9,000,000, and the rewarded amount v’ = 49 * 10,000 + 1,500,000 * 0.002578 - (F(10,010,000) – F(9,000,000)) = 490,000 + 3,867 – (24,298.78 – 22,002) = 491,570.22 is rewarded to the limit amount. After all, the daily accumulated value x becomes 10010000, and remaining quantity Q becomes 0.

1.4.3.2.2 Limit Amount Calculation for Cancellation

Suppose now the buy order is cancelled and again we denote the daily accumulated trading value by x (This x includes the partially executed value of this order). Then the value of the remaining order is rewarded, v’ = LQ + F(LQ) where Q is the remaining quantity.

Again, let us make use of model stated in Table 7 and assume x is 8,000,000.

Scenario 6 (Calculation of the limit amount when a limit order is cancelled before any execution): A limit buy order with quantity 10,000 at price 100 is placed. Then it is cancelled without any execution.

Page 23/29

Page 24: FS_211_Regular Type v0.7(No names)

Similar to Scenario 1, v = 1,002,578, and this is deducted from the limit amount once the order is placed. When it is cancelled, obviously, v’ = 1,002,578 is rewarded to the limit amount.

Scenario 7: (Calculation of the limit amount when a limit order is cancelled after partial execution): A limit buy order with quantity 30,000 at price 100 is placed. Then the order is cancelled after 20,000 is executed.

Same as Scenario 2, v = 3,007,734, and this is deducted from the limit amount once the order is placed. After the execution, the remaining Q is 10,000, and x is 10,000,000 and 600 is rewarded to the limit amount. Finally, when the order is cancelled, the rewarded limit amount v’ = 1,000,000 + 1,000,000*0.002578 = 1,002,578. Therefore in total, 1,003,178 is rewarded.

Scenario 7B (Calculation of the limit amount when a larger limit order (using more than 1 sliding level of fee model) is cancelled after partial execution): A limit buy order with quantity 30,000 at price 200 is placed. Then the order is cancelled after 20,000 is executed.

Same as Scenario 2B, v = 6,015,558, and this is deducted from the limit amount once the order is placed. After the execution, the remaining Q is 10,000, and x is 12,000,000 and 1,830 is rewarded to the limit amount. Finally, when the order is cancelled, the rewarded limit amount v’ = 2,000,000 + 2,000,000*0.002578 = 2,005,156. Therefore in total, 2,006,986 is rewarded.

Scenario 8 (Calculation of the limit amount when a market order is cancelled after partial execution): A market buy order with quantity 20,000. The ceiling 150 is used. Then the order is cancelled after 10,000 is executed at price 100.

Same as Scenario 4, v = 3,007,734, and this is deducted from the limit amount once the order is placed. After the execution, the remaining Q is 10,000, x is 9,000,000, and 501,589 is rewarded. Finally, when the order is cancelled, the rewarded limit amount v’ = 1,500,000 + 1,500,000*0.002578 = 1,503,867. Therefore in total, 2,005,456 is rewarded.

Remark: For cancelling trade report of a buy order, no limit amount is rewarded until the cancellation is confirmed from the exchange. Once the cancellation is confirmed, the calculation of the limit amount follows exactly the same logic described above.

In summary, when a buy order is attempted to be placed, if v is greater than the limit amount, reject the order; otherwise, place the order and subtract v from limit amount. When a limit buy order is open, partially matched or fully matched, there is no effect on this limit amount; in the cases when a market buy order is partially or fully matched, or when an order is cancelled, some amount v’ is rewarded to the limit amount.

1.4.3.3 Req003 – Credit Check for Sell Order

When a sell order is attempted, the position of the portfolio is checked to ensure that this order will not result in short selling. To explain this, let Qo be the order quantity and QA be the available quantity of the corresponding instrument on this portfolio. If Qo > QA, the order is rejected and an error message is displayed on the status bar. Otherwise, proceed to place the order and deduct QA

by Qo. When the order is cancelled, QA is reward by the remaining quantity of the order. This will be illustrated by scenarios after the explanation of effect on the calculation of the limit amount by a sell order.

After a sell order is placed, every time the order is matched (either fully or partially), the limit amount is increased by the matched value, subjected to the constraint that the limit amount cannot exceed the credit line. The value of the matched value V is calculated in the following way:

Let L be the last transaction price (Deal Price) of this sell order, Q be the executed quantity and F(x) be as in Section 1.4.2, where x is the daily accumulated value. Then V = LQ – (F(x + LQ) –

Page 24/29

Page 25: FS_211_Regular Type v0.7(No names)

F(x)). We assume x is now 8,000,000 again and illustrate this concept by 4 Scenarios using the fee model in Table 7 as follow.

Scenario 0 (Quantity of order exceeds the available quantity): A limit sell order on PTT with quantity 10,000 at price 100 is attempted, using a portfolio holding 8,000 shares of PTT.

Here we have Qo = 10,000 > 8,000 = QA, hence the order is rejected. An error message will be shown in the status bar.

For the following scenarios we assume the portfolio is holding 40,000 shares of the underlying instrument.

Scenario 1 (Calculation of the limit amount for full execution of selling order): A limit sell order with quantity 10,000 at price 100 is placed. Then it is fully executed.

Regarding the position, when the order is placed, QA is deducted by Qo = 10,000, hence becomes 30,000, and remains the same after the order is executed.

Regarding limit amount, we have L = 100 and Q = 10,000. Then the value of the matched value V = 1,000,000 – (F(9,000,000) – F(8,000,000)) = 1,000,000 – (22,002 – 19,724) = 997,722 is rewarded to the limit amount. The daily accumulated value x becomes 9000000.

Scenario 2 (Calculation of the limit amount when a sell order is cancelled without any execution): A limit sell order with quantity 10,000 at price 100 is placed. Then it is cancelled without any execution.

Regarding the position, when the order is placed, QA is deducted by Qo = 10,000, hence becomes 30,000, and is rewarded by the remaining quantity 10,000 after the order is cancelled and becomes 40,000 again.

Regarding the limit amount, there is no execution at all, nothing is rewarded.

Scenario 3 (Calculation of the limit amount when a partially executed limit sell order is cancelled): A limit sell order with quantity 30,000 at price 100 is placed. 20,000 is executed then the order is cancelled.

Regarding the position, when the order is placed, QA is deducted by Qo = 30,000, hence becomes 10,000, and is rewarded by the remaining quantity 10,000 after the order is cancelled and becomes 20,000 again.

Regarding the limit amount we have L = 100 and Q = 20,000. Then the value of the matched value V = 2,000,000 – (F(10,000,000) – F(8,000,000)) = 2000000 – (24,280 – 19,724) = 1,995,444 is rewarded to the limit amount. The daily accumulated value x becomes 10,000,000.

Scenario 4 (Calculation of the limit amount when a partially executed Market sell order is cancelled): A limit market order with quantity 30,000 is placed. 20,000 is executed at price 100 then the order is cancelled.

Regarding the position, as only the quantities are considered, Scenario 4 makes no difference to Scenario 3. Hence the available quantity follows the same way.

Regarding the limit amount, as only the last transaction price is used in the calculation, sell market order is treated the same as limit order, despite the fact that the transaction price of the market order is unknown before transaction. In this case, everything is the same as in Scenario 3, hence 1,995,444 is rewarded to the limit amount.

Page 25/29

Page 26: FS_211_Regular Type v0.7(No names)

Remark: For canceling trade report of a match sell order, no limit will deduct and quantity will increase until the cancellation is confirmed from the exchange. Once the cancellation is confirmed, the calculation of the limit amount follows exactly the same logic described above

In summary, for a sell order, there is a position check before placement to disallow short selling; and once it is placed, the available quantity of the portfolio is adjusted, and no reward to limit amount until there is a transaction (partially or fully matched). Each time a transaction is made limit amount is rewarded by this value V.

1.4.3.4 Req004 Recalculation of Limit Amount for Transactions Transferal

For the ease of describing concepts in this section, again we let L and Q be the (average) price2

and the quantity of the transaction intended to be transferred respectively. Available quantity always refers to the available quantity of the underlying instrument on the portfolio. Again F(x) be as in Section 1.4.2, where x is the daily accumulated value before the transactions transferal. Then for

1. removing a buy transaction from a portfolio, the limit amount is rewarded by LQ + F(x) – F(x - LQ), subjected to the constraint that the limit amount cannot be greater to the credit line. Moreover, the available quantity is deducted by Q, subject to the constraint that it cannot be negative or this transferal is not allowed;

2. removing a sell transaction from a portfolio, the limit amount is deducted by LQ – (F(x) – F(x - LQ)), subjected to the constraint that the limit amount cannot be negative, or this transferal is not allowed. Moreover, the available quantity is increased by Q;

3. adding a buy transaction to a portfolio, the limit amount is deducted by LQ + F(x + LQ) – F(x), subjected to the constraint that the limit amount cannot be negative, or this transferal is not allowed. Moreover, the available quantity is increased by Q;

4. adding a sell transaction to a portfolio, the limit amount is increased by LQ – (F(x + LQ) – F(x)), subjected to the constraint that the limit amount cannot be greater to the credit line Moreover, the available quantity is deducted by Q, subject to the constraint that it cannot be negative or this transferal is not allowed.

When a transaction is intended to be transferred to or from a portfolio, if the recalculation of the limit amount gives a negative amount or if the adjusted available quantity is negative, this transferal is then rejected. An error message will be shown in the status bar stating that this action is rejected because it causes negative limit amount.

We let QA be the available quantity and A be the limit amount left for the day. Let us assume that the daily accumulated value x is 8,000,000, QA is 40000, A = 4,000,000 and use the fee model as in Table 7 to illustrate the above concepts by the following scenarios.

Scenario 1: A limit buy order with quantity 10,000 at price 100 is transferred away.

Here we have L = 100 and Q = 10,000. Then the limit amount rewarded = 1,000,000 + F(8,000,000) – F(7,000,000) = 1,000,000 + 19,724 – 17,446 = 1,002,278, A becomes 5,002,278 and QA = 30,000.

Scenario 2: A limit sell order with quantity 10,000 at price 100 is transferred away.

2 We use average price here in order to include the cases when an order was executed more than once and with different prices. For example, an order with quantity 20,000 could have 10,000 executed at 100 and the remaining 10,000 executed at 102. Then the average price of this order is 101.

Page 26/29

Page 27: FS_211_Regular Type v0.7(No names)

Here we have L = 100 and Q = 10,000. Then the limit amount deducted = 1,000,000 - F(8,000,000) – F(7,000,000) = 1,000,000 – (19,724 – 17,446) = 997,722, A becomes 3,002,278 and QA = 50,000.

Scenario 3: A limit buy order with quantity 30,000 at price 100 is transferred in.

Here we have L = 100 and Q = 30,000. Then the limit amount deducted = 3,000,000 + F(11,000,000) – F(8,000,000) = 3,000,000 + 26,158 – 19,724 = 3,006,434, A becomes 993,566 and QA = 70,000.

Scenario 4: A limit sell order with quantity 30,000 at price 100 is transferred in.

Here we have L = 100 and Q = 30,000. Then the limit amount rewarded = 3,000,000 – (F(11,000,000) – F(8,000,000)) = 3,000,000 – (26,158 – 19,724) = 2,993,566, A becomes 6,993,566 and QA = 10,000.

Scenario 5: A limit buy order with quantity 50,000 at price 100 is transferred out.

As QA – Q < 0, this transferal is rejected. An error message will be shown in the status bar.

Scenario 6: A limit buy order with quantity 30,000 at price 150 is transferred in.

Here we have L = 150 and Q = 30,000. Then the limit amount deducted = 4,500,000 + (F(12,500,000) – F(8,000,000)) > 4,000,000 = A, hence this transferal is rejected. An error message will be shown in the status bar.

Remark: On the day that this document is written, credit check for institutional clients does not account for transaction fee. BROKER requests also that Req 002 and Req 003 are applied to institutional clients.

Page 27/29

Page 28: FS_211_Regular Type v0.7(No names)

2 Proposed Functional Solution

(To Fill by the PL)

2.1 Products delivery List products which will be delivered after the specifications have been validated as well as versions that will be delivered to customers.

Page 28/29

Page 29: FS_211_Regular Type v0.7(No names)

Page 29/29