📊 MTM Configuration
MTM Shall be calculated based on current market price for applicable position as defined in Master config
⚙️ Master config used in calcualtion
| 📝 Config Key Desc | 🔧 Config Key Value | 📦 Key Source |
|---|---|---|
| Uploaded Buy Position Value | 1 - Uploaded Price 2 - Last Close Price | Master Config--Product-Future |
| Uploaded Sell Position Value | 1 - Uploaded Price 2 - Last Close Price | Master Config--Product-Future |
| Uploaded Buy Position Value | 1 - Uploaded Price 3 - Zero | Master Config--Product-option |
| Uploaded Sell Position ValuE | 1 - Uploaded Price 3 - Zero | Master Config--Product-option |
| Uploaded Buy Position Value | 1 - Uploaded Price 2 - Last Close Price | Master Config--Product-Equity |
| Uploaded Sell Position Value | 1 - Uploaded Price 2 - Last Close Price | Master Config--Product-Equity |
| Uploaded Buy Position Value - MTM | 1 - Uploaded Price 3 - Zero | Master Config--Product-option |
| Uploaded Sell Position Value - MTM | 1 - Uploaded Price 3 - Zero | Master Config--Product-option |
| Enable MTM Calculation | Toggle | Master Config--Product-Future |
| Enable MTM Calculation | toggle | Master Config-Product-Cash |
| Enable MTM for Long Position | Toggle | Master Config-Product-Option |
| Enable MTMT for Short Position | Toggle | Master Config-Product-Option |
| Interop Enable / Disable (INTEROP_FLAG) | Toggle | MasterConfig-Segment-Interop |
| Default Base Exchange - Market Data(DEF_BASE_EX_MKTDATA) | Dropdown | MasterConfig-Segment-Interop Default Value CASH-NSEEQ FNO-NSEFNO CURR-BSECDS |
Above configuration is based o product type, so system shall refer
1 - Uploaded Price means Ssytem should consider uploaded price for uploaded position and average daily price for Daily Position
2 - Last Close Price means system should consider last closing price for uploaded position and average daily price for daily position.
3 - 0 (Zero) means system should consider 0 as price for uploaded position and average daily price for daily position.
MTM shall be calculated only for applicable position based on master config for respective product. for Future & Cash Scrip Single key enable MTM calulcation is used for Both Long as well as short position, however for Option scrips, separate key to enable MTM Calculation for Long & Short Position.
🌐 Interop Impact
In case Interop is on then System shall refer combined segment exposure to calculate MTM, however in case of Interop is OFF then system shall refer base exchange exposure.
Current Scope of Interop is ON for Cash, FNO & CURR segment and OFF for Comm Segment
InterOp ON
System shall refer broadcast(MarketData) for default configured exchange against respective segment type. in case suh scrip is not listed in default exchange then sytem shall refer market data of other applicable exchange in sequence of NSE, BSE, MSE i.e. in case defualt echange is mentioned as BSE and such scrip is not listed in BSE then system shall refer market data of nse for such token in case such tok in not listed in NSE then System shall refer market data of MSE for such toekn and so on.
💾 Storage
System shall store MTM Profit and MTM Loss against 1st Falling SIP which will be used for Margin Utilization / Validation
System shall store MTM Profit and Loss against each falling group under mapped MTM Template which shall be used to trigger MTM alerts and MTM Trigger
📋 Examples
Based on the Master configuration, system consider the Price for Uploaded Position to derive the MTM Profit/Loss
Case 1: Consider Pending Order is available for Investor: CLI1
Assume LCP of ACC is 102, TCS is 210 and Lot Size of TCS is 300
Assume LTP of ACC is 110 and TCS is 220
| 📊 Seg | 🔧 Inst | 📅 Exp. | 💲 Stk. Price | 🎯 Opt. Type | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV | ⚡ Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NSEEQ | - | - | - | - | ACC | 50 | 100 | 5000 | - | - | - | Pending |
| NSEFO | FUTSTK | Exp1 | - | - | TCS | - | - | - | 600 | 200 | 120000 | Pending |
In this case, system should not compute MTM Profit/Loss as Order is in Pending Status.
Case 2: In continuous to case 1 Consider Pending order got executed for Investor: CLI1
Assume
| 📊 Seg | 📦 Cont. | 📏 Lot Size | 💰 LCP | 📈 LTP |
|---|---|---|---|---|
| NSEEQ | ACC | - | 102 | 110 |
| NSEFO | TCS | 300 | 215 | 210 |
| 📊 Seg | 🔧 Inst | 📅 Exp. | 💲 Stk. Price | 🎯 Opt. Type | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV |
|---|---|---|---|---|---|---|---|---|---|---|---|
| NSEEQ | - | - | - | - | ACC | 50 | 100 | 5000 | - | - | - |
| NSEFO | FUTSTK | Exp1 | - | - | TCS | - | - | - | 600 | 200 | 120000 |
System should consider Daily Average Price for Daily Open Position (i.e. ACC: 100, TCS: 200)
In this case, 50 Buy Open Position is available in NSEEQ ACC and 600 Sell Open Position in NSEFO TCS
MTM P/L of NSEEQ-ACC = (50 * (110 - 100)) = 50 * 10 = 500 (i.e. MTM Profit: 500, MTM Loss: 0)
MTM P/L of NSEFO-TCS = (-600 * (210 - 200)) = -600 * 10 = -6000 (i.e. MTM Profit: 0, MTM Loss: -6000)
Case 3: In continuous to case 2 Consider Sell Position created against NSEEQ-ACC and Buy Position created against NSEFO-TCS
Assume
| 📊 Seg | 📦 Cont. | 📏 Lot Size | 💰 LCP | 📈 LTP |
|---|---|---|---|---|
| NSEEQ | ACC | - | 102 | 110 |
| NSEFO | TCS | 300 | 215 | 210 |
| 📊 Seg | 🔧 Inst | 📅 Exp. | 💲 Stk. Price | 🎯 Opt. Type | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV |
|---|---|---|---|---|---|---|---|---|---|---|---|
| NSEEQ | - | - | - | - | ACC | 50 | 100 | 5000 | 30 | 120 | 3600 |
| NSEFO | FUTSTK | Exp1 | - | - | TCS | 300 | 210 | 63000 | 600 | 200 | 120000 |
In this case, 20 Buy Open Position is available in NSEEQ ACC and 300 Sell Open Position in NSEFO TCS
System should consider Daily Average Price for Daily Open Position (i.e. ACC: 100, TCS: 200)
MTM P/L of NSEEQ-ACC = (20 * (110 - 100)) = 20 * 10 = 200 (i.e. MTM Profit: 200, MTM Loss: 0)
MTM P/L of NSEFO-TCS = (-300 * (210 - 200)) = -300 * 10 = -3000 (i.e. MTM Profit: 0, MTM Loss: -3000)
Case 4: In continuous to case 3 Consider Squaring off the Buy Open Position against NSEEQ-ACC and Buy Position and Sell Open position against NSEFO-TCS
Assume
| 📊 Seg | 📦 Cont. | 📏 Lot Size | 💰 LCP | 📈 LTP |
|---|---|---|---|---|
| NSEEQ | ACC | - | 102 | 110 |
| NSEFO | TCS | 300 | 210 | 220 |
| 📊 Seg | 🔧 Inst | 📅 Exp. | 💲 Stk. Price | 🎯 Opt. Type | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV |
|---|---|---|---|---|---|---|---|---|---|---|---|
| NSEEQ | - | - | - | - | ACC | 50 | 100 | 5000 | 50 | 120 | 3600 |
| NSEFO | FUTSTK | Exp1 | - | - | TCS | 600 | 210 | 63000 | 600 | 200 | 120000 |
In this case, 0 Open Position is available in NSEEQ ACC and in NSEFO TCS
As no open position is available in the contracts. So MTM Profit/Loss in this case should be '0'
Case 5: Position Conversion with Partial Qty
Assume
| 📊 Seg | 📦 Cont. | 📏 Lot Size | 💰 LCP | 📈 LTP |
|---|---|---|---|---|
| NSEEQ | ACC | - | 102 | 110 |
Assume following position available
| 📊 Seg | 🔧 Prod | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV |
|---|---|---|---|---|---|---|---|---|
| NSEEQ | Margin | ACC | 50 | 100 | 5000 | 20 | 120 | 2400 |
| NSEEQ | Delivery | ACC | 30 | 105 | 3150 | 70 | 108 | 7560 |
In this case, 30 Buy open Position is in NSEEQ ACC-Margin and 40 Sell Open Position in NSE-EQ ACC-Delivery
MTM P/L of NSEEQ-ACC-Margin = (30 * (110 - 100)) = 30 * 10 = 300 (i.e. MTM Profit: 300, MTM Loss: 0)
MTM P/L of NSEEQ-ACC-Delivery = (-40 * (110 - 108)) = -40 * 2 = -80 (i.e. MTM Profit: 0, MTM Loss: -80)
Now, Perform Position conversion
Convert 20 Qty of Sell Position from Delivery to Margin Product Type
Accordingly, available position shall be
| 📊 Seg | 🔧 Prod | 📦 Cont. | 📈 OBQ | 💰 OBP | 💵 OBV | 📉 OSQ | 💰 OSP | 💵 OSV |
|---|---|---|---|---|---|---|---|---|
| NSEEQ | Margin | ACC | 50 | 100 | 5000 | 40 | 120 | 2400 |
| NSEFO | Delivery | ACC | 30 | 105 | 3150 | 50 | 108 | 7560 |
After position conversion, 10 Buy open Position is in NSEEQ ACC-Margin and 20 Sell Open Position in NSE-EQ ACC-Delivery
MTM P/L of NSEEQ-ACC-Margin = (10 * (110 - 100)) = 10 * 10 = 100 (i.e. MTM Profit: 100, MTM Loss: 0)
MTM P/L of NSEEQ-ACC-Delivery = (-20 * (110 - 108)) = -20 * 2 = -40 (i.e. MTM Profit: 0, MTM Loss: -80)
Case 6: Impact of Position Conversion in MTM Profit / Loss with uploaded position and Master Config key configuration
Following keys shall have impact on MTM Calculation, assume
| 📝 Menu | 🔑 Key | 💡 Value |
|---|---|---|
| Master config> Prod: Margin>> Equity | Uploaded Buy Position Value | 1- Uploaded Price |
| Master config> Prod: Margin>> Equity | Uploaded Sell Position Value | 1- Uploaded Price |
| Master config> Prod: Delivery>> Equity | Uploaded Buy Position Value | 2- LCP |
| Master config> Prod: Delivery>> Equity | Uploaded Sell Position Value | 2- LCP |
| Master config> Prod: Intra>> Future | Uploaded Buy Position Value | 3- Uploaded Price |
| Master config> Prod: Intra>> Future | Uploaded Sell Position Value | 3- Uploaded Price |
| Master config> Prod: Carry>> Future | Uploaded Buy Position Value | 4- LCP |
| Master config> Prod: Carry>> Future | Uploaded Sell Position Value | 4- LCP |
| # | 📦 Cont. | 📊 Seg | 🔧 Inst. | 📅 EXP. | 💲 Stk. Price | 🎯 Opt. Type | 📦 Cont. | 📏 Lot Size | 💰 LCP | 📈 LTP |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | NSEEQ | - | - | - | - | ACC | - | 102 | 110 | |
| 2 | NSEFO | FUTSTK | EXP1 | - | - | TCS | 300 | 210 | 220 |
Assume following Position is available for Investor CLI1
| # | 📦 Contract Info | 📈 Expiry Position | 📊 Daily Position | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| # | 📦 Con | 📊 Seg. | 📦 Cont. | 🔧 Prod | 📈 EBQ | 💰 EBP | 💵 EBV |