{
  "version": "xarts.distribution/1",
  "family": "distribution",
  "operation": "frequency-distribution",
  "provenance": {
    "legacyId": "returndist"
  },
  "data": {
    "input": "bins",
    "unit": "%",
    "valueLabel": "Monthly return",
    "rows": [
      {
        "id": "bin-1",
        "lower": -12,
        "upper": -10,
        "count": 2
      },
      {
        "id": "bin-2",
        "lower": -10,
        "upper": -8,
        "count": 3
      },
      {
        "id": "bin-3",
        "lower": -8,
        "upper": -6,
        "count": 5
      },
      {
        "id": "bin-4",
        "lower": -6,
        "upper": -4,
        "count": 8
      },
      {
        "id": "bin-5",
        "lower": -4,
        "upper": -2,
        "count": 14
      },
      {
        "id": "bin-6",
        "lower": -2,
        "upper": 0,
        "count": 18
      },
      {
        "id": "bin-7",
        "lower": 0,
        "upper": 2,
        "count": 25
      },
      {
        "id": "bin-8",
        "lower": 2,
        "upper": 4,
        "count": 20
      },
      {
        "id": "bin-9",
        "lower": 4,
        "upper": 6,
        "count": 12
      },
      {
        "id": "bin-10",
        "lower": 6,
        "upper": 8,
        "count": 7
      },
      {
        "id": "bin-11",
        "lower": 8,
        "upper": 10,
        "count": 4
      },
      {
        "id": "bin-12",
        "lower": 10,
        "upper": 12,
        "count": 2
      }
    ]
  },
  "calculation": {
    "binning": {
      "method": "provided",
      "order": "strictly-increasing-nonoverlap"
    },
    "measure": "count",
    "statistics": {
      "source": "provided",
      "basis": "external-summary",
      "description": "Estadísticas externas declaradas en la referencia; no se deducen de las frecuencias agregadas.",
      "values": {
        "mean": 0.85,
        "stdDev": 4.32,
        "var95": -6.25,
        "cvar95": -8.1,
        "skewness": -0.42,
        "kurtosis": 3.85
      }
    }
  },
  "layout": {
    "view": "frequency-bars-and-statistics",
    "margin": {
      "top": 24,
      "right": 140,
      "bottom": 40,
      "left": 52
    },
    "domain": {
      "source": "provided",
      "extent": [
        -14,
        14
      ]
    },
    "yPadding": 0.15,
    "roundYMaximum": true,
    "niceY": true,
    "measureYMargin": false,
    "measureXEdges": false,
    "fitXTicks": false,
    "smartAxes": false,
    "proportionalTicks": false,
    "axisMeasurementNumerals": "proportional-nums",
    "axisInkPadding": 0,
    "xTicks": 8,
    "yTicks": 5
  },
  "marks": {
    "bars": {
      "color": "series.blue",
      "opacity": 0.7,
      "stroke": "series.blue",
      "strokeOpacity": 1,
      "strokeWidth": 1,
      "radius": 0
    },
    "zero": {
      "color": "textMuted",
      "width": 1,
      "dash": "4 3"
    },
    "band": null,
    "normal": {
      "color": "series.teal",
      "width": 2.5,
      "samples": 57,
      "interpolation": "natural"
    },
    "references": [
      {
        "statistic": "var95",
        "line": {
          "color": "series.red",
          "width": 1.5,
          "dash": "6 4"
        },
        "label": {
          "text": "VaR 95%",
          "dx": 4,
          "y": 12,
          "anchor": "start",
          "fontSize": null,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "value",
            "decimals": 1,
            "trim": true,
            "sign": false,
            "prefix": "",
            "suffix": ""
          }
        }
      },
      {
        "statistic": "cvar95",
        "line": {
          "color": "series.red",
          "width": 1.5,
          "dash": "2 3"
        },
        "label": {
          "text": "CVaR 95%",
          "dx": -4,
          "y": 26,
          "anchor": "end",
          "fontSize": null,
          "fontWeight": 600,
          "clampToPlot": false,
          "format": {
            "kind": "value",
            "decimals": 1,
            "trim": true,
            "sign": false,
            "prefix": "",
            "suffix": ""
          }
        }
      }
    ]
  },
  "summary": {
    "visible": true,
    "arrangement": "rows",
    "dx": 16,
    "dy": 8,
    "width": 118,
    "rowHeight": 18,
    "itemGap": 5,
    "labelX": 8,
    "valueX": 110,
    "firstBaseline": 18,
    "labelFontSize": 10,
    "valueFontSize": 10,
    "labelColor": "textMuted",
    "valueColor": "textPrimary",
    "box": {
      "color": "surface",
      "border": "border",
      "radius": 4,
      "paddingY": 12
    },
    "items": [
      {
        "statistic": "mean",
        "label": "Mean",
        "format": {
          "kind": "percent-points",
          "decimals": 2,
          "trim": true,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      },
      {
        "statistic": "stdDev",
        "label": "Std Dev",
        "format": {
          "kind": "percent-points",
          "decimals": 2,
          "trim": true,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      },
      {
        "statistic": "skewness",
        "label": "Skewness",
        "format": {
          "kind": "number",
          "decimals": 2,
          "trim": false,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      },
      {
        "statistic": "kurtosis",
        "label": "Kurtosis",
        "format": {
          "kind": "number",
          "decimals": 2,
          "trim": false,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      },
      {
        "statistic": "var95",
        "label": "VaR 95%",
        "format": {
          "kind": "percent-points",
          "decimals": 2,
          "trim": true,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      },
      {
        "statistic": "cvar95",
        "label": "CVaR 95%",
        "format": {
          "kind": "percent-points",
          "decimals": 2,
          "trim": true,
          "sign": false,
          "prefix": "",
          "suffix": ""
        }
      }
    ]
  },
  "labels": {
    "zero": "Zero",
    "normal": "Normal reference",
    "measureTitles": {
      "count": "",
      "probability": "Probability",
      "density": "Probability density"
    },
    "annotationFontSize": 12,
    "annotationGap": 8,
    "value": {
      "kind": "percent-points",
      "decimals": 0,
      "trim": true,
      "sign": true,
      "prefix": "",
      "suffix": ""
    },
    "tooltipRange": "{lower}–{upper}",
    "tooltipCount": "Frequency: {count}",
    "tooltipShare": "",
    "shareDecimals": 1
  },
  "annotations": [],
  "document": {
    "header": {
      "title": "Return Distribution",
      "subtitle": "Monthly returns against a normal distribution, with risk metrics"
    },
    "footer": {
      "source": "xarts · demo data",
      "notes": "Illustrative data to explore the chart and replace with your own."
    },
    "spacing": {
      "horizontalPadding": 24,
      "topPadding": 22,
      "bottomPadding": 24,
      "minimumTextGap": 6
    }
  },
  "presentation": {
    "theme": "anlak",
    "dimensions": {
      "width": 800,
      "height": 480
    },
    "locale": "en-US",
    "fonts": "reference",
    "surface": "theme",
    "framePadding": 24
  },
  "output": {
    "filename": "returndist",
    "embedSpec": true,
    "geometryDecimals": 2
  }
}
