UserRateOverride
Records in this table override SpiderRock global discount rate values in option pricing calculations.\nNote: Expiry dates that fall between years values below will be interpolated using a cubic spline on (days * rate)
METADATA
Attribute | Value |
---|---|
Topic | 3585-option-pricing |
MLink Token | SystemData |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
clientFirm | VARCHAR(16) | PRI | '' | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | ||
text | TINYTEXT | '' | user detail if any | |
CurveList | JSON | 'JSON_OBJECT()' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
clientFirm | 1 |
JSON Block (CurveList)
Field | Type | Comment |
---|---|---|
days | int | calendar days to expiration actual365 days per year |
rate | float | |
lnRate | float | |
shRate | float |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgUserRateOverride` (
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`text` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user detail (if any)',
`CurveList` JSON NOT NULL DEFAULT JSON_OBJECT() CHECK(JSON_VALID(CurveList)),
PRIMARY KEY USING HASH (`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records in this table override SpiderRock global discount rate values in option pricing calculations.\nNote: Expiry dates that fall between years values below will be interpolated using a cubic spline on (days * rate)';
SELECT TABLE EXAMPLE QUERY
SELECT
`clientFirm`,
`timestamp`,
`text`,
`CurveList`
FROM `SRControl`.`MsgUserRateOverride`
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgUserRateOverride`
SET
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYTEXT */
`text` = 'dummy tiny text',
/* Replace with a JSON */
`CurveList` = '{"key": "value"}'
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgUserRateOverride`(
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYTEXT */
`text`,
/* Replace with a JSON */
`CurveList`
)
VALUES(
'Example_clientFirm',
'2022-01-01 12:34:56.000000',
'dummy tiny text',
'{"key": "value"}'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgUserRateOverride`
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='UserRateOverride' ORDER BY ordinal_position ASC;