Replies: 1 comment
-
Perspective works a.little differently than Pandas' viewer.restore({
columns: ["Column I want median of"],
aggregate: {"Column I want median of": "median"},
expressions: ["1"],
row_pivots: ["1"],
}); In many e.g. blotter-esque use cases we originally developer Perspective for, common group-by columns could be Ticker, Venue, Trade Type/Side, CounterParty, Trader/SalesPerson/Book, etc., so if I understand your second question correctly, the best way to represent this in Perspective is probably with a column "Ticker" per row that indicates the Ticker the price/volume observation represents, then use this field as a "Group By"/ viewer.restore({
plugin: "Y Line",
columns: ["volume"],
row_pivots: ["bucket(\"timestamp\",'s')"],
column_pivots: ["ticker"],
expressions: ["bucket(\"timestamp\",'s')"],
}); The streaming example is very simple approximation of this pattern, and has "side", "client", "trader" and "ticker" fields; there are also a few more examples in the There is no |
Beta Was this translation helpful? Give feedback.
-
I have what should be a very common use case, that is, ingesting streaming financial data, and computing indicators on-the-fly based off of the streaming price/volume data. I feel if, every tick, I simply collect into a DataFrame and then serialize into a Table to send it over the network, I'm not getting much out of Perspective. What should I do in this case?
Somewhat unrelated, but I also want to keep price/volume data for a set of tickers over a time axis, which would be 3D table (tensor). What's the best way to implement this with the Table API? A Table per ticker?
Beta Was this translation helpful? Give feedback.
All reactions