Sei sulla pagina 1di 12

TEMPLATE WORKSHOP ON SHARE MASTER

SHARE.SYS.PARAM (Prefix – SP) Type: H

Field Field Name Size & Field Description


No Type
0. SYS.ID 6, A Should allow an entry of only
‘SYSTEM’
1. RUNNING.NO 5, N Used to generate the running no for
Share ID. It is a NOCHANGE field.

This file should be updated by incrementing the value of RUNNING.NO whenever a


transaction in SHARE.MASTER is committed.

MNEMONIC.SHARE (Prefix – MS) Type: L

Field Field name Size & Description


Type
No
0. SHARE.MNEMONIC 10, MNE Unique name to identify the share
through out the system.
1. SHARE.ID 17, A Id of the share.

This file should be updated whenever a new transaction in SHARE.MASTER is committed.


The SHARE.MNEMONIC should be new for each new transaction in SHARE.MASTER.

SHARE.MASTER (Prefix – SM) Type: H

Field Field Name Size & Description


Type
No
0. SHARE.ID 17, A This is the ID of the SHARE.MASTER
Should accept only the Industry code from
the user and generate the ID as
SHYYJJJNNNNN-IIII,
where YY – Year, JJJ – Julian Date,
NNNNN - Running No (Read value from
SYSTEM.PARAMETER record) and
IIII – Industry Code
1. SHARE.DESC 35, A Description of the Share and is a
mandatory field
2. SHORT.DESC 10,A Short description of the Share
3. MNEMONIC 10, Unique name to identify the Share through
MNE out the system. This mnemonic is stored in
MNEMONIC.SHARE. This is a
mandatory field. Should be new for a new
record.
4. CURRENCY 3, Currency of the share. This is a mandatory
CCY field. Validate the currency value entered.
5. UNIT.FACE.VALUE 10, Face value of each share in the currency
AMT specified, and is a mandatory field.
6. TRADING.UNITS 10, N Specifies the multiplicity factor during
purchases.
7. LAST.PRICE 10, Last price quoted for the share
AMT
8. DATE.LAST.PRICE 11, D Date of last price quoted
9. XX.LOCAL.REF 35, A Local Reference field
10 INDUSTRY.CODE 5,N Industry code, NOINPUT field. Should be
defaulted from SHARE.ID.
11. INDUSTRY.NAME 35,A Industry name, NOINPUT field. Should
be defaulted from SHARE.ID.

Validations:

Check whether the MNEMONIC already exists in MNEMONIC.SHARE. The table file
MNEMONIC.SHARE should be updated at AFTER.UNAU.WRITE if the
MNEMONIC doesn’t exist.

New value of RUNNING.NO should be updated to SYSTEM.PARAMETER at


AFTER.UNAU.WRITE.
DAILY.SHARE.PRICES (Prefix – DSP) Type: H

Field Field Name Size & Description


Type
No

0. PRICE.ID 28, A This ID should consist of two parts separated


by ‘:’ – the first part should be SHARE.ID,
which is a valid record in SHARE.MASTER and
second part should be the current system
date. The system should accept only a valid
SHARE.ID and generate the PRICE.ID by
defaulting the current system date as the
second part.

1. SHARE.ID 17, A This is the Share ID. It should be defaulted


from the PRICE.ID and is a NOINPUT field.

2. PRICE.DATE 11, D This is the current system date. It should be


defaulted from the PRICE.ID and is a
NOINPUT field.

3. HIGH.PRICE 15, High price of the share on that day


AMT

4. LOW.PRICE 15, Low price of the share on that day


AMT

SHARE.BID.OFFER (Prefix – SBO) Type: H

Field Field Name Size & Description


Type
No
0. BID.ID 28, A This ID should consist of two parts separated by
‘:’ – the first part should be SHARE.ID, which
is a valid record in SHARE.MASTER and
second part should be the Customer ID which is
a valid record in CUSTOMER.
1. BID.PRICE 15, Price at which shares can be purchased.
AMT
2. OFFER.PRIC 15, Price at which shares can be sold.
E AMT
SHARE.HOLDING (Prefix – SH) Type: L

Field Field Name Type Description


No
0. CUST.ACC 28, A This ID should be of the format
CUSTOMER.ID:SHARE.ID, where
SHARE.ID should be a valid Share.ID
in SHARE.MASTER, and
CUSTOMER.ID should be a valid
Customer of the Bank.
1. CURR.POSITION 16, R Total number of shares held in this
account at any given time
2. CURR.COST 16, Total cost of the units held
AMT
3. AVG.PRICE 16, R Weighted average purchase price of
the units held
4. TOT.PROFIT.TODAY 16, This is updated on profits made on
AMT redemptions
5. TOT.LOSS.TODAY 16, This id updated on losses made due to
AMT Redemptions
6. TOT.PROFIT.MTD 16, Current month profits as of the
AMT previous day
7. TOT.LOSS.MTD 16, Current Month Losses as of the
AMT previous day
8. TOT.PROFIT.YTD 16, Current Year Profits as of the previous
AMT month
9. TOT.LOSS.YTD 16, Current Year Losses as of the previous
AMT month

This file should be updated whenever a record of SHARE.TRANSACTION is authorized.


