👩💻 Join our community of thousands of amazing developers!
Given the selection of Danish investment funds from Sparindex and Danske Invest, it can be difficult to see how different the funds are. As a measure of similarity, one can calculate the overlap between two funds. The overlap between fund \(A\) and fund \(B\) will be calculated as: \[S_{AB} = \sum_{i} \sqrt{w_{A, i} \cdot w_{B, i}}\] Here, \(w_{A, i}\) is the weight of stock \(i\) in fund \(A\). This metric has the property that it is equal to \(1\) if the two funds are identical and \(0\) if ...