Skip to main content

Trade Upload

warning

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:

  1. Inflow/Outflow Actions
  2. Partial/Full Journal Entries
  3. Share Trades
  4. Bond Trades
  5. Structured Product Trades
  6. 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:

  1. The first row must contain the column headers.
  2. The separator must be a comma (,).
  3. The file must be encoded in UTF-8.
  4. 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:

  1. Subtype: Subtype of the trade/action (optional).
  2. Commitment Date: Date of the commitment (a.k.a. trade date).
  3. Settlement Date: Date of the settlement (a.k.a. value date, optional).
  4. Executed At: Time of the execution in HH:MM format (optional).
  5. Pseudo Order: The order (integer number) among other actions on the same date/time (optional).
  6. Reference: Reference of the action (optional).
  7. Internal Notes: Internal notes of the action (optional).
  8. Remarks: Remarks of the action (optional).

Inflow/Outflow Actions

In addition to "Common Columns", the following columns are specific to inflow/outflow actions:

  1. Account Name: Name of the account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity: Quantity of the instrument (required).
  4. Price: Price of the instrument (optional, defaults to 1).
  5. 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:

  1. Account Name (1): Name of the first account (required).
  2. Currency (1): Symbol of the first currency instrument (required).
  3. Quantity (1): Quantity of the first currency instrument (required).
  4. 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:

  1. Account Name (2): Name of the second account (required).
  2. Currency (2): Symbol of the second currency instrument (required).
  3. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (required).
  5. Currency: Symbol of the currency (required).
  6. Quantity (Cash): Quantity of the cash (required).
  7. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (required).
  5. Currency: Symbol of the currency (required).
  6. Quantity (Cash): Quantity of the cash (required).
  7. Quantity (Accrued): Quantity of the accrued cash (optional).
  8. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (required).
  5. Currency: Symbol of the currency (required).
  6. Quantity (Cash): Quantity of the cash (required).
  7. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (optional).
  5. Currency: Symbol of the currency (optional).
  6. Quantity (Cash): Quantity of the cash (optional).
  7. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (PnL): Name of the PnL account (optional, if netting-out PnL).
  5. Currency (PnL): Symbol of the currency (optional, if netting-out PnL).
  6. Quantity (PnL): Quantity of the PnL (optional, if netting-out PnL).
  7. 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:

  1. Account (Currency 1): Name of the first currency account (required).
  2. Currency 1: Symbol of the first currency (required).
  3. Quantity (Currency 1): Quantity of the first currency (required).
  4. Account (Currency 2): Name of the second currency account (optional, defaults to first currency account).
  5. Currency 2: Symbol of the second currency (required).
  6. Quantity (Currency 2): Quantity of the second currency (required).
  7. 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):

Quantity (Currency 1)×FX Rate=Quantity (Currency 2)\text{Quantity (Currency 1)} \times \text{FX Rate} = -\text{Quantity (Currency 2)}

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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (required).
  5. Currency: Symbol of the currency (required).
  6. Quantity (Cash): Quantity of the cash (required).
  7. 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:

  1. Account (Instrument): Name of the instrument account (required).
  2. Instrument Symbol: Symbol of the instrument (required).
  3. Quantity (Instrument): Quantity of the instrument (required).
  4. Account (Cash): Name of the cash account (required).
  5. Currency: Symbol of the currency (required).
  6. Quantity (Cash): Quantity of the cash (required).
  7. 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:

  1. Account Name: Name of the account (required).
  2. Currency: Symbol of the investment currency (required).
  3. Quantity: Quantity of the investment (required).
  4. NAV per Share: NAV per share (required).
  5. Share Count: Share count (optional).
  6. Share Class Name: Name of the share class (required).
  7. Investor Name: Name of the investor agent (required).
  8. Promoter Name: Name of the promoter agent (optional).

You can download the sample file for reference: Download Sample File.