{
  "tool_id": "correlation-matrix-visualizer",
  "slug": "correlation-matrix-visualizer",
  "path": "/correlation-matrix-visualizer/",
  "mode": "client_side",
  "usage": "Client-side visualizer. Open https://aifinhub.io/correlation-matrix-visualizer/ and paste a wide-format returns CSV. Pearson correlation heatmap, eigenvalue spectrum, condition number, and effective-N render in-browser.",
  "methodology": "https://aifinhub.io/methodology/correlation-matrix-visualizer/",
  "sample_input": {
    "tool": "correlation-matrix-visualizer",
    "name": "",
    "values": [
      0.01,
      0.02,
      -0.005,
      0.015,
      -0.01
    ],
    "series": [
      {
        "name": "SPY",
        "values": [
          -0.012843,
          0.005562,
          -0.001332,
          0.001416,
          0.00507,
          0.006107,
          0.002444,
          0.004272,
          -0.002891,
          0.003178,
          0.00737,
          -0.004567,
          0.014355,
          0.001974,
          -0.016935,
          -0.010687,
          0.009715,
          -0.01316,
          0.002776,
          0.009778,
          -0.009737,
          0.008914,
          -0.01883,
          0.001544,
          0.003879,
          -0.002691,
          0.008995,
          0.005585,
          -0.014312,
          0.001967,
          -0.002495,
          -0.006723,
          -0.0054,
          -0.005222,
          0.008261,
          -0.015781,
          0.006483,
          0.017268,
          -0.00435,
          0.005738,
          0.014771,
          -0.005635,
          0.018411,
          0.003669,
          0.018039,
          0.009265,
          -0.010561,
          0.01211,
          -0.002028,
          0.01238,
          0.009775,
          0.000424,
          -0.000378,
          0.00086,
          0.012193,
          0.014755,
          -0.00371,
          0.00031,
          -0.002188,
          -0.002964,
          -0.001428,
          0.010406,
          0.01182,
          0.015166,
          0.001065,
          -0.014253,
          0.007842,
          -0.001464,
          0.00991,
          -0.008253,
          0.00308,
          -0.001735,
          -0.003622,
          0.000376,
          0.012419,
          0.008751,
          -0.001225,
          -0.002371,
          -0.006899,
          -0.001794,
          -0.004752,
          0.001034,
          0.017518,
          -0.00552,
          -0.004451,
          -0.010671,
          0.001204,
          0.000336,
          0.007898,
          -0.007922
        ]
      },
      {
        "name": "QQQ",
        "values": [
          -0.031916,
          0.002634,
          -0.011198,
          0.005715,
          0.018762,
          -0.004141,
          0.018624,
          0.014513,
          -0.017789,
          0.009618,
          -0.014868,
          -0.018661,
          0.034994,
          -0.001143,
          0.000166,
          -0.004298,
          0.022187,
          -0.026972,
          0.009172,
          0.01473,
          0.023033,
          -0.000811,
          -0.027468,
          -0.001253,
          0.003574,
          -0.000692,
          0.025005,
          -0.013477,
          0.008568,
          0.019203,
          0.008534,
          -0.022472,
          -0.003708,
          0.006383,
          0.008743,
          -0.029749,
          0.009631,
          0.018816,
          -0.015848,
          0.00575,
          0.017909,
          -0.00919,
          0.010624,
          -0.001175,
          0.028728,
          0.01482,
          -0.001177,
          0.021045,
          -0.008706,
          0.005515,
          0.016491,
          -0.005974,
          0.013348,
          0.027957,
          0.00799,
          0.014165,
          0.002433,
          0.003304,
          -0.007366,
          0.018022,
          0.010786,
          -0.008399,
          0.004896,
          0.040605,
          -0.009269,
          -0.008257,
          0.014355,
          0.013894,
          -0.012422,
          -0.016563,
          -0.006656,
          0.004864,
          0.006888,
          0.017675,
          0.006275,
          -0.002203,
          -0.016777,
          -0.004303,
          -0.013832,
          0.005731,
          -0.015763,
          -0.002646,
          0.001072,
          -0.014675,
          -0.010051,
          -0.01666,
          0.001137,
          -0.008157,
          -0.019128,
          -0.015845
        ]
      },
      {
        "name": "TLT",
        "values": [
          -0.00348,
          -0.009532,
          -0.009495,
          0.000817,
          -0.013736,
          -0.015894,
          0.004593,
          -0.001288,
          -0.001997,
          -0.001013,
          -0.003634,
          0.009398,
          0.00554,
          -0.006177,
          -0.001788,
          0.002708,
          0.002679,
          -0.001143,
          0.012816,
          -0.004805,
          -0.002266,
          -0.003514,
          0.000678,
          -0.007108,
          0.000749,
          -0.01357,
          -0.007189,
          -0.005792,
          0.004324,
          -0.004217,
          0.004665,
          0.002427,
          0.005592,
          -0.004194,
          -0.004193,
          0.003148,
          -6e-06,
          -0.009479,
          -0.002826,
          -0.008549,
          -0.006357,
          -0.003985,
          0.001047,
          0.008022,
          0.003591,
          0.00166,
          0.004496,
          -0.005119,
          0.00236,
          -0.004365,
          -0.003749,
          -0.002313,
          0.014693,
          -0.00415,
          0.001604,
          -0.006466,
          -0.001518,
          -0.003088,
          0.008285,
          -0.002019,
          -0.003034,
          -0.000748,
          -0.018276,
          -0.001174,
          0.002488,
          0.006478,
          -0.014903,
          0.007155,
          -0.002883,
          0.006239,
          0.009014,
          -0.004145,
          0.004603,
          -0.006128,
          -0.003621,
          0.001894,
          -0.002112,
          0.003447,
          0.004219,
          0.006163,
          -0.004697,
          -0.007648,
          -0.003381,
          0.01139,
          -0.010122,
          -0.001475,
          -0.008228,
          0.001127,
          -0.001511,
          0.009058
        ]
      },
      {
        "name": "GLD",
        "values": [
          -0.003609,
          -0.012319,
          -0.021546,
          -0.002169,
          -0.004775,
          0.005111,
          0.013753,
          -0.00704,
          -0.010183,
          -0.003458,
          0.001939,
          -0.000451,
          0.011093,
          -0.010069,
          0.005469,
          -0.000815,
          0.006727,
          -0.005372,
          0.007507,
          -0.007042,
          0.009549,
          0.005708,
          -0.005644,
          -0.016476,
          0.003559,
          0.013871,
          -0.008904,
          0.008505,
          -0.004197,
          0.006495,
          0.005826,
          0.008331,
          -0.008403,
          0.003081,
          -0.009843,
          -0.00735,
          -0.003255,
          -0.004908,
          0.003471,
          -0.009825,
          -0.007725,
          -0.006961,
          -0.000686,
          -0.004962,
          0.004599,
          0.002335,
          -0.009787,
          -0.005587,
          -0.007217,
          0.011802,
          -0.013529,
          -0.007763,
          -0.00092,
          -0.015819,
          -0.006159,
          0.007921,
          0.001881,
          0.005359,
          -0.004545,
          -0.002579,
          0.009985,
          -0.002308,
          -0.012648,
          -0.010327,
          -0.001297,
          -0.014548,
          -0.002061,
          -0.003556,
          0.006531,
          -0.004733,
          -0.002126,
          0.000976,
          -0.002299,
          0.000269,
          0.006541,
          -0.019175,
          0.001406,
          0.012067,
          0.006353,
          0.001284,
          -0.003715,
          -0.01589,
          0.005951,
          -0.008455,
          -0.008778,
          -0.00084,
          0.003219,
          0.012961,
          0.011134,
          -0.008317
        ]
      },
      {
        "name": "XLE",
        "values": [
          -0.002192,
          -0.018241,
          -0.012517,
          -0.002803,
          0.018884,
          0.020946,
          0.010029,
          -0.009388,
          -0.006646,
          -0.001194,
          -0.005981,
          -0.018604,
          0.024496,
          -0.022882,
          -0.016148,
          -0.007482,
          0.016719,
          -0.015994,
          0.002954,
          -0.003783,
          -0.028953,
          -0.018085,
          -0.013025,
          -0.009177,
          -0.009086,
          -0.02035,
          0.011058,
          0.010048,
          0.006068,
          -0.003638,
          -0.015797,
          0.030323,
          0.012459,
          0.001212,
          -0.005477,
          -0.01347,
          -0.011012,
          0.015869,
          0.018623,
          -0.002396,
          -0.018033,
          -0.003577,
          0.014222,
          0.025015,
          0.030849,
          0.015369,
          -0.013728,
          0.019073,
          -0.006631,
          -0.004999,
          -0.012875,
          0.008698,
          -0.027086,
          -0.002681,
          0.015284,
          -0.011607,
          -0.002139,
          -0.010654,
          0.003021,
          0.028778,
          -0.033415,
          0.006098,
          0.013032,
          -0.019776,
          -0.011667,
          -0.000766,
          0.017896,
          -0.011583,
          -0.00953,
          -0.014308,
          0.016854,
          -0.004918,
          0.009794,
          0.019875,
          -0.004763,
          0.025017,
          0.007828,
          0.003628,
          0.002251,
          -0.010632,
          -0.001618,
          -0.005849,
          -7.2e-05,
          -0.000858,
          -0.007604,
          -0.006899,
          0.038137,
          -0.011498,
          -0.000513,
          -0.009543
        ]
      }
    ]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "values": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "required": [
      "tool",
      "name",
      "values"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "correlation_matrix": {
        "type": "array",
        "items": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "avg_abs_off_diagonal": {
        "type": "number"
      },
      "condition_number": {
        "type": "number"
      },
      "largest_eigenvalue": {
        "type": "number"
      },
      "explained_by_first_pc": {
        "type": "number"
      },
      "effective_n_strategies": {
        "type": "number"
      }
    }
  }
}
