Date of publishing: 2021-12-31. Last verified date the script worked: 2021-12-31.
While I wait for something of a technical nature to occur, which allows me to automate this process, you can contact me at svendsentech@gmail.com and I will provide instructions. The price is 10 USD or 89 NOK.
It is sold "as is", without support, under the MIT license. I will not (necessarily) help you use it and I am not obligated to update it if the data structure it relies on at morningstar.com changes and makes the script unusable. NB! This is very likely to happen sooner or later. Beware it can break tomorrow and your investment is wasted unless you have deeper technical knowledge and can fix/update it yourself. That said, I do intend to update it if it is feasible and not too demanding. I wrote this script in October, and as of New Year's Eve 2021-12-31, it still works.
An attempt has been made to keep the script usable in more manual ways than providing a link as a parameter value. Such as pasting the holdings table from the web page, using a mouse, into a text file that you can provide as a parameter value to the script. I also tried to add support for the PDF format paste output, but that does currently not work (2021-12-31). Pasting the HTML table from Morningstar into a file, saving it and then processing it works as well, and is more likely to continue working longer.
The script requires PowerShell. PowerShell comes built-in with Windows 7 and newer. Most people today use Windows 10 (or 11).
Here is example output against the URL "https://lt.morningstar.com/sm7hnx89hb/snapshot/default.aspx?tab=12&LanguageId=en-US&SecurityToken=F0GBR04HHA]2]1]FONOR%24%24ALL_475&Id=F0GBR04HHA&ClientFund=1&CurrencyId=NOK".
PS /home/joakim/Documents> ./Get-HoldingsReport.ps1 -Uri 'https://lt.morningstar.com/sm7hnx89hb/snapshot/ default.aspx?tab=12&LanguageId=en-US& SecurityToken=F0GBR04HHA]2]1]FONOR%24%24ALL_475&Id=F0GBR04HHA& ClientFund=1&CurrencyId=NOK' Number of holdings: 136 Total invested amount: 2,392,395,229 Average value of each holding: 17,591,141 Top 15 holdings sorted by value: Name Sector Country Currency % Market Value (NOK) ---- ------ ------- -------- - ------------------ Novo Nordisk A/S Class B Healthcare Denmark DKK 9.27 224,415,891.00 Atlas Copco AB B Industrials Sweden SEK 5.45 131,972,679.00 Telefonaktiebolaget L M Ericsson Class B Technology Sweden SEK 3.42 82,748,458.00 EQT AB Ordinary Shares Financial Services Sweden SEK 3.21 77,635,251.00 Nokia Oyj Technology Finland EUR 3.04 73,595,721.00 Nordea Bank Abp Financial Services Finland SEK 2.96 71,604,980.00 Volvo AB B Industrials Sweden SEK 2.64 63,974,417.00 Vestas Wind Systems A/S Industrials Denmark DKK 2.40 58,140,613.00 Skandinaviska Enskilda Banken AB Class A Financial Services Sweden SEK 2.22 53,765,723.00 Orsted A/S Utilities Denmark DKK 2.20 53,166,838.00 Assa Abloy AB Class B Industrials Sweden SEK 2.15 51,921,983.00 Epiroc AB Share B Industrials Sweden SEK 2.10 50,895,053.00 Sandvik AB Industrials Sweden SEK 2.08 50,453,114.00 KONE Oyj Class B Industrials Finland EUR 2.02 48,996,099.00 ABB Ltd Industrials Switzerland CHF 1.85 44,792,539.00 Number of holdings per country: Name Count ---- ----- Sweden 70 Norway 24 Denmark 21 Finland 19 Switzerland 1 United Kingdom 1 Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 70 1,173,744,790 49.06 16,767,783 8,250,171 Denmark 21 616,988,003 25.79 29,380,381 12,068,432 Finland 19 325,266,669 13.60 17,119,298 10,066,294 Norway 24 201,834,951 8.44 8,409,790 6,450,944 Switzerland 1 44,792,539 1.87 44,792,539 44,792,539 United Kingdom 1 29,768,277 1.24 29,768,277 29,768,277 Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 35 780,126,701 32.61 22,289,334 10,525,838 Healthcare 9 380,616,552 15.91 42,290,728 12,068,432 Financial Services 15 376,309,388 15.73 25,087,293 14,371,531 Technology 9 195,259,926 8.16 21,695,547 7,471,783 Consumer Defensive 13 147,168,889 6.15 11,320,684 7,771,527 Basic Materials 15 143,603,070 6.00 9,573,538 7,475,682 Consumer Cyclical 15 128,918,724 5.39 8,594,582 4,529,933 Communication Services 10 96,875,145 4.05 9,687,514 10,230,630 Real Estate 12 85,935,044 3.59 7,161,254 6,207,822 Utilities 2 57,581,790 2.41 28,790,895 28,790,895 Not Classified 1 0 0.00 0 0 # Top 15 holdings. # Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 8 563,366,678 23.55 70,420,835 58,870,070 Denmark 3 335,723,342 14.03 111,907,781 58,140,613 Finland 3 194,196,800 8.12 64,732,267 71,604,980 Switzerland 1 44,792,539 1.87 44,792,539 44,792,539 # Top 15 holdings. # Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 8 501,146,497 20.95 62,643,312 51,408,518 Healthcare 1 224,415,891 9.38 224,415,891 224,415,891 Financial Services 3 203,005,954 8.49 67,668,651 71,604,980 Technology 2 156,344,179 6.54 78,172,090 78,172,090 Utilities 1 53,166,838 2.22 53,166,838 53,166,838 PS /home/joakim/Documents>
Above, the script used the default value of 15. Here I demonstrate the -NumberOfTopHoldings parameter and provide the value 25, in order to list statistics about the top 25 companies.
PS /home/joakim/Documents> ./Get-HoldingsReport.ps1 -Uri 'https://lt.morningstar.com/sm7hnx89hb/snapshot/ default.aspx?tab=12&LanguageId=en-US& SecurityToken=F0GBR04HHA]2]1]FONOR%24%24ALL_475&Id=F0GBR04HHA& ClientFund=1&CurrencyId=NOK' -NumberOfTopHoldings 25 Number of holdings: 136 Total invested amount: 2,392,395,229 Average value of each holding: 17,591,141 Top 25 holdings sorted by value: Name Sector Country Currency % Market Value (NOK) ---- ------ ------- -------- - ------------------ Novo Nordisk A/S Class B Healthcare Denmark DKK 9.27 224,415,891.00 Atlas Copco AB B Industrials Sweden SEK 5.45 131,972,679.00 Telefonaktiebolaget L M Ericsson Class B Technology Sweden SEK 3.42 82,748,458.00 EQT AB Ordinary Shares Financial Services Sweden SEK 3.21 77,635,251.00 Nokia Oyj Technology Finland EUR 3.04 73,595,721.00 Nordea Bank Abp Financial Services Finland SEK 2.96 71,604,980.00 Volvo AB B Industrials Sweden SEK 2.64 63,974,417.00 Vestas Wind Systems A/S Industrials Denmark DKK 2.40 58,140,613.00 Skandinaviska Enskilda Banken AB Class A Financial Services Sweden SEK 2.22 53,765,723.00 Orsted A/S Utilities Denmark DKK 2.20 53,166,838.00 Assa Abloy AB Class B Industrials Sweden SEK 2.15 51,921,983.00 Epiroc AB Share B Industrials Sweden SEK 2.10 50,895,053.00 Sandvik AB Industrials Sweden SEK 2.08 50,453,114.00 KONE Oyj Class B Industrials Finland EUR 2.02 48,996,099.00 ABB Ltd Industrials Switzerland CHF 1.85 44,792,539.00 Essity AB Class B Consumer Defensive Sweden SEK 1.79 43,345,766.00 Genmab A/S Healthcare Denmark DKK 1.68 40,539,766.00 Coloplast A/S Class B Healthcare Denmark DKK 1.55 37,553,773.00 NIBE Industrier AB Class B Industrials Sweden SEK 1.50 36,322,875.00 Swedbank AB Class A Financial Services Sweden SEK 1.45 35,162,556.00 A. P. Moller Maersk A/S B Industrials Denmark DKK 1.43 34,578,353.00 Svenska Handelsbanken AB Class A Financial Services Sweden SEK 1.30 31,442,233.00 Hennes & Mauritz AB Class B Consumer Cyclical Sweden SEK 1.29 31,148,734.00 AstraZeneca PLC Healthcare United Kingdom GBP 1.23 29,768,277.00 DNB Bank ASA Financial Services Norway NOK 1.17 28,312,870.00 Number of holdings per country: Name Count ---- ----- Sweden 70 Norway 24 Denmark 21 Finland 19 Switzerland 1 United Kingdom 1 Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 70 1,173,744,790 49.06 16,767,783 8,250,171 Denmark 21 616,988,003 25.79 29,380,381 12,068,432 Finland 19 325,266,669 13.60 17,119,298 10,066,294 Norway 24 201,834,951 8.44 8,409,790 6,450,944 Switzerland 1 44,792,539 1.87 44,792,539 44,792,539 United Kingdom 1 29,768,277 1.24 29,768,277 29,768,277 Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 35 780,126,701 32.61 22,289,334 10,525,838 Healthcare 9 380,616,552 15.91 42,290,728 12,068,432 Financial Services 15 376,309,388 15.73 25,087,293 14,371,531 Technology 9 195,259,926 8.16 21,695,547 7,471,783 Consumer Defensive 13 147,168,889 6.15 11,320,684 7,771,527 Basic Materials 15 143,603,070 6.00 9,573,538 7,475,682 Consumer Cyclical 15 128,918,724 5.39 8,594,582 4,529,933 Communication Services 10 96,875,145 4.05 9,687,514 10,230,630 Real Estate 12 85,935,044 3.59 7,161,254 6,207,822 Utilities 2 57,581,790 2.41 28,790,895 28,790,895 Not Classified 1 0 0.00 0 0 # Top 25 holdings. # Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 13 740,788,842 30.96 56,983,757 50,895,053 Denmark 6 448,395,234 18.74 74,732,539 46,853,302 Finland 3 194,196,800 8.12 64,732,267 71,604,980 Switzerland 1 44,792,539 1.87 44,792,539 44,792,539 United Kingdom 1 29,768,277 1.24 29,768,277 29,768,277 Norway 1 28,312,870 1.18 28,312,870 28,312,870 # Top 25 holdings. # Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 10 572,047,725 23.91 57,204,772 50,674,084 Healthcare 4 332,277,707 13.89 83,069,427 39,046,770 Financial Services 6 297,923,613 12.45 49,653,936 44,464,140 Technology 2 156,344,179 6.54 78,172,090 78,172,090 Utilities 1 53,166,838 2.22 53,166,838 53,166,838 Consumer Defensive 1 43,345,766 1.81 43,345,766 43,345,766 Consumer Cyclical 1 31,148,734 1.30 31,148,734 31,148,734 PS /home/joakim/Documents>
A demonstration of the -Country parameter where I provide the value Sweden to list only Swedish companies.
PS /home/joakim/Documents> ./Get-HoldingsReport.ps1 -Uri 'https://lt.morningstar.com/sm7hnx89hb/snapshot/ default.aspx?tab=12&LanguageId=en-US& SecurityToken=F0GBR04HHA]2]1]FONOR%24%24ALL_475&Id=F0GBR04HHA& ClientFund=1&CurrencyId=NOK' -NumberOfTopHoldings 25 -Country Sweden Number of holdings: 70 Total invested amount: 1,173,744,790 Average value of each holding: 16,767,783 Top 25 holdings sorted by value: Name Sector Country Currency % Market Value (NOK) ---- ------ ------- -------- - ------------------ Atlas Copco AB B Industrials Sweden SEK 5.45 131,972,679.00 Telefonaktiebolaget L M Ericsson Class B Technology Sweden SEK 3.42 82,748,458.00 EQT AB Ordinary Shares Financial Services Sweden SEK 3.21 77,635,251.00 Volvo AB B Industrials Sweden SEK 2.64 63,974,417.00 Skandinaviska Enskilda Banken AB Class A Financial Services Sweden SEK 2.22 53,765,723.00 Assa Abloy AB Class B Industrials Sweden SEK 2.15 51,921,983.00 Epiroc AB Share B Industrials Sweden SEK 2.10 50,895,053.00 Sandvik AB Industrials Sweden SEK 2.08 50,453,114.00 Essity AB Class B Consumer Defensive Sweden SEK 1.79 43,345,766.00 NIBE Industrier AB Class B Industrials Sweden SEK 1.50 36,322,875.00 Swedbank AB Class A Financial Services Sweden SEK 1.45 35,162,556.00 Svenska Handelsbanken AB Class A Financial Services Sweden SEK 1.30 31,442,233.00 Hennes & Mauritz AB Class B Consumer Cyclical Sweden SEK 1.29 31,148,734.00 Samhallsbyggnadsbolaget i Norden AB Class B Real Estate Sweden SEK 0.72 17,517,075.00 SKF AB B Industrials Sweden SEK 0.67 16,319,379.00 Skanska AB Class B Industrials Sweden SEK 0.66 16,030,494.00 Boliden AB Basic Materials Sweden SEK 0.66 15,908,647.00 Sinch AB Communication Services Sweden SEK 0.65 15,787,563.00 Telia Company AB Communication Services Sweden SEK 0.65 15,751,956.00 Svenska Cellulosa AB B Basic Materials Sweden SEK 0.63 15,228,959.00 Electrolux AB B Consumer Cyclical Sweden SEK 0.60 14,544,497.00 Kinnevik AB Class B Financial Services Sweden SEK 0.59 14,371,531.00 Husqvarna AB Class B Industrials Sweden SEK 0.56 13,531,448.00 Thule Group AB Consumer Cyclical Sweden SEK 0.53 12,851,124.00 Castellum AB Real Estate Sweden SEK 0.51 12,396,658.00 Number of holdings per country: Name Count ---- ----- Sweden 70 Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 70 1,173,744,790 100.00 16,767,783 8,250,171 Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 20 495,641,115 42.23 24,782,056 10,197,498 Financial Services 9 240,148,558 20.46 26,683,173 14,371,531 Consumer Cyclical 10 87,404,208 7.45 8,740,421 5,972,317 Technology 2 85,565,238 7.29 42,782,619 42,782,619 Real Estate 10 73,194,768 6.24 7,319,477 6,207,822 Consumer Defensive 4 70,317,415 5.99 17,579,354 10,204,451 Basic Materials 7 52,415,608 4.47 7,487,944 5,897,852 Communication Services 5 50,119,376 4.27 10,023,875 11,908,996 Healthcare 2 18,938,504 1.61 9,469,252 9,469,252 Not Classified 1 0 0.00 0 0 # Top 25 holdings. # Amount and percent invested per country: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Sweden 25 921,028,173 78.47 36,841,127 31,148,734 # Top 25 holdings. # Amount and percent invested per sector: Name Count Amount Percent Avg. amount Median ---- ----- ------ ------- ----------- ------ Industrials 9 431,421,442 36.76 47,935,716 50,453,114 Financial Services 5 212,377,294 18.09 42,475,459 35,162,556 Technology 1 82,748,458 7.05 82,748,458 82,748,458 Consumer Cyclical 3 58,544,355 4.99 19,514,785 14,544,497 Consumer Defensive 1 43,345,766 3.69 43,345,766 43,345,766 Communication Services 2 31,539,519 2.69 15,769,760 15,769,760 Basic Materials 2 31,137,606 2.65 15,568,803 15,568,803 Real Estate 2 29,913,733 2.55 14,956,866 14,956,867 PS /home/joakim/Documents>
Minimum cookies is the standard setting. This website uses Google Analytics and Google Ads, and these products may set cookies. By continuing to use this website, you accept this.