forked from finos/vuu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/finos/vuu into sync-main-pull
- Loading branch information
Showing
260 changed files
with
3,830 additions
and
2,363 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ase/src/examples/utils/UpdateGenerator.ts → ...ages/vuu-data-test/src/UpdateGenerator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
vuu-ui/packages/vuu-data-test/src/basket/basket-schemas.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import { TableSchema } from "@finos/vuu-data"; | ||
|
||
export type BasketsTableName = | ||
| "algoType" | ||
| "basket" | ||
| "basketConstituent" | ||
| "basketTrading" | ||
| "basketTradingConstituent" | ||
| "priceStrategyType"; | ||
|
||
export const schemas: Readonly< | ||
Record<BasketsTableName, Readonly<TableSchema>> | ||
> = { | ||
algoType: { | ||
columns: [ | ||
{ name: "algoType", serverDataType: "string" }, | ||
{ name: "id", serverDataType: "int" }, | ||
], | ||
key: "id", | ||
table: { module: "BASKET", table: "algoType" }, | ||
}, | ||
basket: { | ||
columns: [ | ||
{ name: "id", serverDataType: "string" }, | ||
{ name: "name", serverDataType: "string" }, | ||
{ name: "notionalValue", serverDataType: "double" }, | ||
{ name: "notionalValueUsd", serverDataType: "double" }, | ||
], | ||
key: "id", | ||
table: { module: "BASKET", table: "basket" }, | ||
}, | ||
basketConstituent: { | ||
columns: [ | ||
{ name: "basketId", serverDataType: "string" }, | ||
{ name: "change", serverDataType: "string" }, | ||
{ name: "lastTrade", serverDataType: "string" }, | ||
{ name: "ric", serverDataType: "string" }, | ||
{ name: "ricBasketId", serverDataType: "string" }, | ||
{ name: "side", serverDataType: "string" }, | ||
{ name: "volume", serverDataType: "string" }, | ||
{ name: "weighting", serverDataType: "double" }, | ||
], | ||
key: "ricBasketId", | ||
table: { module: "BASKET", table: "basketConstituent" }, | ||
}, | ||
basketTrading: { | ||
columns: [ | ||
{ name: "basketId", serverDataType: "string" }, | ||
{ name: "basketName", serverDataType: "string" }, | ||
{ name: "filledPct", serverDataType: "double" }, | ||
{ name: "fxRateToUsd", serverDataType: "double" }, | ||
{ name: "instanceId", serverDataType: "string" }, | ||
{ name: "status", serverDataType: "string" }, | ||
{ name: "totalNotional", serverDataType: "double" }, | ||
{ name: "totalNotionalUsd", serverDataType: "double" }, | ||
{ name: "units", serverDataType: "int" }, | ||
], | ||
key: "instanceId", | ||
table: { module: "BASKET", table: "basketTrading" }, | ||
}, | ||
basketTradingConstituent: { | ||
columns: [ | ||
{ name: "algo", serverDataType: "string" }, | ||
{ name: "algoParams", serverDataType: "string" }, | ||
{ name: "basketId", serverDataType: "string" }, | ||
{ name: "bid", serverDataType: "double" }, | ||
{ name: "description", serverDataType: "string" }, | ||
{ name: "instanceId", serverDataType: "string" }, | ||
{ name: "instanceIdRic", serverDataType: "string" }, | ||
{ name: "last", serverDataType: "double" }, | ||
{ name: "limitPrice", serverDataType: "double" }, | ||
{ name: "notionalLocal", serverDataType: "double" }, | ||
{ name: "notionalUsd", serverDataType: "double" }, | ||
{ name: "offer", serverDataType: "double" }, | ||
{ name: "pctFilled", serverDataType: "double" }, | ||
{ name: "priceSpread", serverDataType: "int" }, | ||
{ name: "priceStrategyId", serverDataType: "int" }, | ||
{ name: "quantity", serverDataType: "long" }, | ||
{ name: "ric", serverDataType: "string" }, | ||
{ name: "side", serverDataType: "string" }, | ||
{ name: "venue", serverDataType: "string" }, | ||
{ name: "weighting", serverDataType: "double" }, | ||
], | ||
key: "instanceIdRic", | ||
table: { module: "BASKET", table: "basketTradingConstituent" }, | ||
}, | ||
priceStrategyType: { | ||
columns: [ | ||
{ name: "priceStrategy", serverDataType: "string" }, | ||
{ name: "id", serverDataType: "int" }, | ||
], | ||
key: "", | ||
table: { module: "BASKET", table: "priceStrategyType" }, | ||
}, | ||
}; |
10 changes: 10 additions & 0 deletions
10
vuu-ui/packages/vuu-data-test/src/basket/data-generators/basket-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BasketColumnMap, BasketReferenceData } from "../reference-data"; | ||
import { getGenerators } from "../../generatorTemplate"; | ||
|
||
const [RowGenerator, ColumnGenerator] = getGenerators( | ||
"basket", | ||
BasketColumnMap, | ||
BasketReferenceData | ||
); | ||
|
||
export { RowGenerator, ColumnGenerator }; |
13 changes: 13 additions & 0 deletions
13
vuu-ui/packages/vuu-data-test/src/basket/data-generators/basketConstituent-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { | ||
BasketConstituentColumnMap, | ||
BasketConstituentReferenceData, | ||
} from "../reference-data"; | ||
import { getGenerators } from "../../generatorTemplate"; | ||
|
||
const [RowGenerator, ColumnGenerator] = getGenerators( | ||
"basketConstituent", | ||
BasketConstituentColumnMap, | ||
BasketConstituentReferenceData | ||
); | ||
|
||
export { RowGenerator, ColumnGenerator }; |
13 changes: 13 additions & 0 deletions
13
vuu-ui/packages/vuu-data-test/src/basket/data-generators/basketTrading-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { | ||
BasketTradingColumnMap, | ||
BasketTradingReferenceData, | ||
} from "../reference-data"; | ||
import { getGenerators } from "../../generatorTemplate"; | ||
|
||
const [RowGenerator, ColumnGenerator] = getGenerators( | ||
"basketTrading", | ||
BasketTradingColumnMap, | ||
BasketTradingReferenceData | ||
); | ||
|
||
export { RowGenerator, ColumnGenerator }; |
13 changes: 13 additions & 0 deletions
13
...i/packages/vuu-data-test/src/basket/data-generators/basketTradingConstituent-generator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { | ||
BasketTradingConstituentColumnMap, | ||
BasketTradingConstituentReferenceData, | ||
} from "../reference-data"; | ||
import { getGenerators } from "../../generatorTemplate"; | ||
|
||
const [RowGenerator, ColumnGenerator] = getGenerators( | ||
"basketTradingConstituent", | ||
BasketTradingConstituentColumnMap, | ||
BasketTradingConstituentReferenceData | ||
); | ||
|
||
export { RowGenerator, ColumnGenerator }; |
4 changes: 4 additions & 0 deletions
4
vuu-ui/packages/vuu-data-test/src/basket/data-generators/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * as basket from "./basket-generator"; | ||
export * as basketConstituent from "./basketConstituent-generator"; | ||
export * as basketTrading from "./basketTrading-generator"; | ||
export * as basketTradingConstituent from "./basketTradingConstituent-generator"; |
22 changes: 22 additions & 0 deletions
22
vuu-ui/packages/vuu-data-test/src/basket/reference-data/basket.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { VuuDataRow } from "@finos/vuu-protocol-types"; | ||
import { ColumnMap } from "@finos/vuu-utils"; | ||
import { getSchema } from "../../schemas"; | ||
|
||
const schema = getSchema("basket"); | ||
|
||
export const BasketColumnMap = Object.values(schema.columns).reduce<ColumnMap>( | ||
(map, col, index) => { | ||
map[col.name] = index; | ||
return map; | ||
}, | ||
{} | ||
); | ||
|
||
const data: VuuDataRow[] = [ | ||
[".NASDAQ100", ".NASDAQ100", 0, 0], | ||
[".HSI", ".HSI", 0, 0], | ||
[".FTSE100", ".FTSE100", 0, 0], | ||
[".SP500", ".SP500", 0, 0], | ||
]; | ||
|
||
export default data; |
43 changes: 43 additions & 0 deletions
43
vuu-ui/packages/vuu-data-test/src/basket/reference-data/basketConstituent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { VuuDataRow } from "@finos/vuu-protocol-types"; | ||
import { getSchema } from "../../schemas"; | ||
import { ColumnMap } from "@finos/vuu-utils"; | ||
import ftse from "./ftse100"; | ||
|
||
const schema = getSchema("basketConstituent"); | ||
|
||
export const BasketConstituentColumnMap = Object.values( | ||
schema.columns | ||
).reduce<ColumnMap>((map, col, index) => { | ||
map[col.name] = index; | ||
return map; | ||
}, {}); | ||
|
||
const data: VuuDataRow[] = []; | ||
|
||
// const start = performance.now(); | ||
// Create 100_000 Instruments | ||
|
||
for (const row of ftse) { | ||
// prettier-ignore | ||
const [ric, name, lastTrade, change, volume] = row; | ||
|
||
const basketId = ".FTSE100"; | ||
const side = "BUY"; | ||
const weighting = 1; | ||
|
||
data.push([ | ||
basketId, | ||
change, | ||
lastTrade, | ||
ric, | ||
`${ric}-${basketId}`, | ||
side, | ||
volume, | ||
weighting, | ||
]); | ||
} | ||
|
||
// const end = performance.now(); | ||
// console.log(`generating 100,000 instrumentPrices took ${end - start} ms`); | ||
|
||
export default data; |
16 changes: 16 additions & 0 deletions
16
vuu-ui/packages/vuu-data-test/src/basket/reference-data/basketTrading.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { VuuDataRow } from "@finos/vuu-protocol-types"; | ||
import { ColumnMap } from "@finos/vuu-utils"; | ||
import { getSchema } from "../../schemas"; | ||
|
||
const schema = getSchema("basketTrading"); | ||
|
||
export const BasketTradingColumnMap = Object.values( | ||
schema.columns | ||
).reduce<ColumnMap>((map, col, index) => { | ||
map[col.name] = index; | ||
return map; | ||
}, {}); | ||
|
||
const data: VuuDataRow[] = []; | ||
|
||
export default data; |
16 changes: 16 additions & 0 deletions
16
vuu-ui/packages/vuu-data-test/src/basket/reference-data/basketTradingConstituent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { VuuDataRow } from "@finos/vuu-protocol-types"; | ||
import { ColumnMap } from "@finos/vuu-utils"; | ||
import { getSchema } from "../../schemas"; | ||
|
||
const schema = getSchema("basketTradingConstituent"); | ||
|
||
export const BasketTradingConstituentColumnMap = Object.values( | ||
schema.columns | ||
).reduce<ColumnMap>((map, col, index) => { | ||
map[col.name] = index; | ||
return map; | ||
}, {}); | ||
|
||
const data: VuuDataRow[] = []; | ||
|
||
export default data; |
Oops, something went wrong.