The Trade Storage worker is responsible for the storage of trades carried out during the day. This worker takes a set of trades and updates/creates a unique datastore that stores the daily trades. The worker checks whether or not the Trade ID information was processed that day and indicates whether the trade has already been inserted into the target portfolio or not. The Trades Storage worker generates a datastore with the trades processed on a portfolio level.
The Trades Storage worker must receive specific parameters in order to execute properly. When parameters are not set correctly it may cause the worker to not work as expected. The worker parameters are separated in the following tabs: Input and Output.
The Input tab contains parameters that are consumed by the worker, in order to execute it's calculations or actions.
1.1 Incoming Trades
The Incoming Trades field receives the data of operations and transactions carried out in the portfolio. These trades must be properly structured in a datastore, which is usually generated by a trade parser or Split Trades worker. Set Incoming Trades using Upstream Data, Fixed Datastore or Get Latest variants.
This field sets which workspace the Incoming Trades (1.1) are being retrieved from. Set workspace using Fixed Workspace variant.
An example of a trades datastore is as follows:
[Erich: show trades datastore example]
The Output tab contains parameters that define how the worker results will be provided to downstream workers.
Set the workspace in which the datastore will be saved on the platform using Fixed Workspace variant.
2.5 Storage Mode
Select if the result datastore will be saved on the platform, update an existing portfolio or be a transient one through the following options: Transient or Update.
The results of the Trades Storage, is a datastore, containing the trades information processed on a portfolio level during the day. Below you can see an example of the Trades Storage result object hierarchy. You can check the Output Types article to learn more about result objects types.
- Datastore (datastore)
- ID (string)
- Name (string)
- Date (date)
- Tags (list)
- Data (list)
The data in the datastore is a table, in which has the at least the following columns: Symbol, Quantity, Cost Price, Instrument Class, Execution Date, Portfolio UID, Book, Inserted Status. If additional information related to the trade is sent, such as trader, settlement, or dealer, the worker automatically adds these columns to the datastore data. Each row corresponds to a trade.