SHARE.TRANSACTION (Prefix – ST) Type: H

Field Field Name Size & Description


Type
No
0. TRANSACTION.ID 12, A This is the ID of the transaction. Its format
is SHYYJJJNNNNN where SH stands for
Shares, YY is the current year, JJJ is the
Julian date and NNNNN is the running
number. The Running number should be
generated by AUTO.ID.START.
1. SHARE.ID 17, A ID of the share that has to be sold or
purchased. Must be an active Share present
in the SHARE.MASTER file. This is a
mandatory field.
2. SHARE.CCY 3, This is the currency of the share and should
CCY be defaulted from SHARE.MASTER file
and is the NOINPUT field.
3. DEAL.DATE 11, D This is the Transaction date. This field is a
mandatory field. Date entered should not be
less than the current business date
(TODAY).
4. VALUE.DATE 11, D Value date of the transaction and should be
a valid date. Date entered should not be less
than the deal date. It is a mandatory field.
5. CUSTOMER.ID 10, Identifies the customer who is involved in
CUS the current transaction. Is a mandatory field
& should be a valid CUSTOMER. This is a
NOCHANGE field.
6. BROKER.ID 10, A Identifies the Broker account for the
Customer and the share being transacted.
7. TRANSACTION.TYP 8, A Identifies the transaction type being
E processed. Permitted values are
PURCHASE or SALE only. This is a
mandatory field.
8. TRANS.UNITS 16, R Identifies the number of units being
purchased / sold.
General Validations:
Value entered should be in multiples of
TRADING.UNITS in Share master.

Redemption Validations:
ON SALE
Value entered should not be less than the
CURR.POSITION value of
SHARE.HOLDING.
9. TRANS.PRICE 16, R Validate against the SHARE.BID.OFFER.
PURCHASE: If the value entered is greater
than the BID.PRICE in
SHARE.BID.OFFER, then generate an
override message.
SALE: If the value entered is less than the
OFFER.PRICE in SHARE.BID.OFFER,
then generate an override message.
If the record for
SHARE.ID.CUSTOMER.ID does not exist
then no override message is created.
10. TRANS.VALUE 16, Transaction value in the share currency.
AMT This should be derived as TRANS.UNITS *
TRANS.PRICE.
11. TRANS.VALUE.LCY 16, This is the transaction value converted to the
AMT local currency. This is a NOINPUT field &
is derived from TRANS.VALUE.
12. BROKER.FEE.TYPE 11, A This is the Fee or charges to be charged on
purchases / sales being input. Must be a
valid code in FT.COMMISSION.TYPE.
This is not a mandatory field. If entered,
then the charges should be calculated based
on the TRANS.VALUE & the subsequent
fields should be populated.
13. BROKER.FEE.AMT 16, This is the fee / charges for the transaction
AMT & is a NOINPUT field.
14. FEE.AMT.LCY 16, This is the local currency equivalent amount
AMT of the fees / charges calculated. This is a
NOINPUT field.
15. NET.TRANS.AMT 16, This is the net transaction amount to be
AMT paid. This is derived from TRANS.VALUE
and total BROKER.FEE.AMT if any. This
is a NOINPUT field.
16. NET.TRANS.AMT.LC 16, This is the net transaction amount in local
Y AMT currency. This is derived from
TRANS.VALUE.LCY and the total
FEE.AMT.LCY, if any. This is a NOINPUT
field.
17. XX.LOCAL.REF 35, A Local Reference Field.
18.. CUST.ACCOUNT 14, Must be an account belonging to the
ACC Customer Number entered in
CUSTOMER.ID.
19. SETTLE.ACCOUNT 14, Must be a valid Account No. Create a
ACC Customer and Account for this purpose.
20. XX.OVERRIDE 35, A This is used to store the Overrides generated
during a transaction and is a NOINPUT
field.

Updates to SHARE.HOLDING file


These updates are to be performed in the AFTER.AUTH.WRITE stage of the application

A. On Purchase of Shares:

On input, update the SHARE.HOLDING file as mentioned.

Read the position record with the CUST.ACC as the key. If the record does not exists, then
create a new record with data mapped as shown below.

SHARE.HOLDING SHARE.TRANSACTION Remarks


CUSTOMER.ID CUSTOMER.ID
SHARE.ID SHARE.ID
CURR.POSITION TRANS.UNITS
CURR.COST TRANS.VALUE
AVG.PRICE TRANS.PRICE

If the record exists, then update the fields as mentioned below.

CURR.POSITION + = TRANS. UNITS


CURR.COST + = TRANS.VALUE
AVG.PRICE = ((CURR.POSITION * CURR.COST) + (TRANS.UNITS * TRANS.VALUE))
/ (CURR.POSITION + TRANS.UNITS)

B. On Sale of Shares:
On input, update the SHARE.HOLDING file as mentioned.

If the record exists, then update the fields as mentioned below.

CURR.POSITION -= TRANS.UNITS
CURR.COST -= TRANS.UNITS*AVG.PRICE
AVG.PRICE = TRANS.VALUE – (TRANS.UNITS*AVG.PRICE)

If the record does not exists in SHARE.HOLDING, then sale of share is not possible.

Potrebbero piacerti anche