Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #69: Web Stock Data

MattD
Alteryx Alumni (Retired)

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!

Former Alteryx, Inc. Support Engineer, Community Data Architect, Data Scientist then Data Engineer
patrick_digan
17 - Castor
17 - Castor
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
BenMoss
ACE Emeritus
ACE Emeritus

Learn some new things thanks to this one!

 

Spoiler
2017-05-08_19-10-53.png
MarqueeCrew
20 - Arcturus
20 - Arcturus

same as patrick

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Joe_Mako
12 - 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

alex
11 - 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
challenge 69challenge 69MacroMacroresultsresults
alex
11 - Bolide

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

NicoleJohnson
ACE Emeritus
ACE Emeritus

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
MarqueeCrew
20 - Arcturus
20 - Arcturus

@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 restart. Order shall return.
Please Subscribe to my youTube channel.
DanG_dup_78
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!