Trade Upload
This section provides notes to a function which is not yet released to general public. Content is subject to change.
If your DECAF Instance does not provide this functionality and you are interested in it, please contact your DECAF Administrator.
Overview
The Trade Upload function allows you to upload trades from a CSV file. Due to the differences in trade formats, DECAF requires specific formats for different trade types. The following trade types are supported:
- Inflow/Outflow Actions
- Partial/Full Journal Entries
- Share Trades
- Bond Trades
- Structured Product Trades
- Future Trades
Currently, this function is offered under "Custom Reports" menu item. Each trade types has its own submenu item. You can choose a file from your local computer and upload it to DECAF. The result of import operation will be displayed as a list of Trade IDs.
File Format
The file format for the trade upload is a CSV file. Specifically:
- The first row must contain the column headers.
- The separator must be a comma (
,
). - The file must be encoded in UTF-8.
- Cells must be enclosed in double quotes (
"
) if they contain a comma.
In the following subsections, we provide sample CSV files for each trade type.
Common Columns
The following columns are common to all trade/action types:
- Subtype: Subtype of the trade/action (optional).
- Commitment Date: Date of the commitment (a.k.a. trade date).
- Settlement Date: Date of the settlement (a.k.a. value date, optional).
- Executed At: Time of the execution in
HH:MM
format (optional). - Pseudo Order: The order (integer number) among other actions on the same date/time (optional).
- Reference: Reference of the action (optional).
- Internal Notes: Internal notes of the action (optional).
- Remarks: Remarks of the action (optional).
Inflow/Outflow Actions
In addition to "Common Columns", the following columns are specific to inflow/outflow actions:
- Account Name: Name of the account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity: Quantity of the instrument (required).
- Price: Price of the instrument (optional, defaults to
1
). - Share Class Name: Name of the share class the action is related to (optional).
The sign of the quantity determines whether it is an inflow or outflow action. If the quantity is positive, it is an inflow action; if it is negative, it is an outflow action.
You can download the sample file for reference: Download Sample File.
Partial/Full Journal Entries
In addition to "Common Columns", the following columns are specific to partial/full journal entries:
- Account Name (1): Name of the first account (required).
- Currency (1): Symbol of the first currency instrument (required).
- Quantity (1): Quantity of the first currency instrument (required).
- Share Class Name: Name of the share class the action is related to (optional).
With the above columns, you can create partial journal entries. To create full journal entries, you need to add the following columns:
- Account Name (2): Name of the second account (required).
- Currency (2): Symbol of the second currency instrument (required).
- Quantity (2): Quantity of the second currency instrument (required).
The sign of the quantity determines whether it is a debit or credit entry. If the quantity is positive, it is a debit entry; if it is negative, it is a credit entry.
The quantity of the second currency instrument is usually the negative of the quantity of the first currency instrument.
You can download the sample file for reference: Download Sample File.
Share Trades
In addition to "Common Columns", the following columns are specific to share trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (required).
- Currency: Symbol of the currency (required).
- Quantity (Cash): Quantity of the cash (required).
- Price: Price of the instrument (required).
The cash quantity must match the instrument quantity multiplied by the price (and price factor).
The cash quantity should be negative for buy trades and positive for sell trades.
You can download the sample file for reference: Download Sample File.
Bond Trades
In addition to "Common Columns", the following columns are specific to bond trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (required).
- Currency: Symbol of the currency (required).
- Quantity (Cash): Quantity of the cash (required).
- Quantity (Accrued): Quantity of the accrued cash (optional).
- Price: Price of the instrument (required).
The cash quantity must match the instrument quantity multiplied by the price (and price factor).
The cash quantity should be negative for buy trades and positive for sell trades. Likewise, the accrued cash quantity should be negative for buy trades and positive for sell trades.
You can download the sample file for reference: Download Sample File.
Structured Product Trades
In addition to "Common Columns", the following columns are specific to structured product trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (required).
- Currency: Symbol of the currency (required).
- Quantity (Cash): Quantity of the cash (required).
- Price: Price of the instrument (required).
The cash quantity must match the instrument quantity multiplied by the price (and price factor).
The cash quantity should be negative for buy trades and positive for sell trades.
You can download the sample file for reference: Download Sample File.
Future Trades
In addition to "Common Columns", the following columns are specific to future trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (optional).
- Currency: Symbol of the currency (optional).
- Quantity (Cash): Quantity of the cash (optional).
- Price: Price of the instrument (required).
The cash leg is optional for future trades. You can use the cash leg to record PnL due to a closed future position.
The sign of the quantity determines if it is a profit or loss.
You can download the sample file for reference: Download Sample File.
FX Forward Trades
In addition to "Common Columns", the following columns are specific to FX forward trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (PnL): Name of the PnL account (optional, if netting-out PnL).
- Currency (PnL): Symbol of the currency (optional, if netting-out PnL).
- Quantity (PnL): Quantity of the PnL (optional, if netting-out PnL).
- Share Class Name: Name of the share class the action is related to (optional).
The cash leg is optional for FX forward trades. You can use the cash leg to record PnL due to a closed FX forward position.
The sign of the quantity determines if it is a profit or loss.
You can download the sample file for reference: Download Sample File.
Spot FX Trades
In addition to "Common Columns", the following columns are specific to spot FX trades:
- Account (Currency 1): Name of the first currency account (required).
- Currency 1: Symbol of the first currency (required).
- Quantity (Currency 1): Quantity of the first currency (required).
- Account (Currency 2): Name of the second currency account (optional, defaults to first currency account).
- Currency 2: Symbol of the second currency (required).
- Quantity (Currency 2): Quantity of the second currency (required).
- FX Rate: FX rate between the two currencies (required).
Note that signs are important. Figures must match the following equation (note the negative sign on the right-hand side):
You can download the sample file for reference: Download Sample File.
Mini-Future Trades
In addition to "Common Columns", the following columns are specific to mini-future trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (required).
- Currency: Symbol of the currency (required).
- Quantity (Cash): Quantity of the cash (required).
- Price: Price of the instrument (required).
The cash quantity must match the instrument quantity multiplied by the price (and price factor).
The cash quantity should be negative for buy trades and positive for sell trades.
You can download the sample file for reference: Download Sample File.
FX Mini-Future Trades
In addition to "Common Columns", the following columns are specific to FX mini-future trades:
- Account (Instrument): Name of the instrument account (required).
- Instrument Symbol: Symbol of the instrument (required).
- Quantity (Instrument): Quantity of the instrument (required).
- Account (Cash): Name of the cash account (required).
- Currency: Symbol of the currency (required).
- Quantity (Cash): Quantity of the cash (required).
- Price: Price of the instrument (required).
The cash quantity must match the instrument quantity multiplied by the price (and price factor).
The cash quantity should be negative for buy trades and positive for sell trades.
You can download the sample file for reference: Download Sample File.
Fund Investment Action
In addition to "Common Columns", the following columns are specific to fund investment actions:
- Account Name: Name of the account (required).
- Currency: Symbol of the investment currency (required).
- Quantity: Quantity of the investment (required).
- NAV per Share: NAV per share (required).
- Share Count: Share count (optional).
- Share Class Name: Name of the share class (required).
- Investor Name: Name of the investor agent (required).
- Promoter Name: Name of the promoter agent (optional).
You can download the sample file for reference: Download Sample File.