community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #69: Web Stock Data

Community Data Engineer
Community Data Engineer

The solution to last week's challenge is HERE.

 

Weekly Challenge 70.jpg

 

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!):

http://ichart.finance.yahoo.com/table.csv?s=AYX

 

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!

Spoiler
I went with download tool followed by some text to columns (\n to get rows and , to get columns), followed by dynamic rename  to get the column headings. The auto-field gets converts the strings to doubles, and the filter gets the data through 4/28 to match the sample output
Capture.PNG
Alteryx Certified Partner
Alteryx Certified Partner

Learn some new things thanks to this one!

 

Spoiler
2017-05-08_19-10-53.png
Alteryx Certified Partner
Alteryx Certified Partner

same as patrick

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
Quasar
Quasar
Spoiler
Only need two tools:
- Download URL to a Temporary File
- Dynamic Input configured to read in a comma separated CSV file, changing full path based on DownloadTempFile

69.png

Bolide

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. 

Spoiler
69a.JPGchallenge 6969b.JPGMacro69c.JPGresults
Bolide

@Joe_Mako- Nice solution.  Took me a bit to figure out the configuration of the second tool, but I got it to work.

Magnetar
Magnetar

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... 

 

Spoiler
WeeklyChallenge69.JPGWeeklyChallenge69App.JPG
Alteryx Certified Partner
Alteryx Certified Partner

@NicoleJohnson,

 

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.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Alteryx Alumni (Retired)

I don't know the answer, but I'd definitely like to know what it is and then learn how to build it in Alteryx Designer for myself. Thanks!