@vuu-ui/vuu-data-test 0.13.12 → 0.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/simul/reference-data/parent-child-orders.js +11 -6
- package/cjs/simul/reference-data/parent-child-orders.js.map +1 -1
- package/cjs/simul/reference-data/prices.js +22 -2
- package/cjs/simul/reference-data/prices.js.map +1 -1
- package/cjs/simul/simul-schemas.js +9 -5
- package/cjs/simul/simul-schemas.js.map +1 -1
- package/esm/simul/reference-data/parent-child-orders.js +11 -6
- package/esm/simul/reference-data/parent-child-orders.js.map +1 -1
- package/esm/simul/reference-data/prices.js +22 -2
- package/esm/simul/reference-data/prices.js.map +1 -1
- package/esm/simul/simul-schemas.js +9 -5
- package/esm/simul/simul-schemas.js.map +1 -1
- package/package.json +6 -6
- package/types/simul/reference-data/prices.d.ts +7 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var vuuUtils = require('@vuu-ui/vuu-utils');
|
|
3
4
|
var dataUtils = require('../../data-utils.js');
|
|
4
5
|
var Table = require('../../Table.js');
|
|
5
6
|
var simulSchemas = require('../simul-schemas.js');
|
|
@@ -18,10 +19,11 @@ const avgChildOrderPerOrder = Math.round(
|
|
|
18
19
|
CHILD_ORDER_COUNT / PARENT_ORDER_COUNT
|
|
19
20
|
);
|
|
20
21
|
const childMaxMultiple = 10;
|
|
22
|
+
const clock = new vuuUtils.Clock({ year: 2025, month: 4, day: 15, hours: 8 });
|
|
21
23
|
const start = performance.now();
|
|
22
24
|
let childOrderId = 0;
|
|
23
25
|
for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
24
|
-
|
|
26
|
+
clock.advance(dataUtils.random(0, 100));
|
|
25
27
|
const instrument = instruments.instrumentsData[dataUtils.random(0, instruments.instrumentsData.length - 1)];
|
|
26
28
|
const orderQuantity = 1e3 * dataUtils.random(1, 100);
|
|
27
29
|
const orderStatus$1 = orderStatus.orderStatus[dataUtils.random(0, orderStatus.orderStatus.length - 1)];
|
|
@@ -34,13 +36,14 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
34
36
|
const exchange = instrument[instrumentMap.exchange];
|
|
35
37
|
const parentOrderIdAsInt = i;
|
|
36
38
|
const parentOrderId = `${parentOrderIdAsInt}`;
|
|
37
|
-
const lastUpdate = now;
|
|
38
39
|
const price = 100;
|
|
39
40
|
const quantity = orderQuantity;
|
|
40
41
|
const ric = instrument[instrumentMap.ric];
|
|
41
42
|
const side = sides.sides[dataUtils.random(0, sides.sides.length - 1)];
|
|
42
43
|
const status = orderStatus$1;
|
|
43
44
|
const volLimit = 100;
|
|
45
|
+
const lastUpdate = clock.now;
|
|
46
|
+
const created = clock.now;
|
|
44
47
|
const childOrderCount = dataUtils.random(
|
|
45
48
|
0,
|
|
46
49
|
avgChildOrderPerOrder * dataUtils.random(1, childMaxMultiple)
|
|
@@ -66,7 +69,6 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
66
69
|
childFilledQty,
|
|
67
70
|
childId,
|
|
68
71
|
childIdAsInt,
|
|
69
|
-
lastUpdate2,
|
|
70
72
|
childOpenQty,
|
|
71
73
|
parentOrderId,
|
|
72
74
|
price2,
|
|
@@ -75,7 +77,9 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
75
77
|
side,
|
|
76
78
|
childOrderStatus,
|
|
77
79
|
strategy,
|
|
78
|
-
volLimit
|
|
80
|
+
volLimit,
|
|
81
|
+
lastUpdate2,
|
|
82
|
+
created
|
|
79
83
|
];
|
|
80
84
|
childOrderData.push(row2);
|
|
81
85
|
}
|
|
@@ -89,14 +93,15 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
89
93
|
filledQty,
|
|
90
94
|
parentOrderId,
|
|
91
95
|
parentOrderIdAsInt,
|
|
92
|
-
lastUpdate,
|
|
93
96
|
openQty,
|
|
94
97
|
price,
|
|
95
98
|
quantity,
|
|
96
99
|
ric,
|
|
97
100
|
side,
|
|
98
101
|
status,
|
|
99
|
-
volLimit
|
|
102
|
+
volLimit,
|
|
103
|
+
lastUpdate,
|
|
104
|
+
created
|
|
100
105
|
];
|
|
101
106
|
parentOrderData.push(row);
|
|
102
107
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-child-orders.js","sources":["../../../src/simul/reference-data/parent-child-orders.ts"],"sourcesContent":["import { VuuRowDataItemType } from \"@vuu-ui/vuu-protocol-types\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\nimport { accounts } from \"./accounts\";\nimport { instrumentsData } from \"./instruments\";\nimport { orderStatus as statusValues } from \"./orderStatus\";\nimport { sides } from \"./sides\";\nimport { algos } from \"./algos\";\n\nconst childOrderData: VuuRowDataItemType[][] = [];\nconst parentOrderData: VuuRowDataItemType[][] = [];\n\nconst instrumentMap = buildDataColumnMap(schemas, \"instruments\");\n\nconst PARENT_ORDER_COUNT = 75_000;\nconst CHILD_ORDER_COUNT = 200_000;\n\nconst avgChildOrderPerOrder = Math.round(\n CHILD_ORDER_COUNT / PARENT_ORDER_COUNT,\n);\nconst childMaxMultiple = 10;\n\nconst start = performance.now();\n\nlet childOrderId = 0;\n\nfor (let i = 0; i < PARENT_ORDER_COUNT; i++) {\n
|
|
1
|
+
{"version":3,"file":"parent-child-orders.js","sources":["../../../src/simul/reference-data/parent-child-orders.ts"],"sourcesContent":["import { VuuRowDataItemType } from \"@vuu-ui/vuu-protocol-types\";\nimport { Clock } from \"@vuu-ui/vuu-utils\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\nimport { accounts } from \"./accounts\";\nimport { instrumentsData } from \"./instruments\";\nimport { orderStatus as statusValues } from \"./orderStatus\";\nimport { sides } from \"./sides\";\nimport { algos } from \"./algos\";\n\nconst childOrderData: VuuRowDataItemType[][] = [];\nconst parentOrderData: VuuRowDataItemType[][] = [];\n\nconst instrumentMap = buildDataColumnMap(schemas, \"instruments\");\n\nconst PARENT_ORDER_COUNT = 75_000;\nconst CHILD_ORDER_COUNT = 200_000;\n\nconst avgChildOrderPerOrder = Math.round(\n CHILD_ORDER_COUNT / PARENT_ORDER_COUNT,\n);\nconst childMaxMultiple = 10;\n\nconst clock = new Clock({ year: 2025, month: 4, day: 15, hours: 8 });\n\nconst start = performance.now();\n\nlet childOrderId = 0;\n\nfor (let i = 0; i < PARENT_ORDER_COUNT; i++) {\n clock.advance(random(0, 100));\n const instrument = instrumentsData[random(0, instrumentsData.length - 1)];\n\n const orderQuantity = 1000 * random(1, 100);\n const orderStatus = statusValues[random(0, statusValues.length - 1)];\n const filledQty =\n orderStatus === \"FILLED\"\n ? orderQuantity\n : orderStatus === \"NEW\"\n ? 0\n : orderQuantity - random(100, orderQuantity);\n const openQty = orderQuantity - filledQty;\n\n const account = accounts[random(0, accounts.length - 1)];\n const algo = algos[random(0, algos.length - 1)];\n const averagePrice = 0;\n const ccy = \"GBP\";\n const exchange = instrument[instrumentMap.exchange];\n const parentOrderIdAsInt = i;\n const parentOrderId = `${parentOrderIdAsInt}`;\n const price = 100;\n const quantity = orderQuantity;\n const ric = instrument[instrumentMap.ric];\n const side = sides[random(0, sides.length - 1)];\n const status = orderStatus;\n const volLimit = 100;\n const lastUpdate = clock.now;\n const created = clock.now;\n\n const childOrderCount = random(\n 0,\n avgChildOrderPerOrder * random(1, childMaxMultiple),\n );\n\n let remainingQty = orderQuantity;\n for (let j = 0; j < childOrderCount; j++) {\n // console.log(`create child`);\n\n const childOrderQuantity = Math.round(remainingQty / (childOrderCount - j));\n remainingQty -= childOrderQuantity;\n const childOrderStatus = statusValues[random(0, statusValues.length - 1)];\n const childFilledQty =\n orderStatus === \"FILLED\"\n ? childOrderQuantity\n : childOrderStatus === \"NEW\"\n ? 0\n : childOrderQuantity - random(100, childOrderQuantity);\n const childOpenQty = childOrderQuantity - childFilledQty;\n\n const averagePrice = 0;\n const childIdAsInt = childOrderId++;\n const childId = `${childIdAsInt}`;\n const lastUpdate = 0;\n const price = 100;\n const strategy = 0;\n\n const row: VuuRowDataItemType[] = [\n account,\n averagePrice,\n ccy,\n exchange,\n childFilledQty,\n childId,\n childIdAsInt,\n childOpenQty,\n parentOrderId,\n price,\n childOrderQuantity,\n ric,\n side,\n childOrderStatus,\n strategy,\n volLimit,\n lastUpdate,\n created,\n ];\n\n childOrderData.push(row);\n }\n\n const row: VuuRowDataItemType[] = [\n account,\n algo,\n averagePrice,\n ccy,\n childOrderCount,\n exchange,\n filledQty,\n parentOrderId,\n parentOrderIdAsInt,\n openQty,\n price,\n quantity,\n ric,\n side,\n status,\n volLimit,\n lastUpdate,\n created,\n ];\n\n parentOrderData.push(row);\n}\nconst end = performance.now();\n\nconsole.log(\n `took ${end - start} to create ${parentOrderData.length} orders and ${childOrderData.length} child orders`,\n);\n\nexport const parentOrdersTable = new Table(\n schemas.parentOrders,\n parentOrderData,\n buildDataColumnMap(schemas, \"parentOrders\"),\n);\n\nexport const childOrdersTable = new Table(\n schemas.childOrders,\n childOrderData,\n buildDataColumnMap(schemas, \"childOrders\"),\n);\n\nexport { childOrderData, parentOrderData };\n"],"names":["buildDataColumnMap","schemas","Clock","random","instrumentsData","orderStatus","statusValues","accounts","algos","sides","averagePrice","lastUpdate","price","row","Table"],"mappings":";;;;;;;;;;;;AAWA,MAAM,iBAAyC;AAC/C,MAAM,kBAA0C;AAEhD,MAAM,aAAA,GAAgBA,wBAAmB,CAAAC,oBAAA,EAAS,aAAa,CAAA;AAE/D,MAAM,kBAAqB,GAAA,IAAA;AAC3B,MAAM,iBAAoB,GAAA,GAAA;AAE1B,MAAM,wBAAwB,IAAK,CAAA,KAAA;AAAA,EACjC,iBAAoB,GAAA;AACtB,CAAA;AACA,MAAM,gBAAmB,GAAA,EAAA;AAEzB,MAAM,KAAQ,GAAA,IAAIC,cAAM,C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A,EACR,eAAA;AAAA,EACAD,wBAAA,CAAmBC,sBAAS,cAAc;AAC5C;AAEO,MAAM,mBAAmB,IAAIa,WAAA;AAAA,EAClCb,oBAAQ,CAAA,WAAA;AAAA,EACR,cAAA;AAAA,EACAD,wBAAA,CAAmBC,sBAAS,aAAa;AAC3C;;;;;;;"}
|
|
@@ -14,6 +14,9 @@ const pricesUpdateGenerator = new UpdateGenerator.BaseUpdateGenerator({
|
|
|
14
14
|
ask,
|
|
15
15
|
askSize
|
|
16
16
|
});
|
|
17
|
+
const now = Date.now();
|
|
18
|
+
const lastUpdate = now;
|
|
19
|
+
const created = now;
|
|
17
20
|
const requiredInstrumentFields = ["ric", "price"];
|
|
18
21
|
const pricesData = instruments.instrumentsData.map((instrument) => {
|
|
19
22
|
const { ric, price: priceSeed } = requiredInstrumentFields.reduce(
|
|
@@ -30,7 +33,22 @@ const pricesData = instruments.instrumentsData.map((instrument) => {
|
|
|
30
33
|
const open = priceSeed + dataUtils.random(0, 1) / 10;
|
|
31
34
|
const phase = "C";
|
|
32
35
|
const scenario = "close";
|
|
33
|
-
|
|
36
|
+
const lastUpdate2 = now;
|
|
37
|
+
const created2 = now;
|
|
38
|
+
return [
|
|
39
|
+
ask2,
|
|
40
|
+
askSize2,
|
|
41
|
+
bid2,
|
|
42
|
+
bidSize2,
|
|
43
|
+
close,
|
|
44
|
+
last,
|
|
45
|
+
open,
|
|
46
|
+
phase,
|
|
47
|
+
ric,
|
|
48
|
+
scenario,
|
|
49
|
+
lastUpdate2,
|
|
50
|
+
created2
|
|
51
|
+
];
|
|
34
52
|
});
|
|
35
53
|
for (const [, , , lastTrade, ric] of constituents) {
|
|
36
54
|
const priceSeed = parseFloat(String(lastTrade));
|
|
@@ -55,7 +73,9 @@ for (const [, , , lastTrade, ric] of constituents) {
|
|
|
55
73
|
open,
|
|
56
74
|
phase,
|
|
57
75
|
ric,
|
|
58
|
-
scenario
|
|
76
|
+
scenario,
|
|
77
|
+
lastUpdate,
|
|
78
|
+
created
|
|
59
79
|
]);
|
|
60
80
|
}
|
|
61
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.js","sources":["../../../src/simul/reference-data/prices.ts"],"sourcesContent":["import { buildDataColumnMap, Table } from \"../../Table\";\nimport { BaseUpdateGenerator } from \"../../UpdateGenerator\";\nimport { schemas } from \"../simul-schemas\";\nimport { instrumentsData, InstrumentColumnMap } from \"./instruments\";\nimport { random } from \"../../data-utils\";\nimport basketConstituentData from \"../../basket/reference-data/constituents\";\n\ntype ask = number;\ntype askSize = number;\ntype bid = number;\ntype bidSize = number;\ntype close = number;\ntype last = number;\ntype open = number;\ntype phase = \"C\";\ntype ric = string;\ntype scenario = \"close\";\n\nexport type PricesDataRow = [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario
|
|
1
|
+
{"version":3,"file":"prices.js","sources":["../../../src/simul/reference-data/prices.ts"],"sourcesContent":["import { buildDataColumnMap, Table } from \"../../Table\";\nimport { BaseUpdateGenerator } from \"../../UpdateGenerator\";\nimport { schemas } from \"../simul-schemas\";\nimport { instrumentsData, InstrumentColumnMap } from \"./instruments\";\nimport { random } from \"../../data-utils\";\nimport basketConstituentData from \"../../basket/reference-data/constituents\";\n\ntype ask = number;\ntype askSize = number;\ntype bid = number;\ntype bidSize = number;\ntype close = number;\ntype last = number;\ntype open = number;\ntype phase = \"C\";\ntype ric = string;\ntype scenario = \"close\";\ntype lastUpdate = number;\ntype created = number;\n\nexport type PricesDataRow = [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario,\n lastUpdate,\n created,\n];\n\nconst { bid, bidSize, ask, askSize } = buildDataColumnMap(schemas, \"prices\");\nconst pricesUpdateGenerator = new BaseUpdateGenerator({\n bid,\n bidSize,\n ask,\n askSize,\n});\n\nconst now = Date.now();\nconst lastUpdate = now;\nconst created = now;\n\n// const start = performance.now();\n// Create 100_000 Instruments\nconst requiredInstrumentFields = [\"ric\", \"price\"] as const;\nconst pricesData: Array<PricesDataRow> = instrumentsData.map((instrument) => {\n const { ric, price: priceSeed } = requiredInstrumentFields.reduce(\n (obj, f) => ({ ...obj, [f]: instrument[InstrumentColumnMap[f]] }),\n {} as { ric: string; price: number },\n );\n const spread = random(0, 10);\n\n const ask = priceSeed + spread / 2;\n const askSize = random(1000, 3000);\n const bid = priceSeed - spread / 2;\n const bidSize = random(1000, 3000);\n const close = priceSeed + random(0, 1) / 10;\n const last = priceSeed + random(0, 1) / 10;\n const open = priceSeed + random(0, 1) / 10;\n const phase = \"C\";\n const scenario = \"close\";\n const lastUpdate = now;\n const created = now;\n return [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario,\n lastUpdate,\n created,\n ];\n});\n\n// prettier-ignore\nfor (const [,,,lastTrade,ric] of basketConstituentData) {\n const priceSeed = parseFloat(String(lastTrade));\n if (!isNaN(priceSeed)) {\n const spread = random(0, 10);\n const ask = priceSeed + spread / 2;\n const askSize = random(1000, 3000);\n const bid = priceSeed - spread / 2;\n const bidSize = random(1000, 3000);\n const close = priceSeed + random(0, 1) / 10;\n const last = priceSeed + random(0, 1) / 10;\n const open = priceSeed + random(0, 1) / 10;\n const phase = \"C\";\n const scenario = \"close\";\n pricesData.push([\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric as string,\n scenario,\n lastUpdate,\n created\n ]);\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 100,000 prices took ${end - start} ms`);\n\nexport const pricesTable = new Table(\n schemas.prices,\n pricesData,\n buildDataColumnMap(schemas, \"prices\"),\n pricesUpdateGenerator,\n);\n\nexport { pricesData };\n"],"names":["buildDataColumnMap","schemas","BaseUpdateGenerator","instrumentsData","InstrumentColumnMap","random","ask","askSize","bid","bidSize","lastUpdate","created","basketConstituentData","Table"],"mappings":";;;;;;;;;AAmCA,MAAM,EAAE,KAAK,OAAS,EAAA,GAAA,EAAK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,IAAA,MAAM,KAAQ,GAAA,GAAA;AACd,IAAA,MAAM,QAAW,GAAA,OAAA;AACjB,IAAA,UAAA,CAAW,IAAK,CAAA;AAAA,MACdC,IAAAA;AAAA,MACAC,QAAAA;AAAA,MACAC,IAAAA;AAAA,MACAC,QAAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA;AAEL;AAKO,MAAM,cAAc,IAAII,WAAA;AAAA,EAC7BZ,oBAAQ,CAAA,MAAA;AAAA,EACR,UAAA;AAAA,EACAD,wBAAA,CAAmBC,sBAAS,QAAQ,CAAA;AAAA,EACpC;AACF;;;;;"}
|
|
@@ -80,7 +80,6 @@ const schemas = {
|
|
|
80
80
|
{ name: "filledQty", serverDataType: "double" },
|
|
81
81
|
{ name: "id", serverDataType: "string" },
|
|
82
82
|
{ name: "idAsInt", serverDataType: "int" },
|
|
83
|
-
{ name: "lastUpdate", serverDataType: "long" },
|
|
84
83
|
{ name: "openQty", serverDataType: "double" },
|
|
85
84
|
{ name: "parentOrderId", serverDataType: "string" },
|
|
86
85
|
{ name: "price", serverDataType: "double" },
|
|
@@ -89,7 +88,9 @@ const schemas = {
|
|
|
89
88
|
{ name: "side", serverDataType: "string" },
|
|
90
89
|
{ name: "status", serverDataType: "string" },
|
|
91
90
|
{ name: "strategy", serverDataType: "string" },
|
|
92
|
-
{ name: "volLimit", serverDataType: "int" }
|
|
91
|
+
{ name: "volLimit", serverDataType: "int" },
|
|
92
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
93
|
+
{ name: "created", serverDataType: "long" }
|
|
93
94
|
],
|
|
94
95
|
key: "id",
|
|
95
96
|
table: { module: "SIMUL", table: "childOrders" }
|
|
@@ -105,14 +106,15 @@ const schemas = {
|
|
|
105
106
|
{ name: "filledQty", serverDataType: "double" },
|
|
106
107
|
{ name: "id", serverDataType: "string" },
|
|
107
108
|
{ name: "idAsInt", serverDataType: "int" },
|
|
108
|
-
{ name: "lastUpdate", serverDataType: "long" },
|
|
109
109
|
{ name: "openQty", serverDataType: "double" },
|
|
110
110
|
{ name: "price", serverDataType: "double" },
|
|
111
111
|
{ name: "quantity", serverDataType: "double" },
|
|
112
112
|
{ name: "ric", serverDataType: "string" },
|
|
113
113
|
{ name: "side", serverDataType: "string" },
|
|
114
114
|
{ name: "status", serverDataType: "string" },
|
|
115
|
-
{ name: "volLimit", serverDataType: "int" }
|
|
115
|
+
{ name: "volLimit", serverDataType: "int" },
|
|
116
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
117
|
+
{ name: "created", serverDataType: "long" }
|
|
116
118
|
],
|
|
117
119
|
key: "id",
|
|
118
120
|
table: { module: "SIMUL", table: "parentOrders" }
|
|
@@ -129,7 +131,9 @@ const schemas = {
|
|
|
129
131
|
{ name: "open", serverDataType: "double" },
|
|
130
132
|
{ name: "phase", serverDataType: "string" },
|
|
131
133
|
{ name: "ric", serverDataType: "string" },
|
|
132
|
-
{ name: "scenario", serverDataType: "string" }
|
|
134
|
+
{ name: "scenario", serverDataType: "string" },
|
|
135
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
136
|
+
{ name: "created", serverDataType: "long" }
|
|
133
137
|
],
|
|
134
138
|
key: "ric",
|
|
135
139
|
table: { module: "SIMUL", table: "prices" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":";;AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,M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MACxC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC5C,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS;AAAA;AAE9C;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":";;AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS;AAAA,KAC1C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ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;AAAA,MACxC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC5C,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,YAAc,EAAA,cAAA,EAAgB,MAAO,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,MAAO;AAAA,KAC5C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS;AAAA;AAE9C;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Clock } from '@vuu-ui/vuu-utils';
|
|
1
2
|
import { random } from '../../data-utils.js';
|
|
2
3
|
import { buildDataColumnMap, Table } from '../../Table.js';
|
|
3
4
|
import { schemas } from '../simul-schemas.js';
|
|
@@ -16,10 +17,11 @@ const avgChildOrderPerOrder = Math.round(
|
|
|
16
17
|
CHILD_ORDER_COUNT / PARENT_ORDER_COUNT
|
|
17
18
|
);
|
|
18
19
|
const childMaxMultiple = 10;
|
|
20
|
+
const clock = new Clock({ year: 2025, month: 4, day: 15, hours: 8 });
|
|
19
21
|
const start = performance.now();
|
|
20
22
|
let childOrderId = 0;
|
|
21
23
|
for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
22
|
-
|
|
24
|
+
clock.advance(random(0, 100));
|
|
23
25
|
const instrument = instrumentsData[random(0, instrumentsData.length - 1)];
|
|
24
26
|
const orderQuantity = 1e3 * random(1, 100);
|
|
25
27
|
const orderStatus$1 = orderStatus[random(0, orderStatus.length - 1)];
|
|
@@ -32,13 +34,14 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
32
34
|
const exchange = instrument[instrumentMap.exchange];
|
|
33
35
|
const parentOrderIdAsInt = i;
|
|
34
36
|
const parentOrderId = `${parentOrderIdAsInt}`;
|
|
35
|
-
const lastUpdate = now;
|
|
36
37
|
const price = 100;
|
|
37
38
|
const quantity = orderQuantity;
|
|
38
39
|
const ric = instrument[instrumentMap.ric];
|
|
39
40
|
const side = sides[random(0, sides.length - 1)];
|
|
40
41
|
const status = orderStatus$1;
|
|
41
42
|
const volLimit = 100;
|
|
43
|
+
const lastUpdate = clock.now;
|
|
44
|
+
const created = clock.now;
|
|
42
45
|
const childOrderCount = random(
|
|
43
46
|
0,
|
|
44
47
|
avgChildOrderPerOrder * random(1, childMaxMultiple)
|
|
@@ -64,7 +67,6 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
64
67
|
childFilledQty,
|
|
65
68
|
childId,
|
|
66
69
|
childIdAsInt,
|
|
67
|
-
lastUpdate2,
|
|
68
70
|
childOpenQty,
|
|
69
71
|
parentOrderId,
|
|
70
72
|
price2,
|
|
@@ -73,7 +75,9 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
73
75
|
side,
|
|
74
76
|
childOrderStatus,
|
|
75
77
|
strategy,
|
|
76
|
-
volLimit
|
|
78
|
+
volLimit,
|
|
79
|
+
lastUpdate2,
|
|
80
|
+
created
|
|
77
81
|
];
|
|
78
82
|
childOrderData.push(row2);
|
|
79
83
|
}
|
|
@@ -87,14 +91,15 @@ for (let i = 0; i < PARENT_ORDER_COUNT; i++) {
|
|
|
87
91
|
filledQty,
|
|
88
92
|
parentOrderId,
|
|
89
93
|
parentOrderIdAsInt,
|
|
90
|
-
lastUpdate,
|
|
91
94
|
openQty,
|
|
92
95
|
price,
|
|
93
96
|
quantity,
|
|
94
97
|
ric,
|
|
95
98
|
side,
|
|
96
99
|
status,
|
|
97
|
-
volLimit
|
|
100
|
+
volLimit,
|
|
101
|
+
lastUpdate,
|
|
102
|
+
created
|
|
98
103
|
];
|
|
99
104
|
parentOrderData.push(row);
|
|
100
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-child-orders.js","sources":["../../../src/simul/reference-data/parent-child-orders.ts"],"sourcesContent":["import { VuuRowDataItemType } from \"@vuu-ui/vuu-protocol-types\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\nimport { accounts } from \"./accounts\";\nimport { instrumentsData } from \"./instruments\";\nimport { orderStatus as statusValues } from \"./orderStatus\";\nimport { sides } from \"./sides\";\nimport { algos } from \"./algos\";\n\nconst childOrderData: VuuRowDataItemType[][] = [];\nconst parentOrderData: VuuRowDataItemType[][] = [];\n\nconst instrumentMap = buildDataColumnMap(schemas, \"instruments\");\n\nconst PARENT_ORDER_COUNT = 75_000;\nconst CHILD_ORDER_COUNT = 200_000;\n\nconst avgChildOrderPerOrder = Math.round(\n CHILD_ORDER_COUNT / PARENT_ORDER_COUNT,\n);\nconst childMaxMultiple = 10;\n\nconst start = performance.now();\n\nlet childOrderId = 0;\n\nfor (let i = 0; i < PARENT_ORDER_COUNT; i++) {\n
|
|
1
|
+
{"version":3,"file":"parent-child-orders.js","sources":["../../../src/simul/reference-data/parent-child-orders.ts"],"sourcesContent":["import { VuuRowDataItemType } from \"@vuu-ui/vuu-protocol-types\";\nimport { Clock } from \"@vuu-ui/vuu-utils\";\nimport { random } from \"../../data-utils\";\nimport { buildDataColumnMap, Table } from \"../../Table\";\nimport { schemas } from \"../simul-schemas\";\nimport { accounts } from \"./accounts\";\nimport { instrumentsData } from \"./instruments\";\nimport { orderStatus as statusValues } from \"./orderStatus\";\nimport { sides } from \"./sides\";\nimport { algos } from \"./algos\";\n\nconst childOrderData: VuuRowDataItemType[][] = [];\nconst parentOrderData: VuuRowDataItemType[][] = [];\n\nconst instrumentMap = buildDataColumnMap(schemas, \"instruments\");\n\nconst PARENT_ORDER_COUNT = 75_000;\nconst CHILD_ORDER_COUNT = 200_000;\n\nconst avgChildOrderPerOrder = Math.round(\n CHILD_ORDER_COUNT / PARENT_ORDER_COUNT,\n);\nconst childMaxMultiple = 10;\n\nconst clock = new Clock({ year: 2025, month: 4, day: 15, hours: 8 });\n\nconst start = performance.now();\n\nlet childOrderId = 0;\n\nfor (let i = 0; i < PARENT_ORDER_COUNT; i++) {\n clock.advance(random(0, 100));\n const instrument = instrumentsData[random(0, instrumentsData.length - 1)];\n\n const orderQuantity = 1000 * random(1, 100);\n const orderStatus = statusValues[random(0, statusValues.length - 1)];\n const filledQty =\n orderStatus === \"FILLED\"\n ? orderQuantity\n : orderStatus === \"NEW\"\n ? 0\n : orderQuantity - random(100, orderQuantity);\n const openQty = orderQuantity - filledQty;\n\n const account = accounts[random(0, accounts.length - 1)];\n const algo = algos[random(0, algos.length - 1)];\n const averagePrice = 0;\n const ccy = \"GBP\";\n const exchange = instrument[instrumentMap.exchange];\n const parentOrderIdAsInt = i;\n const parentOrderId = `${parentOrderIdAsInt}`;\n const price = 100;\n const quantity = orderQuantity;\n const ric = instrument[instrumentMap.ric];\n const side = sides[random(0, sides.length - 1)];\n const status = orderStatus;\n const volLimit = 100;\n const lastUpdate = clock.now;\n const created = clock.now;\n\n const childOrderCount = random(\n 0,\n avgChildOrderPerOrder * random(1, childMaxMultiple),\n );\n\n let remainingQty = orderQuantity;\n for (let j = 0; j < childOrderCount; j++) {\n // console.log(`create child`);\n\n const childOrderQuantity = Math.round(remainingQty / (childOrderCount - j));\n remainingQty -= childOrderQuantity;\n const childOrderStatus = statusValues[random(0, statusValues.length - 1)];\n const childFilledQty =\n orderStatus === \"FILLED\"\n ? childOrderQuantity\n : childOrderStatus === \"NEW\"\n ? 0\n : childOrderQuantity - random(100, childOrderQuantity);\n const childOpenQty = childOrderQuantity - childFilledQty;\n\n const averagePrice = 0;\n const childIdAsInt = childOrderId++;\n const childId = `${childIdAsInt}`;\n const lastUpdate = 0;\n const price = 100;\n const strategy = 0;\n\n const row: VuuRowDataItemType[] = [\n account,\n averagePrice,\n ccy,\n exchange,\n childFilledQty,\n childId,\n childIdAsInt,\n childOpenQty,\n parentOrderId,\n price,\n childOrderQuantity,\n ric,\n side,\n childOrderStatus,\n strategy,\n volLimit,\n lastUpdate,\n created,\n ];\n\n childOrderData.push(row);\n }\n\n const row: VuuRowDataItemType[] = [\n account,\n algo,\n averagePrice,\n ccy,\n childOrderCount,\n exchange,\n filledQty,\n parentOrderId,\n parentOrderIdAsInt,\n openQty,\n price,\n quantity,\n ric,\n side,\n status,\n volLimit,\n lastUpdate,\n created,\n ];\n\n parentOrderData.push(row);\n}\nconst end = performance.now();\n\nconsole.log(\n `took ${end - start} to create ${parentOrderData.length} orders and ${childOrderData.length} child orders`,\n);\n\nexport const parentOrdersTable = new Table(\n schemas.parentOrders,\n parentOrderData,\n buildDataColumnMap(schemas, \"parentOrders\"),\n);\n\nexport const childOrdersTable = new Table(\n schemas.childOrders,\n childOrderData,\n buildDataColumnMap(schemas, \"childOrders\"),\n);\n\nexport { childOrderData, parentOrderData };\n"],"names":["orderStatus","statusValues","averagePrice","lastUpdate","price","row"],"mappings":";;;;;;;;;;AAWA,MAAM,iBAAyC;AAC/C,MAAM,kBAA0C;AAEhD,MAAM,aAAA,GAAgB,kBAAmB,CAAA,OAAA,EAAS,aAAa,CAAA;AAE/D,MAAM,kBAAqB,GAAA,IAAA;AAC3B,MAAM,iBAAoB,GAAA,GAAA;AAE1B,MAAM,wBAAwB,IAAK,CAAA,KAAA;AAAA,EACjC,iBAAoB,GAA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A,EACnC,OAAQ,CAAA,YAAA;AAAA,EACR,eAAA;AAAA,EACA,kBAAA,CAAmB,SAAS,cAAc;AAC5C;AAEO,MAAM,mBAAmB,IAAI,KAAA;AAAA,EAClC,OAAQ,CAAA,WAAA;AAAA,EACR,cAAA;AAAA,EACA,kBAAA,CAAmB,SAAS,aAAa;AAC3C;;;;"}
|
|
@@ -12,6 +12,9 @@ const pricesUpdateGenerator = new BaseUpdateGenerator({
|
|
|
12
12
|
ask,
|
|
13
13
|
askSize
|
|
14
14
|
});
|
|
15
|
+
const now = Date.now();
|
|
16
|
+
const lastUpdate = now;
|
|
17
|
+
const created = now;
|
|
15
18
|
const requiredInstrumentFields = ["ric", "price"];
|
|
16
19
|
const pricesData = instrumentsData.map((instrument) => {
|
|
17
20
|
const { ric, price: priceSeed } = requiredInstrumentFields.reduce(
|
|
@@ -28,7 +31,22 @@ const pricesData = instrumentsData.map((instrument) => {
|
|
|
28
31
|
const open = priceSeed + random(0, 1) / 10;
|
|
29
32
|
const phase = "C";
|
|
30
33
|
const scenario = "close";
|
|
31
|
-
|
|
34
|
+
const lastUpdate2 = now;
|
|
35
|
+
const created2 = now;
|
|
36
|
+
return [
|
|
37
|
+
ask2,
|
|
38
|
+
askSize2,
|
|
39
|
+
bid2,
|
|
40
|
+
bidSize2,
|
|
41
|
+
close,
|
|
42
|
+
last,
|
|
43
|
+
open,
|
|
44
|
+
phase,
|
|
45
|
+
ric,
|
|
46
|
+
scenario,
|
|
47
|
+
lastUpdate2,
|
|
48
|
+
created2
|
|
49
|
+
];
|
|
32
50
|
});
|
|
33
51
|
for (const [, , , lastTrade, ric] of basketConstituentData) {
|
|
34
52
|
const priceSeed = parseFloat(String(lastTrade));
|
|
@@ -53,7 +71,9 @@ for (const [, , , lastTrade, ric] of basketConstituentData) {
|
|
|
53
71
|
open,
|
|
54
72
|
phase,
|
|
55
73
|
ric,
|
|
56
|
-
scenario
|
|
74
|
+
scenario,
|
|
75
|
+
lastUpdate,
|
|
76
|
+
created
|
|
57
77
|
]);
|
|
58
78
|
}
|
|
59
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.js","sources":["../../../src/simul/reference-data/prices.ts"],"sourcesContent":["import { buildDataColumnMap, Table } from \"../../Table\";\nimport { BaseUpdateGenerator } from \"../../UpdateGenerator\";\nimport { schemas } from \"../simul-schemas\";\nimport { instrumentsData, InstrumentColumnMap } from \"./instruments\";\nimport { random } from \"../../data-utils\";\nimport basketConstituentData from \"../../basket/reference-data/constituents\";\n\ntype ask = number;\ntype askSize = number;\ntype bid = number;\ntype bidSize = number;\ntype close = number;\ntype last = number;\ntype open = number;\ntype phase = \"C\";\ntype ric = string;\ntype scenario = \"close\";\n\nexport type PricesDataRow = [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario
|
|
1
|
+
{"version":3,"file":"prices.js","sources":["../../../src/simul/reference-data/prices.ts"],"sourcesContent":["import { buildDataColumnMap, Table } from \"../../Table\";\nimport { BaseUpdateGenerator } from \"../../UpdateGenerator\";\nimport { schemas } from \"../simul-schemas\";\nimport { instrumentsData, InstrumentColumnMap } from \"./instruments\";\nimport { random } from \"../../data-utils\";\nimport basketConstituentData from \"../../basket/reference-data/constituents\";\n\ntype ask = number;\ntype askSize = number;\ntype bid = number;\ntype bidSize = number;\ntype close = number;\ntype last = number;\ntype open = number;\ntype phase = \"C\";\ntype ric = string;\ntype scenario = \"close\";\ntype lastUpdate = number;\ntype created = number;\n\nexport type PricesDataRow = [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario,\n lastUpdate,\n created,\n];\n\nconst { bid, bidSize, ask, askSize } = buildDataColumnMap(schemas, \"prices\");\nconst pricesUpdateGenerator = new BaseUpdateGenerator({\n bid,\n bidSize,\n ask,\n askSize,\n});\n\nconst now = Date.now();\nconst lastUpdate = now;\nconst created = now;\n\n// const start = performance.now();\n// Create 100_000 Instruments\nconst requiredInstrumentFields = [\"ric\", \"price\"] as const;\nconst pricesData: Array<PricesDataRow> = instrumentsData.map((instrument) => {\n const { ric, price: priceSeed } = requiredInstrumentFields.reduce(\n (obj, f) => ({ ...obj, [f]: instrument[InstrumentColumnMap[f]] }),\n {} as { ric: string; price: number },\n );\n const spread = random(0, 10);\n\n const ask = priceSeed + spread / 2;\n const askSize = random(1000, 3000);\n const bid = priceSeed - spread / 2;\n const bidSize = random(1000, 3000);\n const close = priceSeed + random(0, 1) / 10;\n const last = priceSeed + random(0, 1) / 10;\n const open = priceSeed + random(0, 1) / 10;\n const phase = \"C\";\n const scenario = \"close\";\n const lastUpdate = now;\n const created = now;\n return [\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric,\n scenario,\n lastUpdate,\n created,\n ];\n});\n\n// prettier-ignore\nfor (const [,,,lastTrade,ric] of basketConstituentData) {\n const priceSeed = parseFloat(String(lastTrade));\n if (!isNaN(priceSeed)) {\n const spread = random(0, 10);\n const ask = priceSeed + spread / 2;\n const askSize = random(1000, 3000);\n const bid = priceSeed - spread / 2;\n const bidSize = random(1000, 3000);\n const close = priceSeed + random(0, 1) / 10;\n const last = priceSeed + random(0, 1) / 10;\n const open = priceSeed + random(0, 1) / 10;\n const phase = \"C\";\n const scenario = \"close\";\n pricesData.push([\n ask,\n askSize,\n bid,\n bidSize,\n close,\n last,\n open,\n phase,\n ric as string,\n scenario,\n lastUpdate,\n created\n ]);\n }\n}\n\n// const end = performance.now();\n// console.log(`generating 100,000 prices took ${end - start} ms`);\n\nexport const pricesTable = new Table(\n schemas.prices,\n pricesData,\n buildDataColumnMap(schemas, \"prices\"),\n pricesUpdateGenerator,\n);\n\nexport { pricesData };\n"],"names":["ask","askSize","bid","bidSize","lastUpdate","created"],"mappings":";;;;;;;AAmCA,MAAM,EAAE,KAAK,OAAS,EAAA,GAAA,EAAK,SAAY,GAAA,kBAAA,CAAmB,SAAS,QAAQ,CAAA;AAC3E,MAAM,qBAAA,GAAw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ACdH,IAAAA;AAAA,MACAC,QAAAA;AAAA,MACAC,IAAAA;AAAA,MACAC,QAAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAA;AAAA,MACA,QAAA;AAAA,MACA,UAAA;AAAA,MACA;AAAA,KACD,CAAA;AAAA;AAEL;AAKO,MAAM,cAAc,IAAI,KAAA;AAAA,EAC7B,OAAQ,CAAA,MAAA;AAAA,EACR,UAAA;AAAA,EACA,kBAAA,CAAmB,SAAS,QAAQ,CAAA;AAAA,EACpC;AACF;;;;"}
|
|
@@ -78,7 +78,6 @@ const schemas = {
|
|
|
78
78
|
{ name: "filledQty", serverDataType: "double" },
|
|
79
79
|
{ name: "id", serverDataType: "string" },
|
|
80
80
|
{ name: "idAsInt", serverDataType: "int" },
|
|
81
|
-
{ name: "lastUpdate", serverDataType: "long" },
|
|
82
81
|
{ name: "openQty", serverDataType: "double" },
|
|
83
82
|
{ name: "parentOrderId", serverDataType: "string" },
|
|
84
83
|
{ name: "price", serverDataType: "double" },
|
|
@@ -87,7 +86,9 @@ const schemas = {
|
|
|
87
86
|
{ name: "side", serverDataType: "string" },
|
|
88
87
|
{ name: "status", serverDataType: "string" },
|
|
89
88
|
{ name: "strategy", serverDataType: "string" },
|
|
90
|
-
{ name: "volLimit", serverDataType: "int" }
|
|
89
|
+
{ name: "volLimit", serverDataType: "int" },
|
|
90
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
91
|
+
{ name: "created", serverDataType: "long" }
|
|
91
92
|
],
|
|
92
93
|
key: "id",
|
|
93
94
|
table: { module: "SIMUL", table: "childOrders" }
|
|
@@ -103,14 +104,15 @@ const schemas = {
|
|
|
103
104
|
{ name: "filledQty", serverDataType: "double" },
|
|
104
105
|
{ name: "id", serverDataType: "string" },
|
|
105
106
|
{ name: "idAsInt", serverDataType: "int" },
|
|
106
|
-
{ name: "lastUpdate", serverDataType: "long" },
|
|
107
107
|
{ name: "openQty", serverDataType: "double" },
|
|
108
108
|
{ name: "price", serverDataType: "double" },
|
|
109
109
|
{ name: "quantity", serverDataType: "double" },
|
|
110
110
|
{ name: "ric", serverDataType: "string" },
|
|
111
111
|
{ name: "side", serverDataType: "string" },
|
|
112
112
|
{ name: "status", serverDataType: "string" },
|
|
113
|
-
{ name: "volLimit", serverDataType: "int" }
|
|
113
|
+
{ name: "volLimit", serverDataType: "int" },
|
|
114
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
115
|
+
{ name: "created", serverDataType: "long" }
|
|
114
116
|
],
|
|
115
117
|
key: "id",
|
|
116
118
|
table: { module: "SIMUL", table: "parentOrders" }
|
|
@@ -127,7 +129,9 @@ const schemas = {
|
|
|
127
129
|
{ name: "open", serverDataType: "double" },
|
|
128
130
|
{ name: "phase", serverDataType: "string" },
|
|
129
131
|
{ name: "ric", serverDataType: "string" },
|
|
130
|
-
{ name: "scenario", serverDataType: "string" }
|
|
132
|
+
{ name: "scenario", serverDataType: "string" },
|
|
133
|
+
{ name: "lastUpdate", serverDataType: "long" },
|
|
134
|
+
{ name: "created", serverDataType: "long" }
|
|
131
135
|
],
|
|
132
136
|
key: "ric",
|
|
133
137
|
table: { module: "SIMUL", table: "prices" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":"AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS;AAAA,KAC1C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,E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AS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS;AAAA,KAC/C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS;AAAA;AAE9C;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"simul-schemas.js","sources":["../../src/simul/simul-schemas.ts"],"sourcesContent":["import { TableSchema } from \"@vuu-ui/vuu-data-types\";\nimport { VuuTable } from \"@vuu-ui/vuu-protocol-types\";\n\nexport type SimulTableName =\n | \"instruments\"\n | \"instrumentsExtended\"\n | \"instrumentPrices\"\n | \"orders\"\n | \"childOrders\"\n | \"parentOrders\"\n | \"prices\";\n\n// These Schemas take the form of the schemas that we create\n// with TABLE_META returned by Vuu.\nexport const schemas: Readonly<Record<SimulTableName, Readonly<TableSchema>>> =\n {\n instruments: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instruments\" },\n },\n instrumentsExtended: {\n columns: [\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"supported\", serverDataType: \"boolean\" },\n { name: \"wishlist\", serverDataType: \"boolean\" },\n { name: \"lastUpdated\", serverDataType: \"long\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"date\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentsExtended\" },\n },\n instrumentPrices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bbg\", serverDataType: \"string\" },\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"currency\", serverDataType: \"string\" },\n { name: \"description\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"isin\", serverDataType: \"string\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"lotSize\", serverDataType: \"int\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"instrumentPrices\" },\n },\n orders: {\n columns: [\n { name: \"status\", serverDataType: \"string\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"created\", serverDataType: \"long\" },\n { name: \"filledQuantity\", serverDataType: \"double\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"orderId\", serverDataType: \"string\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"trader\", serverDataType: \"string\" },\n ],\n key: \"orderId\",\n table: { module: \"SIMUL\", table: \"orders\" },\n },\n childOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"parentOrderId\", serverDataType: \"string\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"strategy\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"childOrders\" },\n },\n parentOrders: {\n columns: [\n { name: \"account\", serverDataType: \"string\" },\n { name: \"algo\", serverDataType: \"string\" },\n { name: \"averagePrice\", serverDataType: \"double\" },\n { name: \"ccy\", serverDataType: \"string\" },\n { name: \"childCount\", serverDataType: \"int\" },\n { name: \"exchange\", serverDataType: \"string\" },\n { name: \"filledQty\", serverDataType: \"double\" },\n { name: \"id\", serverDataType: \"string\" },\n { name: \"idAsInt\", serverDataType: \"int\" },\n { name: \"openQty\", serverDataType: \"double\" },\n { name: \"price\", serverDataType: \"double\" },\n { name: \"quantity\", serverDataType: \"double\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"side\", serverDataType: \"string\" },\n { name: \"status\", serverDataType: \"string\" },\n { name: \"volLimit\", serverDataType: \"int\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"id\",\n table: { module: \"SIMUL\", table: \"parentOrders\" },\n },\n prices: {\n columns: [\n { name: \"ask\", serverDataType: \"double\" },\n { name: \"askSize\", serverDataType: \"double\" }, // type: \"int\"\n { name: \"bid\", serverDataType: \"double\" },\n { name: \"bidSize\", serverDataType: \"double\" },\n { name: \"close\", serverDataType: \"double\" },\n { name: \"last\", serverDataType: \"double\" },\n { name: \"open\", serverDataType: \"double\" },\n { name: \"phase\", serverDataType: \"string\" },\n { name: \"ric\", serverDataType: \"string\" },\n { name: \"scenario\", serverDataType: \"string\" },\n { name: \"lastUpdate\", serverDataType: \"long\" },\n { name: \"created\", serverDataType: \"long\" },\n ],\n key: \"ric\",\n table: { module: \"SIMUL\", table: \"prices\" },\n },\n };\n\nexport type SimulVuuTable = {\n module: \"SIMUL\";\n table: SimulTableName;\n};\n\nexport const isSimulTable = (table: VuuTable): table is SimulVuuTable =>\n table.module === \"SIMUL\";\n"],"names":[],"mappings":"AAcO,MAAM,OACX,GAAA;AAAA,EACE,WAAa,EAAA;AAAA,IACX,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,aAAe,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAChD,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,KAAM,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS;AAAA,KAC1C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,aAAc;AAAA,GACjD;AAAA,EACA,mBAAqB,EAAA;AAAA,IACnB,OAAS,EAAA;AAAA,MACP,EAAE,IAAA,EAAM,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B,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,MAAQ,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACzC,EAAE,IAAA,EAAM,OAAS,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC1C,EAAE,IAAA,EAAM,KAAO,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MACxC,EAAE,IAAA,EAAM,UAAY,EAAA,cAAA,EAAgB,QAAS,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,YAAc,EAAA,cAAA,EAAgB,MAAO,EAAA;AAAA,MAC7C,EAAE,IAAA,EAAM,SAAW,EAAA,cAAA,EAAgB,MAAO;AAAA,KAC5C;AAAA,IACA,GAAK,EAAA,KAAA;AAAA,IACL,KAAO,EAAA,EAAE,MAAQ,EAAA,OAAA,EAAS,OAAO,QAAS;AAAA;AAE9C;AAOK,MAAM,YAAe,GAAA,CAAC,KAC3B,KAAA,KAAA,CAAM,MAAW,KAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.13.
|
|
2
|
+
"version": "0.13.13",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@vuu-ui/vuu-data-local": "0.13.
|
|
7
|
-
"@vuu-ui/vuu-utils": "0.13.
|
|
6
|
+
"@vuu-ui/vuu-data-local": "0.13.13",
|
|
7
|
+
"@vuu-ui/vuu-utils": "0.13.13"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@vuu-ui/vuu-protocol-types": "0.13.
|
|
11
|
-
"@vuu-ui/vuu-data-types": "0.13.
|
|
12
|
-
"@vuu-ui/vuu-table-types": "0.13.
|
|
10
|
+
"@vuu-ui/vuu-protocol-types": "0.13.13",
|
|
11
|
+
"@vuu-ui/vuu-data-types": "0.13.13",
|
|
12
|
+
"@vuu-ui/vuu-table-types": "0.13.13"
|
|
13
13
|
},
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"files": [
|
|
@@ -9,6 +9,8 @@ type open = number;
|
|
|
9
9
|
type phase = "C";
|
|
10
10
|
type ric = string;
|
|
11
11
|
type scenario = "close";
|
|
12
|
+
type lastUpdate = number;
|
|
13
|
+
type created = number;
|
|
12
14
|
export type PricesDataRow = [
|
|
13
15
|
ask,
|
|
14
16
|
askSize,
|
|
@@ -19,9 +21,13 @@ export type PricesDataRow = [
|
|
|
19
21
|
open,
|
|
20
22
|
phase,
|
|
21
23
|
ric,
|
|
22
|
-
scenario
|
|
24
|
+
scenario,
|
|
25
|
+
lastUpdate,
|
|
26
|
+
created
|
|
23
27
|
];
|
|
24
28
|
declare const bid: number, bidSize: number, ask: number, askSize: number;
|
|
29
|
+
declare const lastUpdate: number;
|
|
30
|
+
declare const created: number;
|
|
25
31
|
declare const pricesData: Array<PricesDataRow>;
|
|
26
32
|
export declare const pricesTable: Table;
|
|
27
33
|
export { pricesData };
|