{
  "tool": "mcom-accounting--tax.arms_length_range",
  "name": "Arm’s length range and adjustment (CDU-BUS-ACTX-900)",
  "answers": "Is the tested party’s margin inside the interquartile range of the comparables, and if not, what adjustment brings it to the median?",
  "degree": {
    "id": "competency:mcom-accounting--tax",
    "code": "CDU-BUS-ACTX-900",
    "name": "MCom Accounting & Tax",
    "version": "1.0.0"
  },
  "reference": "OECD Transfer Pricing Guidelines (2022) ¶3.57 (interquartile range), ¶3.60–3.62 (outside the range: adjust to a point in it, e.g. the median); quartiles by linear interpolation (type 7)",
  "endpoint": "/faculty/mcom-accounting--tax/arms_length_range",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "comparableMargins",
      "testedMargin"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "comparableMargins": {
        "type": "array",
        "description": "Profit level indicator of each accepted comparable (e.g. net cost plus), as fractions",
        "items": {
          "type": "number"
        }
      },
      "testedMargin": {
        "type": "number",
        "description": "The tested party’s result on the same indicator, as a fraction",
        "minimum": -1,
        "maximum": 1
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "lowerQuartile",
      "median",
      "upperQuartile",
      "withinRange",
      "adjustedMargin",
      "adjustment"
    ],
    "properties": {
      "lowerQuartile": {
        "type": "number",
        "description": "Q1 of the comparables"
      },
      "median": {
        "type": "number",
        "description": "Median of the comparables"
      },
      "upperQuartile": {
        "type": "number",
        "description": "Q3 of the comparables"
      },
      "withinRange": {
        "type": "boolean",
        "description": "Q1 ≤ tested ≤ Q3"
      },
      "adjustedMargin": {
        "type": "number",
        "description": "Tested if within range, otherwise the median"
      },
      "adjustment": {
        "type": "number",
        "description": "Adjusted − tested"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "comparableMargins": [
      0.042,
      0.051,
      0.055,
      0.063,
      0.07,
      0.078,
      0.085,
      0.091
    ],
    "testedMargin": 0.035
  }
}