Averaging Stock Return Correlations by Country and Sector
Summary
The document proposes grouping companies by country and sector, calculating return correlations within the relevant groups, and averaging the pairwise coefficients for four categories: same country and sector, same country across sectors, different countries in the same sector, and different countries and sectors. A company metadata table with country and sector identifiers supports these selections.
It notes that grouping by only country or only sector includes pairs that may share the other attribute. Requiring every member of a group to have a different sector can create many possible combinations, so the aggregation rule needs to be specified carefully. The response offers a starting approach rather than a full statistical procedure: it does not address return frequency, missing data, unequal pair counts, or uncertainty in the resulting averages.
Key ideas
- Build a company table with country and sector labels before selecting pairs.
- Compute correlations of returns for pairs matching each country-sector category.
- Grouping by one attribute alone can include pairs that also match on the other attribute.
- Define how to handle pair selection and aggregation when groups contain mixed sectors or countries.
Tags
Full text
# Average correlations of stock returns # Average correlations of stock returns Say I had a pool of companies (specifically the Latin American Countries). The task was to work out the 'Correlation coefficient between the returns of any 2 companies selected from "different countries and different sectors" in the Latin American region. Instead of just working out that coefficient, there are 4 variations of the task I wish to do: - same country & same sector - same country & different sector - different country & same sector - different country & different sector How would you go about doing this? I've started by gathering stock price info on certain companies and then have created a matrix with the correlations of every pair's stock price returns, then from there in order to get specific categories I need to choose the right pairs of companies and then average those coefficients. ## Answer by KaiSqDist (score 1) https://quant.stackexchange.com/a/78331 I suppose there will be "4 variations" in your correlation matrix then, and even within each of these variations, there are different versions. For example, in case (1.), there could be Brazil-Industrial and Argentina-Financial (and the companies that exist within that specific country-sector). Before anything, I would create a dataframe containing the IDs of all the companies for the sake of the next 4 variations. - Same Country Same Sector - I would perform a group-by using the country and sectors to filter for all the different combinations with the same country and sectors and compute their correlation matrices. - Same Country Diff Sector - Just a group-by using the country and compute the correlation matrices (obviously there will be companies that have the same sector in this case, but if you want a group with all different sectors there will be "infinite" combinations of groups with various sizes). - Diff Country Same Sector - Just a group-by using the sector and compute the correlation matrices with the same drawbacks as (2.). - Diff Country Diff Sector - I would reckon that this is just the matrix that you have computed in the above. I don't think this is the best answer, but hopefully it starts the discussion and gives you some ideas.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.