The StockTrades data stream is used to simulate how Sybase CEP Engine receives messages from an external data source, such as a stock exchange ticker.
Since this is a simulation, the StockTrades data stream does not actually receive "live" messages from a stock exchange. Instead, there is a data file containing a set of sample trade data that is used to simulate the actual use of a live data feed.
The stream includes columns representing a trade identifier, stock symbol, number of shares traded, and the price per share. The stream schema that defines these columns for the StockTrades stream is:
Column |
Datatype |
Description |
---|---|---|
tradeid |
Integer |
A unique sequence number that identifies each trade. |
symbol |
String |
The stock symbol associated with this trade (such as MSFT, DELL, or ORCL). |
volume |
Integer |
The number of shares exchanged for this trade. |
price |
Float |
The price of each share exchanged for this trade. |
Here is a small sample of input data from the StockTrades stream which is used in most of the examples in this Guide:
timestamp |
tradeid |
symbol |
volume |
price |
---|---|---|---|---|
07:15:01 |
5001 |
MSFT |
500 |
29.00 |
07:15:02 |
5002 |
ORCL |
1500 |
18.00 |
07:15:03 |
5003 |
MSFT |
1000 |
28.00 |
07:15:05 |
5004 |
MSFT |
1000 |
31.00 |
07:15:06 |
5005 |
AAPL |
500 |
81.00 |
07:15:09 |
5006 |
AAPL |
800 |
82.00 |
07:15:13 |
5007 |
ORCL |
500 |
20.00 |
07:15:15 |
5008 |
AAPL |
2000 |
83.00 |
07:15:16 |
5009 |
MSFT |
1500 |
28.00 |
07:15:18 |
5010 |
AAPL |
1000 |
83.00 |
07:15:21 |
5011 |
MSFT |
500 |
29.00 |