What-if REST endpoints
Supported What-If Operations
Endpoint: /whatif/supported
Method : GET
Example endpoint: http://localhost:10010/mr-application/services/rest/v3/whatif/supported
Result is a serialized array of SupportedWhatIfOperationDTOs
Example Result:
{
"status": "success",
"data": [
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenarios].[Scenario]",
"name": "Scenario",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Offset",
"type": "int",
"optional": true,
"main": false
},
{
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
}
],
"name": "Roll over",
"type": "PNL_VECTOR_ROLLOVER",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-vector-substitution"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Scaling",
"type": "PNL_VECTOR_SCALING",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-vector-scaling"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenarios].[Scenario]",
"name": "Scenario",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Scenario Scaling",
"type": "PNL_VECTOR_SCENARIO_SCALING",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-scenario-scaling"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Books].[Book]",
"name": "Book",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Book Scaling",
"type": "PNL_VECTOR_BOOK_SCALING",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-book-scaling"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Books].[Book]",
"name": "Book",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "Delta Book Scaling",
"type": "DELTA_BOOK_SCALING",
"cube": "Sensitivity Cube",
"stores": [
"TradeSensitivities"
],
"endpoint": "whatif/delta-book-scaling"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Books].[Book]",
"name": "Book",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "Delta Book Addon",
"type": "DELTA_BOOK_ADDON",
"cube": "Sensitivity Cube",
"stores": [
"TradeSensitivities"
],
"endpoint": "whatif/delta-book-addon"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
}
],
"name": "Roll over",
"type": "DELTA_ROLLOVER",
"cube": "Sensitivity Cube",
"stores": [
"TradeSensitivities"
],
"endpoint": "whatif/delta-vector-substitution"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "Delta Scaling",
"type": "DELTA_SCALING",
"cube": "Sensitivity Cube",
"stores": [
"TradeSensitivities"
],
"endpoint": "whatif/delta-vector-addon"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenarios].[Scenario]",
"name": "Scenario",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Scenario Addon",
"type": "PNL_VECTOR_SCENARIO_ADDON",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-scenario-addon"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "Delta Addon",
"type": "DELTA_ADD_ON",
"cube": "Sensitivity Cube",
"stores": [
"TradeSensitivities"
],
"endpoint": "whatif/delta-vector-addon"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Books].[Book]",
"name": "Book",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Book Addon",
"type": "PNL_VECTOR_BOOK_ADDON",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-book-addon"
},
{
"filters": [
{
"levelPath": "[Epoch].[Epoch].[Branch]",
"name": "Branch",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Risk Factors].[RiskFactor]",
"name": "RiskFactorId",
"type": "string",
"optional": true,
"main": true
},
{
"levelPath": "[Dates].[Date].[AsOfDate]",
"name": "AsOfDate",
"type": "localDate[yyyy-MM-dd]",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[CalculationIds].[CalculationId]",
"name": "CalculationId",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Risk].[Scenario Sets].[Scenario Set]",
"name": "Scenario Set",
"type": "string",
"optional": false,
"main": true
},
{
"levelPath": "[Booking].[Trades].[TradeId]",
"name": "TradeId",
"type": "string",
"optional": false,
"main": true
}
],
"input": [
{
"name": "Values",
"type": "double",
"optional": false,
"main": true
}
],
"name": "PnL Addon",
"type": "PNL_VECTOR_ADDON",
"cube": "VaR-ES Cube",
"stores": [
"TradePnLs"
],
"endpoint": "whatif/pnl-vector-addon"
}
]
}
What-If Execution Services
VaR-ES Cube Scenario Add-on
- URL: whatif/pnl-scenario-addon
- Sample input:
{
"key" : "DELTA_BOOK_ADDON",
"user" : "User",
"filters" : [ {
"name" : "CalculationId",
"value" : "calculationId"
}, {
"name" : "Scenario",
"value" : "scenario1"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "20.0"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Scenario Scaling
- URL: whatif/pnl-scenario-scaling
- Sample input:
{
"key" : "DELTA_BOOK_SCALING",
"user" : "User",
"filters" : [ {
"name" : "CalculationId",
"value" : "calculationId"
}, {
"name" : "Scenario",
"value" : "scenario1"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "1.1"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Book Add-on
- URL: whatif/pnl-book-addon
- Sample input:
{
"key" : "PNL_VECTOR_BOOK_ADDON",
"user" : "User",
"filters" : [ {
"name" : "Book",
"value" : "Book"
}, {
"name" : "CalculationId",
"value" : "calculation"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "20.0"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Book Scaling
- URL: whatif/pnl-book-scaling
- Sample input:
{
"key" : "PNL_VECTOR_BOOK_SCALING",
"user" : "User",
"filters" : [ {
"name" : "Book",
"value" : "Book"
}, {
"name" : "CalculationId",
"value" : "calculation"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "1.1"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Trade Add-on
- URL: whatif/pnl-vector-addon
- Sample input:
{
"key" : "PNL_VECTOR_ADDON",
"user" : "User",
"filters" : [ {
"name" : "CalculationId",
"value" : "calculation"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "20.0"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Trade Scaling
- URL: whatif/pnl-vector-scaling
- Sample input:
{
"key" : "PNL_VECTOR_SCALING",
"user" : "User",
"filters" : [ {
"name" : "CalculationId",
"value" : "calculation"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "1.1"
} ],
"toBranch" : "branch1"
}
VaR-ES Cube Roll-over
- URL: whatif/pnl-vector-substitution
- Sample input:
{
"key" : "PNL_VECTOR_ROLLOVER",
"user" : "User",
"filters" : [ {
"name" : "CalculationId",
"value" : "calculationId"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Scenario Set",
"value" : "Historical"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "AsOfDate",
"value" : "2018-01-29"
}, {
"name" : "Offset",
"value" : "0"
} ],
"toBranch" : "branch1"
}
Sensitivity Cube Delta Book Add-on
- URL: whatif/delta-book-addon
- Sample input:
{
"key" : "DELTA_BOOK_ADDON",
"user" : "User",
"filters" : [ {
"name" : "Book",
"value" : "book"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "20.0"
} ],
"toBranch" : "branch1"
}
Sensitivity Cube Delta Book Scaling
- URL: whatif/delta-book-scaling
- Sample input:
{
"key" : "DELTA_BOOK_SCALING",
"user" : "User",
"filters" : [ {
"name" : "Book",
"value" : "book"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "1.1"
} ],
"toBranch" : "branch1"
}
Sensitivity Cube Delta Add-on
- URL: whatif/delta-vector-addon
- Sample input:
{
"key" : "DELTA_ADD_ON",
"user" : "User",
"filters" : [ {
"name" : "Branch",
"value" : "master"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "20.0"
} ],
"toBranch" : "branch1"
}
Sensitivity Cube Delta Scaling
- URL: whatif/delta-vector-scaling
- Sample input:
{
"key" : "DELTA_SCALING",
"user" : "User",
"filters" : [ {
"name" : "Branch",
"value" : "master"
}, {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "Values",
"value" : "1.1"
} ],
"toBranch" : "branch1"
}
Sensitivity Cube Delta Roll-over
- URL: whatif/delta-vector-substitution
- Sample input:
{
"key" : "DELTA_ROLLOVER",
"user" : "user",
"filters" : [ {
"name" : "TradeId",
"value" : "trade1"
}, {
"name" : "Branch",
"value" : "master"
}, {
"name" : "AsOfDate",
"value" : "2018-01-30"
}, {
"name" : "RiskFactorId",
"value" : "riskFactor"
} ],
"input" : [ {
"name" : "AsOfDate",
"value" : "2018-01-29"
} ],
"toBranch" : "branch1"
}