Notifications
Clear all
VBA & Macros
2
Posts
2
Users
0
Reactions
106
Views
Topic starter
Hi all, I'm trying to create a macro that imports historical data from Yahoo finance automating the use of the web query.
My inputs are 1) the ticker, 2) start date, 3) end date, 4) data frequency (daily, weekly, monthly).
I'm now stuck with this error: "Unable to fetch data from yahoo finance", but I'm not sure what I'm doing wrong now.
Posted : 27/07/2023 5:31 am
I used Power Query to get the data for Altria from Yahoo Finance. Here is the Mcode for that import.
Loaded one year's daily values very quickly.
let
Source = Web.Page(Web.Contents("https://finance.yahoo.com/quote/MO/history?p=MO")),
Data0 = Source{0}[Data]
in
Data0
Posted : 27/07/2023 4:53 pm