' Excel for Windows. Needs VBA-JSON 2.3.1: import its JsonConverter.bas ' and tick Tools > References > Microsoft Scripting Runtime Sub FundOverlap() ' Read both funds' files; each has the date of its own issuer's file Dim funds As Object, http As Object, t As Variant Set funds = CreateObject("Scripting.Dictionary") For Each t In Array("VOO", "QQQ") ' ServerXMLHTTP does not read the proxy set in Windows: behind a ' company proxy, create MSXML2.XMLHTTP.6.0 instead Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0") http.Open "GET", "https://tickerinside.com/api/v1/fund/" _ & LCase(t) & ".json", False http.setRequestHeader "User-Agent", _ "MyProject/1.0 (+https://example.com)" http.send If http.Status <> 200 Then Err.Raise 513, , "HTTP " & http.Status Set funds(t) = JsonConverter.ParseJson(http.responseText) Debug.Print t & " holdings_as_of " & funds(t)("holdings_as_of") Next t ' Overlap by weight, as the site computes it: for every ticker both ' funds hold, add the smaller of its two weights Dim a As Object, b As Object, overlap As Double, inBoth As Long Set a = funds("VOO")("holdings") Set b = funds("QQQ")("holdings") For Each t In a.Keys If b.Exists(t) Then overlap = overlap + WorksheetFunction.Min(a(t), b(t)) inBoth = inBoth + 1 End If Next t Debug.Print "overlap by weight " & Format(overlap, "0.0") & "%, " _ & inBoth & " companies in both" ' The lines to print under the figure, one per fund file Debug.Print funds("VOO")("cite_as") Debug.Print funds("QQQ")("cite_as") End Sub