I appear to be having an issue with the downloaders, that seems to be based on the GMT of the exchange where the data is coming from.
I only pull down data from the NZX and ASX (NZ and Australia) and also monitor some key US indices like the S&P500 DJI etc
Recently with my ASX symbols I needed to know the days of the week.
Used DayOfWeek() and noticed some days were listed as 0 and some 6 i.e. Sunday and Saturday.
Thinking there was an error in the data, I downloaded the entire database again with the "Historical Stock Market Data" downloader,
again it shows up this inconsistency occasionally with Sunday and Saturday listed as trading days, also tried with "Yahoo EOD Quotes" and same thing.
Created a new account with just ^NZ50,^AORD,^GSPC
Used Yahoo EOD quotes to download from April 1st to April the 24th 2020
For the NZ50 16 bars are downloaded with dates from the 31st March to the 23rd of April , but with the data from the 1st of April to the 24th of April
For the AORD It starts at the 31st of March and ends at the 24th, also 16 bars. Pricing after the 6th of April is correct, before is following day pricing.
Also it jumps from the 2nd of April to the 6th of April, Friday the 3rd is missing.
For the ^GSPC it is perfect.
NZ is GMT + 12, AU is GMT + 10, US-New York is GMT -4
Had a look at the Downloaders URL script, and tried adjusting the P1 and P2 values with UNIX time offsets, but not much luck.
Mucked around a bit with the generated URL from yahoo EOD Quotes (AORD below) and cant seem to alter the outcome.
Putting the below into a browser like Firefox will get the data nicely formatted in JSON, and you can check the first timestamp is 31st Mar 2020
Ok, been trying alternate downloaders like YLoader etc to get around this date issue, but found other small quirks using these packages.
Had a closer look at the Data Yahoo was presenting for download via say "Yahoo EOD" and it seems the timestamp has been adjusted for the exchanges GMT offset.
So all I have done is altered the "Pre Script" to add the exchanges GMT offset to the timestamps and this appears to have fixed the problem.
All my ASX and NZX data is now correct, i.e. no Sunday or Saturday trading days. Also checked the S&P500/DJI and also appears correct. (note, was not wrong previously, but this didn't break it)
Not 100% sure this will work with every exchange, hence not uploading, but for GMT > 8ish exchanges like Australia and New Zealand. the data and dates, line up correctly now.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.