The following request structures and sample responses should help guide you in setting up your Omega Point API queries, whether you're using the GraphiQL interface or preparing direct web requests.

The Omega Point API supports powerful querying capabilities that return metrics for factors, securities, and portfolios. Since the API gives clients the power to ask for exactly what they need and nothing more, you'll find that most object properties included in the examples below are optional and you may choose to omit certain properties from your queries.

Note: If your account has not been enabled with API access, please contact us first and start here.

Sample CURL Request

The CURL command below can be used as a template for making requests to the API. Modify the code block to insert your token in place of $OMEGA_POINT_PROVIDED_TOKEN. Queries converted to serialized JSON can be inserted into the query section of the request. Use the following sections in this article to learn how to formulate your queries.

curl \
    -XPOST \
    -H "Content-Type:application/json" \
    -H "Authorization: $OMEGA_POINT_PROVIDED_TOKEN" \
    -d '{"query": "{ models { id } }"}' \
    https://api.ompnt.com/graphql

Models

Return available models with associated metadata, including the date range of available data for factors and securities.

Request Structure

{
  models {
    id
    name
    availability {
      currentDate
      factorsStartDate
      securitiesStartDate
    }
  }
}

Sample Response

{
  "data": {
    "models": [
      {
        "id": "$MODEL_ID",
        "name": "$MODEL_NAME",
        "availability": {
          "currentDate": "2018-02-01",
          "factorsStartDate": "2014-01-02",
          "securitiesStartDate": "2014-01-02"
        }
      },
      {
        "id": "$MODEL_ID",
        "name": "$MODEL_NAME",
        "availability": {
          "currentDate": "2018-02-01",
          "factorsStartDate": "2014-01-02",
          "securitiesStartDate": "2014-01-02"
        }
      },
      ...
    ]
  }
}

Factors

Return model factors with associated data.

Request Structure

{
  model(id: "$MODEL_ID"){
    factors{
      id
      name
      category
    }
  }
}

Sample Response

{
  "data": {
    "model": {
      "factors": [
        ...,
        {
          "id": "Leverage",
          "name": "Leverage",
          "category": "style"
        },
        ...
        {
          "id": "NOK",
          "name": "Norwegian Krone",
          "category": "currency"
        },
        ...
      ]
    }
  }
}

Factor Performance

Return performance metrics between 2 dates (inclusive) for a given factor, sorted by date. Each day includes the percent change in factor price since the previous day (percentPriceChange1Day), the percent change in cumulative factor return since the start date (percentPriceChangeCumulative), and a Z-Score standardization of the factor return index (normalizedReturn).

Request Structure

{
  model(id: "$MODEL_ID"){
    factors(id: "Value"){
      name
      category
      performance(from: "2018-01-02", to: "2018-01-03"){
        date
        percentPriceChange1Day
        percentPriceChangeCumulative
        normalizedReturn
      }
    }
  }
}

Sample Response

{
  "data": {
    "model": {
      "factors": [
        {
          "name": "Value",
          "category": "style",
          "performance": [
            {
              "date": "2018-01-02",
              "percentPriceChange1Day": 0.0009012571,
              "percentPriceChangeCumulative": 0.0009012571,
              "normalizedReturn": -1.0163929483728602
            },
            {
              "date": "2018-01-03",
              "percentPriceChange1Day": 0.0004142126,
              "percentPriceChangeCumulative": 0.001315843,
              "normalizedReturn": -0.8541657992374031
            }
          ]
        }
      ]
    }
  }
}

Security Performance

Return performance metrics between 2 dates (inclusive) for a given security, sorted by date. Each day includes the percent change in cumulative factor return since the start date (percentPriceChangeCumulative), broken down into factor and specific decompositions as percentages of total return.

Request Structure

{
  model(id: "$MODEL_ID") {
    security(ticker: "MSFT", exchange: "XNAS") {
      descriptors(on: "2017-01-02"){
        name
        ticker
        mic
        country
        sector
      }
      performance(from: "2017-01-02", to: "2017-01-03") {
        date
        percentPriceChangeCumulative {
          total
          attribution {
            summary {
              factors
              specific
            }
            factors(id: "Growth") {
              id
              name
              value
              category
            }
          }
        }
      }
    }
  }
}

Sample Response

{
  "data": {
    "model": {
      "security": {
        "descriptors": {
          "name": "MICROSOFT CORP",
          "ticker": "MSFT",
          "mic": "XNAS",
          "country": "US",
          "sector": "Software"
        },
        "performance": [
          {
            "date": "2017-01-02",
            "percentPriceChangeCumulative": {
              "total": 0,
              "attribution": {
                "summary": {
                  "factors": -0.0014515161,
                  "specific": 0.0014515161
                },
                "factors": [
                  {
                    "id": "Growth",
                    "name": "Growth",
                    "value": 0.000019727962,
                    "category": "style"
                  }
                ]
              }
            }
          },
          {
            "date": "2017-01-03",
            "percentPriceChangeCumulative": {
              "total": 0.0070808246,
              "attribution": {
                "summary": {
                  "factors": 0.008809108,
                  "specific": -0.0017282837
                },
                "factors": [
                  {
                    "id": "Growth",
                    "name": "Growth",
                    "value": 0.000028803755,
                    "category": "style"
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
}

Portfolios

Return available portfolios with associated data.

Request Structure

{
  portfolios {
    id
    name
    alias
    availableFrom
    rolloverPositionSetToCurrentDate
    defaultModelId
  }
}

Sample Response

{
  "data": {
    "portfolios": [
      {
        "id": "$PORTFOLIO_ID",
        "name": "$PORTFOLIO_NAME",
        "alias": "$PORTFOLIO_NAME_ALIAS",
        "availableFrom": "2019-01-02",
        "rolloverPositionSetToCurrentDate": true,
        "modelId": "$MODEL_ID",
      },
      {
        "id": "$PORTFOLIO_ID2",
        "name": "$PORTFOLIO_NAME2",
        "alias": "$PORTFOLIO_NAME_ALIAS2",
        "modelId": "$MODEL_ID",
        "availableFrom": "2017-02-01",
        "rolloverPositionSetToCurrentDate": false,
      },
      ...
    ]
  }
}

Portfolio Performance

Return portfolio performance in the context of an assigned model.

Request Structure

{
  model(id: "$MODEL_ID"){
    portfolio(id: "$PORTFOLIO_ID"){
      performance(from: "2018-01-02", to: "2018-01-03") {
        date
        percentReturnCumulative{
          total
          attribution{
            summary {
              specific
              factors
            }
            factors {
              id
              name
              category
              value
            }
          }
        }
      }
    }
  }
}

Sample Response

{
  "data": {
    "model": {
      "portfolio": {
        "performance": [
          {
            "date": "2018-01-02",
            "percentReturnCumulative": {
              "total": 0.009588893,
              "attribution": {
                "summary":{
                  "specific": 0.0008727118,
                  "factors": 0.008716181
                },
                "factors": [
                  ...,
                  {
                    "id": "AeroDefense",
                    "name": "Aerospace & Defense",
                    "category": "sector",
                    "value": 0.0000023456541
                  },
                  ...,
                  {
                    "id": "GlobalMarket",
                    "name": "Global Market",
                    "category": "market",
                    "value": 0.000508783
                  },
                  ...
                ]
              }
            }
          },
          {
            "date": "2018-01-03",
            "percentReturnCumulative": {
              "total": 0.011178819,
              "attribution": {
                "summary": {
                  "specific": -0.0012590782,
                  "factors": 0.012437898
                },
                "factors": [
                  ...,
                  {
                    "id": "AeroDefense",
                    "name": "Aerospace & Defense",
                    "category": "sector",
                    "value": 0.00012991608
                  },
                  ...,
                  {
                    "id": "GlobalMarket",
                    "name": "Global Market",
                    "category": "market",
                    "value": 0.007742822
                  },
                  ...
                ]
              }
            }
          }
        ]
      }
    }
  }
}

Portfolio Risk

Request Structure

{
  model(id: "$MODEL_ID"){
    portfolio(id: "$PORTFOLIO_ID"){
      risk(from: "2018-01-02", to: "2018-01-03") {
        date
        total
        attribution{
          summary{
            factors
            specific
          }
          factors{
            id
            name
            value
            category
          }
        }
      }
      riskContributors(on: "2017-01-03"){
        total
        id
        country
        sector
        percentEquity
        attribution{
          summary{
            factors
            specific
          }
        }
        percentEquity
      }
    }
  }
}

Sample Response

{
  "data": {
    "model": {
      "portfolio": {
        "risk": [
          {
            "date": "2018-01-02",
            "total": 0.10591546,
            "attribution": {
              "summary": {
                "factors": 0.9245716208739588,
                "specific": 0.07542837912604117
              },
              "factors": [
                ...,
                {
                  "id": "Automobiles",
                  "name": "Automobiles",
                  "value": 0.0016752944,
                  "category": "sector"
                },
                ...,
                {
                  "id": "ZA",
                  "name": "South Africa",
                  "value": -0.0062478613,
                  "category": "country"
                },
                ...
              ]
            }
          },
          ...
        ],
        "riskContributors": [
          ...,
          {
            "total": 0.008328307,
            "id": "GOOG.XNAS",
            "country": "US",
            "sector": "Internet Software & Services",
            "percentEquity": "0.0578",
            "attribution": {
              "summary": {
                "factors": 0.00815737,
                "specific": 0.00017093714
              }
            },
            "percentEquity": 0.010253776
          },
          ...,
          {
            "total": 0.009177951,
            "id": "SAP.XFRA",
            "country": "DE",
            "sector": "Internet Software & Services",
            "percentEquity": "0.041475863",
            "attribution": {
              "summary": {
                "factors": 0.009091822,
                "specific": 0.000086128675
              }
            },
            "percentEquity": 0.008343903
          },
          ...
        ]
      }
    }
  }
}

Did this answer your question?