Drafts

Also see Drafts.

Instruments

Also see Instruments.

Models

Also see Models.

Portfolios

Also see Portfolios.

Requirements

To preview the changes that would be applied to a portfolio when committing a draft, the draft must be in a valid state. That is:

  • it must be either a pure weight draft or a pure quantity draft, i.e. it cannot contain some positions by weight and some by quantity,

  • if it is a weight draft the sum of the weights must be 100% and

  • if it is a quantity draft the quantity of each instrument must be a product of its minimum lot size.

Please note that a 404 Not Found error will be returned if any of these requirements are not satisfied.

Resource representations

{
  "kind": "preview",
  "budget": decimal,
  "market_value": decimal,
  "exante_indicators": {
    "var5": decimal,
    "volatility": decimal,
    "var1": decimal,
    "maximum_drawdown_1_month": decimal,
    "maximum_drawdown_1_year": decimal,
    "risk": decimal,
    "cvar5": decimal,
    "cvar1": decimal,
    "downside_volatility": decimal,
    "shortfall_probability": decimal,
    "liquidity": decimal,
    "diversification": decimal
  },
  "positions": [
    {
      "kind": "position",
      "id": integer,
      "weight": decimal,
      "quantity": integer,
      "market_value": decimal,
      "created_at": datetime,
      "updated_at": datetime,
      "instrument": instrument
    },
    .
    .
    .
  ]
}

Methods


GET /models/:model_id/preview
Get a portfolio preview.

GET /portfolios/:portfolio_id/draft/algorithms/:algorithm_id/preview
Get a portfolio preview.

GET /portfolios/:portfolio_id/draft/preview
Get a portfolio preview.

GET /portfolios/:portfolio_id/pending_parent_update/preview
Get a portfolio preview.

Get a portfolio preview.

Params

Param Name Description
portfolio_id
Optional

The slug of the portfolio to get the preview for.


Value:

Must be String

algorithm_id
Optional

The algorithm to get the preview for.


Value:

Must be one of: equal_weight, equal_risk_contribution, optimization.

budget
Optional

The budget of the preview.


Value:

Must be decimal.