Trade view

Figure 1. Trade view schema
Diagram showing the trade view schema
Table name Description Populated by
Ticker Master table that stores basic ticker information. This table is populated during the initial data load and whenever new tickers are found in the trade data.
Trade Sample This table contains samples of trade data from the market. The trades that go into this table depend on the specific use case. The trades are primarily evidences of some trade risk that is detected. Typically, these trades are sampled from the market data that is stored in Hadoop. They are stored here for easy access by the user interface layer. Currently, the spoofing and pump-and-dump use cases populate this table whenever a spoofing alert is identified.
Quote Sample This table contains samples of quote data for certain durations of time. The quotes that go into this table depend on the specific use case. The quotes are evidences of some kind of risk that is identified by the specific use case. These quotes are sampled from the market data and stored in Hadoop. They are stored in this table for easy access by the user interface layer. Currently, the spoofing use case populates this table whenever a spoofing alert is created. The sampled quote is the max (bid price) and min (offer price) for every time second.
Order This table contains orders that need to be displayed as evidence for some alert in the front end. The contents are copied from the market data in Hadoop. The specific dates for which the data is populated depends on the alert. Currently, the spoofing use case populates this table whenever a spoofing alert is identified.
Execution This table contains orders that need to be displayed as evidence for some alert in the front end. The contents are copied from the market data in Hadoop. The specific dates for which the data is populated depends on the alert. Currently, the spoofing use case populates this table whenever a spoofing alert is identified.
Pump Dump Stage This table contains the pump-and-dump stage for each ticker that shows pump or dump evidence. This table is populated by the pump-and-dump use case implementation.
Trade Summary This table contains the ticker summary for each date for tickers that show pump or dump evidence. This table is populated by the pump-and-dump use case implementation.
Top5Traders This table contains the top five traders for buy and sell sides for each ticker that shows pump or dump evidence. This table is populated daily. This table is populated by the pump-and-dump use case implementation.
Intra Day Trade Summary This table is meant to be used for the Trade charts in the trade use cases. This table contains summary data for trade/transaction data on a daily basis. This table is populated by the Trade Evidence Persistence Spark job as and when it receives the risk evidence from the use case implementation.
Trade Evidence This table contains evidences for specific type like order, trade, execution etc.,. that needs to be shown in the trade charts for trade use cases. This table, along with the evidence_trade_ rel table allow linking the evdences to the alerts through the evidence ids This table is populated by the Trade Evidence Persistence Spark job as and when it receives the risk evidence from the use case implementation.
Evidence Trade Rel This table links the trade evidences to the risk evidences and thus indirectly link them to the alert. This table helps the UI services figure out what trade evidences are relevant for a specific alert. This table is populated by the Trade Evidence Persistence Spark job as and when it receives the risk evidence from the use case implementation.
FX Transaction This table contains the transaction details for forex transactions. This table is synonymous to the Trade Evidence table except that it has additional fields that are specific to forex. This table is populated by the Trade Evidence Persistence Spark job as and when it receives the risk evidence from the use case implementation.