Testing of margin model for UKPX spot market

Comments made by Sören Widlert:

I found one error in the test spec. below.

When calculating value of a trade, the value should be divided by 2.

(Value of a trade = quantity * price * 0.5 )

This because contract size = 0.5

Clarification.

When looking at the "Margin and position listings" on RI_LIS:

The files where the file name contains "FUT" come from RI_LIST (evening job),

the files where the file name contains "DPMON" come from RI_DPMON

Closed contracts (Expiration <= current date)

These contracts will be margined by payment margin. This payment margin will only be included if next calendar date is a non settlement date.

The risk parameters used are:

  • “Offset days for settlement margin” and a new:
  • “Base for offset days” with values:
  1. “Settlement days” old method
  2. “Calendar days”new method
  • “Payment margin” with a new value: “Bought Power”.

There are three possibilities depending of how the parameters are chosen:

  1. Include payment margin for both buyer and seller.
  2. Include payment margin for buyer only.
  3. Do not include any payment margin.

Parameter values

  1. If “Offset days for settlement margin” = 1 and “Base for offset days” = “Calendar Days”, all payment data for next settlement date will be included (if next settlement date does not equal next calendar date).
  1. Use “Payment margin” with the new value: “Bought Power”.
  1. If payment margin should not be included the parameter “Payment Margin” is set to “None”.

All parameters are defined and can be changed by PD (the Product Design application).

Open contracts (Expiration > current date)

The special method in this group is selected via a risk parameter “Forward margining” with values:

  • Forward style.
  • Future style (fixed initial margin only).
  • Special power style (this special method).

Here we have two cases:

1)The number of bought contracts >= number of sold contracts
The margin consists of two parts:

a)Locked in profit-loss for “sold” number of contracts.
Trade price of bought side will be the average contract price for all bought trades of the position.

b)Full payment margin for net position:
average bought price * ( bought – sold )

2)The number of bought contracts < number of sold contracts
The margin consists of two parts:

a)Locked in profit-loss for “bought” number of contracts.
Trade price of sold side will be average contract price for all sold trades of the position.

b)Fixed initial margin per contract for net position.
Initial margin * (sold – bought).

Test scenario:

In all tests, the parameter settings (in PD) must be

  • “Offset days for settlement margin” = 1
  • “Base for offset days” = “Calendar Days”
  • “Payment margin” = “Bought Power”
  • “Forward margining” = “Special power style”

If no other values are explicit given.

Thursday

To trade, use the Click application. Use two existing accounts (or create two new one).

  1. Make trades in two existing series, “a” and “b” where “a” expires on Thursday and “b” on Friday:

Series a: (expiration Thursday)

Account 1 / Value / Account 2
bought 10 @ 20 / 200 / sold 10 @ 20
bought 20 @ 15 / 300 / sold 20 @ 15
sold 5 @ 25 / -125 / bought 5 @ 25
sold 5 @ 20 / -100 / bought 5 @ 20

Series b: (expiration Friday)

Account 1 / Value / Account 2
bought 10 @ 20 / 200 / sold 10 @ 20
bought 20 @ 15 / 300 / sold 20 @ 15
sold 5 @ 25 / -125 / bought 5 @ 25
sold 5 @ 20 / -100 / bought 5 @ 20
  1. Run RI_DPMON (normally this process is running on) and create an alarm list report i.e., give the commands (in a terminal window on VMS).

“AM RI_DPMON 1 EVALUATE NOW”.

“AM RI_DPMON 1 COL_LIST”.

See the result in the report files RI_LIS: RI_SEC___*.LIS

  1. Run RI_SIMSRV and simulate margin requirement for the accounts containing the trades above. In the Common Data window (se below) in Margin simulation, select Market and the account and click on the send button.


Open the Simulate Margin Requirement window.


Check the “Use common data” checkbox to use the data from the Margin Common Data. Click on the Send button.

  1. Run the evening job.
  1. Look at the result from RI_LIST.

i.e, the files RI_LIS:RI_SEC__*.LIS and RI_LIS:RI_TOT__*.LIS.

Excepted results: (PM = Payment Margin, P/L = Profit/Loss)

X = valuation interval = 100(User Risk Parameter)

Account 1:PM = 200 + 300 – 125 – 100 = 275

Account 2:P/L = [(5 + 5)/(10 + 20)]*(200 + 300) – 125 – 100 – (X/2)*20 = -58.3 – X*10

RI_DPMON gives the same result on series expiring on Thursday and Friday. RI_LIST and RI_SIMSRV have this result only on series expiring on Friday.

  • A test with “Forward margining” = “Future style” will give the result = -(X/2)*20 (see above) for both accounts.

Friday

  1. Make trades in a series, “c” with expiration on Saturday:

Account 1 / Value / Account 2
bought 10 @ 20 / 200 / sold 10 @ 20
bought 20 @ 15 / 300 / sold 20 @ 15
sold 5 @ 25 / -125 / bought 5 @ 25
sold 5 @ 20 / -100 / bought 5 @ 20
  1. Run RI_DPMON, create alarm list report
  1. Run RI_SIMSRV and simulate margin requirement for the accounts containing the trades above.
  1. Run the evening job.
  1. Look at the result from RI_LIST.
  1. Rerun RI_LIST with the parameter “Forward margining” = “Future style”.

Excepted results:

RI_DPMON:

RI_SIMSRV:Same results as open positions previous day (per series, i.e. *2).

Account 1:PM = 275and

Account 2:P/L = -58.3 – X/10

RI_LIST:For series expired at Saturday (open positions), same result as for previous

day. For series expiring on Friday

  • PM (Account 1) = -275 and
  • PM (Account 2) = -58

With “Forward margining” = “Future style”

  • PM (Account 1) = -275 and
  • PM (Account 2) = +275

Saturday

  1. Make trades in a series, “d” with expiration on Sunday:

Account 1 / Value / Account 2
bought 10 @ 20 / 200 / sold 10 @ 20
bought 20 @ 15 / 300 / sold 20 @ 15
sold 5 @ 25 / -125 / bought 5 @ 25
sold 5 @ 20 / -100 / bought 5 @ 20
  1. Run RI_DPMON, create alarm list report
  1. Run RI_SIMSRV and simulate margin requirement for the accounts containing the trades above.
  1. Run the evening job.
  1. Look at the result from RI_LIST.

Excepted results:

RI_DPMON:

RI_SIMSRV:The series expiring on Friday, same result as payment yesterday.

The series expiring on Saturday and Sunday as open (i.e., 1*pay + 2*open).

RI_LIST:For series expired at Sunday as open and for series expiring on Friday

and Saturday as payment.

Sunday

  1. Make trades in a series, “e” with expiration on Monday:

Account 1 / Value / Account 2
bought 10 @ 20 / 200 / sold 10 @ 20
bought 20 @ 15 / 300 / sold 20 @ 15
sold 5 @ 25 / -125 / bought 5 @ 25
sold 5 @ 20 / -100 / bought 5 @ 20
  1. Run RI_DPMON for Saturday and Sunday
  1. Run RI_SIMSRV for Saturday and Sunday.
  1. Run the evening job.

Excepted results:

RI_DPMON:The series expiring on Sunday and Monday as open.

RI_SIMSRV:The series expiring on Monday as open.

RI_LIST:For series expired at Monday as open.

1