FDC3 icon indicating copy to clipboard operation
FDC3 copied to clipboard

Improve the definition of the Position context type

Open kriswest opened this issue 2 years ago • 3 comments

Enhancement Request

FDC3 already defines a Position context type, however, it is more simplistic than necessary. Enhance the existing type to better represent a Position.

Use Case:

Provide a more accurate represent a financial position relating to a specified instrument, which may be used to visualize or otherwise analyze that position. May also be used to compose a type representing a Portfolio.

Contexts

Position

Represents a financial position (a holding in a particular instrument).

The Position type goes hand-in-hand with the Portfolio type, which represents multiple holdings in a combination of instruments.

The position schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.

Details
Property Type Required Example Value
type string Yes 'fdc3.position'
id object No { positionId: '6475' }
name string No 'My Apple shares'
instrument Instrument Yes { type: 'fdc3.instrument', ... }
holding number Yes 2000000
trades TradeList * No [{ type: 'fdc3.trade, ... }, ... ]
basis Valuation ** No { type: 'fdc3.valuation', ... }
current Valuation ** No { type: 'fdc3.valuation', ... }
gain number No 8000000
restricted number No 4000

* See issue #655 ** See issue #652

Example
const position = {
    type: "fdc3.position",
    instrument: {
      type: "fdc3.instrument",
      id: {
        ticker: "AAPL"
      }
    },
    holding: 2000000,
    trades: [{
        type: "fdc3.trade",
        instrument: {
          type: "fdc3.instrument",
          id: {
            ticker: "AAPL"
          }
        },
        tradeTimeRange: {
          type: "fdc3.timeRange",
          starttime: "2020-09-01T08:00:00.000Z"
        },
        settleTimeRange: {
          type: "fdc3.timeRange",
          starttime: "2020-09-02T08:00:00.000Z"
        },
        quantity: {
          units: 1000000
        },
        open: {
          type: 'fdc3.valuation',
          value: 20000000.0,
          price: 20.0,
          CURRENCY_ISOCODE: 'USD'
        },
        location: "XYZ",
        account: "cash"
      },
      {
        type: "fdc3.trade",
        instrument: {
          type: "fdc3.instrument",
          id: {
            ticker: "AAPL"
          }
        },
        tradeTimeRange: {
          type: "fdc3.timeRange",
          starttime: "2020-09-08T08:00:00.000Z"
        },
        settleTimeRange: {
          type: "fdc3.timeRange",
          starttime: "2020-09-09T08:00:00.000Z"
        },
        quantity: {
          units: 1000000
        },
        open: {
          type: 'fdc3.valuation',
          value: 22000000.0,
          price: 22.0,
          CURRENCY_ISOCODE: 'USD'
        },
        location: "XYZ",
        account: "cash"
      }
    ],
    basis: {
      type: "fdc3.valuation",
      price: 21.00,
      value: 42000000,
      CURRENCY_ISOCODE: 'USD'
    },
    current: {
      type: "fdc3.valuation",
      price: 25.00,
      value: 50000000,
      CURRENCY_ISOCODE: 'USD'
      code: "USD"
    }
  },
  gain: 8000000,
  restricted: 0
};

fdc3.raiseIntent("ViewChart", position);

Additional Information

... please add any other information that can provide additional detail for this enhancement request

kriswest avatar Mar 31 '22 10:03 kriswest

One of the key classifiers for many buy-sides when visualising a position is strategy. Less common, but still used in some buy-side sectors, are positions broken down by tax lots. I appreciate applications could use custom elements to identify these but I would be interested to know what other contributors think about making these optional elements?

dominicgifford avatar Apr 21 '22 09:04 dominicgifford

How would one indicate a short position? Do we need an indicator field or should we keep it simple and rely on a negative quantity?

nemery-flextrade avatar Apr 27 '22 17:04 nemery-flextrade

@dominicgifford happy to add optional elements where they make sense for shared context. What would you suggest for adding:

  • strategy (optional string field)?
  • break down by tax lots

@nemery-flextrade Negative holding amount?

kriswest avatar May 11 '22 16:05 kriswest