Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the definition of the Position context type #656

Open
Tracked by #680 ...
kriswest opened this issue Mar 31, 2022 · 3 comments
Open
Tracked by #680 ...

Improve the definition of the Position context type #656

kriswest opened this issue Mar 31, 2022 · 3 comments
Labels
Context Data & Intents Contexts & Intents Discussion Group enhancement New feature or request

Comments

@kriswest
Copy link
Contributor

kriswest commented Mar 31, 2022

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 kriswest added enhancement New feature or request Context Data & Intents Contexts & Intents Discussion Group labels Mar 31, 2022
@dominicgifford
Copy link
Contributor

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?

@nemery-flextrade
Copy link

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?

@kriswest
Copy link
Contributor Author

@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 kriswest added this to the 2.0-candidates milestone May 17, 2022
@kriswest kriswest modified the milestones: 2.0-candidates, 2.1-candidates May 27, 2022
@kriswest kriswest modified the milestones: 2.1-candidates, 2.2 candidates Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Context Data & Intents Contexts & Intents Discussion Group enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants