Quick question and a request for help on "chart-scraping"
Posted: Tue Jun 02, 2020 5:48 pm
Do we have any computer/software/scripting experts on here? I have a quick question/issue:
I am trying to get some daily data on certain mutual funds (including two that were closed/liquidated a few years ago) in order to run a backtest in Excel and PV. CRSP only has monthly data--not that I have access to CRSP anyway....I've got about 20,000 reasons for not having said access and they all have George Washington's picture on them, LOL--so it seems the best source may be Morningstar. If you go to (for instance), say, http://quotes.morningstar.com/chart/fund/chart?t=AIVSX you will see you can get daily TR data back to 1971 and monthly TR data before that. I really on need the data from 1-1-71 to 12-31-1979 because after that I have the daily data (from the start of 1980 onwards all the way to to liquidation/close) I downloaded from Yahoo Finance.
The problem is how to get it from Morningstar without having to manually read it and input it into Excel one day at a time. For a still-extant fund like the above it is no issue; Morningstar's new site lets you download the data in .CSV or .XLS format all the way back to fund inception. The problem is what to do for the two funds that were closed/merged (one in 2016 and one two years or so later). If you go into the abovementioned chart (I use that as an example since AIVSX goes all the way back to 1934 and thus very few funds are older than it) and type in the ticker of any fund closed after roughly mid-2015 you will get a line on the chart also showing that fund's daily/monthly return from inception as well all the way to whenever in 2016 or '17 or '18 or '19 it closed....but again, you will have to view and write down the data for each day manually (and there are over 240 trading days a year).
I am aware that in Firefox or Chrome you can press F12 and open the debugger and get a link that lets you copy it and download the weekly total return data (and monthly before that) in a .txt format but again, this is not the actual daily data shown in the chart itself from 1-1-1971 onwards.
Does anyone know enough about JSON (or whatever kind of scripting is behind these charts) to know of a way to download the above type of data without having to manually record it one day at a time? Thank you.
I am trying to get some daily data on certain mutual funds (including two that were closed/liquidated a few years ago) in order to run a backtest in Excel and PV. CRSP only has monthly data--not that I have access to CRSP anyway....I've got about 20,000 reasons for not having said access and they all have George Washington's picture on them, LOL--so it seems the best source may be Morningstar. If you go to (for instance), say, http://quotes.morningstar.com/chart/fund/chart?t=AIVSX you will see you can get daily TR data back to 1971 and monthly TR data before that. I really on need the data from 1-1-71 to 12-31-1979 because after that I have the daily data (from the start of 1980 onwards all the way to to liquidation/close) I downloaded from Yahoo Finance.
The problem is how to get it from Morningstar without having to manually read it and input it into Excel one day at a time. For a still-extant fund like the above it is no issue; Morningstar's new site lets you download the data in .CSV or .XLS format all the way back to fund inception. The problem is what to do for the two funds that were closed/merged (one in 2016 and one two years or so later). If you go into the abovementioned chart (I use that as an example since AIVSX goes all the way back to 1934 and thus very few funds are older than it) and type in the ticker of any fund closed after roughly mid-2015 you will get a line on the chart also showing that fund's daily/monthly return from inception as well all the way to whenever in 2016 or '17 or '18 or '19 it closed....but again, you will have to view and write down the data for each day manually (and there are over 240 trading days a year).
I am aware that in Firefox or Chrome you can press F12 and open the debugger and get a link that lets you copy it and download the weekly total return data (and monthly before that) in a .txt format but again, this is not the actual daily data shown in the chart itself from 1-1-1971 onwards.
Does anyone know enough about JSON (or whatever kind of scripting is behind these charts) to know of a way to download the above type of data without having to manually record it one day at a time? Thank you.