Skip to content

Commit

Permalink
#850 found a bug with basket constituents, not resolved as of this co…
Browse files Browse the repository at this point in the history
…mmit.
  • Loading branch information
chrisjstevo committed Oct 29, 2023
1 parent 6cc77c2 commit 1f0b387
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ object BasketModule extends DefaultModule {
BTC.InstanceIdRic.string(), BTC.InstanceId.string(), BTC.Ric.string(),
BTC.BasketId.string(), BTC.PriceStrategyId.int(),
BTC.Description.string(),
BTC.Bid.double(), BTC.Offer.double(), BTC.Last.double(),
BTC.NotionalUsd.double(), BTC.NotionalLocal.double(),
BTC.Venue.string(),
BTC.Algo.string(), BTC.AlgoParams.string(),
Expand All @@ -82,7 +81,7 @@ object BasketModule extends DefaultModule {
VisualLinks(
Link(BTC.InstanceId, BasketTradingTable, BT.InstanceId),
),
joinFields = BTC.InstanceIdRic
joinFields = BTC.InstanceIdRic, BTC.Ric
),
(table, vs) => new NullProvider(table),
(table, _, _, tableContainer) => ViewPortDef(
Expand Down Expand Up @@ -114,9 +113,9 @@ object BasketModule extends DefaultModule {
)
.addJoinTable(tableDefs =>
JoinTableDef(
name = "basketConsPrices",
baseTable = tableDefs.get(NAME, BasketConstituentTable),
joinColumns = Columns.allFrom(tableDefs.get(NAME, BasketConstituentTable)) ++ Columns.allFromExcept(tableDefs.get(PriceModule.NAME, "prices"), "ric"),
name = "basketTrdConsPrices",
baseTable = tableDefs.get(NAME, BasketTradingConstituent),
joinColumns = Columns.allFrom(tableDefs.get(NAME, BasketTradingConstituent)) ++ Columns.allFromExcept(tableDefs.get(PriceModule.NAME, "prices"), "ric"),
joins =
JoinTo(
table = tableDefs.get(PriceModule.NAME, "prices"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ class BasketConstituentProvider(val table: DataTable)(implicit lifecycle: Lifecy
val volume = row("Volume")
val weighting = row("Weight")
val side = BasketConstants.Side.Buy
table.processUpdate(symbol, RowWithData(symbol, Map(
val ricBasketId = symbol + "." + basketId
table.processUpdate(ricBasketId, RowWithData(symbol, Map(
Ric -> symbol,
BasketId -> basketId,
RicBasketId -> (symbol + "." + basketId),
RicBasketId -> ricBasketId,
LastTrade -> lastTrade,
Change -> change,
Weighting -> weighting,
Expand Down

0 comments on commit 1f0b387

Please sign in to comment.