Skip to main content
Glama

TickerInside ETF Holdings

Stock comparison and weight in an ETF

compare_stocks
Read-onlyIdempotent

Use this when the user asks how two US stocks compare on size, valuation, returns, risk or correlation, or what weight and rank one stock has inside one named ETF, for example META in QQQ. For two stocks it returns market cap, P/E and dividend yield from market data, returns, volatility, worst fall, beta, the correlation of weekly returns over up to three years and the covered ETFs holding both. For a stock and an ETF it returns whether the ETF holds the stock, at what weight and rank among the shares it holds outright, with the date of the ETF's holdings; a derivative-based ETF's swaps, futures and options are in its profile (get_etf_holdings), not here. A stock is in the data with about two years of US prices, and sooner for a recent listing a covered ETF holds. Returns are past, not a forecast. Not for comparing two ETFs (compare_etfs), or a company's business or products.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aYesA US stock ticker, for example NVDA. An ETF ticker also works on one side, for example QQQ.
bYesThe other ticker, for example AMD.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairNo
sourceNo
coveredNo
membershipNoFor a stock and an ETF.
weeks_usedNo
not_in_dataNo
prices_as_ofNo
correlation_3yNo
funds_holding_bothNo
funds_holding_both_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / membership / description
      Previous value: -"For a stock and a fund."New value: +"For a stock and an ETF."
  2. Changed3 schema fields changed
    • changedInput schema / properties / a / description
      Previous value: -"A US stock ticker, for example NVDA. An ETF ticker also works."New value: +"A US stock ticker, for example NVDA. An ETF ticker also works on one side, for example QQQ."
    • changedInput schema / properties / b / description
      Previous value: -"The other ticker."New value: +"The other ticker, for example AMD."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "patternProperties": {
      +    "^[A-Z0-9.\\-^=/ *&]{1,16}$": {
      +      "properties": {
      +        "beta": {
      +          "description": "Over three years.",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "dividend_yield_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "expense_ratio_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "kind": {
      +          "enum": [
      +            "stock",
      +            "fund"
      +          ],
      +          "type": "string"
      +        },
      +        "market_cap_bn": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "pe": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "return_1y_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "return_3y_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "volatility_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "worst_fall_3y_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "correlation_3y": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "covered": {
      +      "type": "boolean"
      +    },
      +    "funds_holding_both": {
      +      "items": {
      +        "properties": {
      +          "fund": {
      +            "type": "string"
      +          },
      +          "holdings_as_of": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "weight_a_pct": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "weight_b_pct": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "fund"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "funds_holding_both_count": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "membership": {
      +      "description": "For a stock and a fund.",
      +      "properties": {
      +        "holdings_as_of": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "in_fund": {
      +          "type": "boolean"
      +        },
      +        "rank": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "weight_pct": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "in_fund"
      +      ],
      +      "type": "object"
      +    },
      +    "not_in_data": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "pair": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "prices_as_of": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "properties": {
      +        "api_urls": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "license": {
      +          "type": "string"
      +        },
      +        "provider": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "provider",
      +        "license",
      +        "api_urls"
      +      ],
      +      "type": "object"
      +    },
      +    "weeks_used": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources