The solution to last week's challenge is HERE.
Today’s challenge is for all our investors out there! Say you wanted to perform your own unique analyses on a stock, or at least have its trends handy for notification if it was hitting an established threshold of yours. How would you obtain this data?
For our challenge, we’ll be using Yahoo Finance! Use the URL below to gather useable (parsed; tabulated format) stock data on AYX (Alteryx!):
As of May 2017 - the Yahoo API has closed its service. Instead please use the following URL to get historical data: https://www.google.com/finance/historical?output=csv&q=AYX *Due to differences in the API services - there will be no field in the resulting response for "Adj Close"
As of December 2017, the previously used URL produces an error. We've updated this Challenge to point to a new link to download a dataset on attributes of mushrooms. The Start File and Solution have been updated to reflect this change. Happy Challenging!
I took it a little further to practice with iterative macros and provided a 50 day moving average and 52 week high and low for each day. Volume is a bit skewed since the first day of trading was much larger than normal, but that will auto correct once there are more than 50 days in the data set.
My solution - just for kicks, I went a bit of a different route and created an app.
I figured if you had this data and you were looking for certain criteria (such as Adj Close price changed by more than +/- 5% from the prior day, or if it reached a price greater than or less than a certain value), you would want to know. So I added a Daily Change % calculation and then some app parameters. Set it up to just look at "yesterday's" results (i.e. last Friday if today is Monday, otherwise previous day). This would be easy enough to add another prompt asking for the stock symbol, which could then update the text input accordingly and get you results for any stock...
Ok, go the extra mile. Try the yahoo finance API and get some real data! I like your approach and encourage you to use an API to deliver value.