# 18|ALTERYX – Stock Money?

BYU Student Author: @Marco
Reviewers: @klayton, @Hyrum
Estimated Time to Solve: 15 Minutes

We provide the solution to this challenge using:

• Alteryx

Overview
You are a stock analyst who was recently hired at a stockbroker called Stonks Stocks. The company does stock performance reports on the 11th of every month and compares the open price to the 52-week low of each stock. It’s February 11th and your boss would like you to analyze some of the most popular stocks that the company’s clients hold for the report. He gave you some instructions and you got right to work. Thankfully, you still remember what you learned in your Data Analytics class and decided to use Alteryx for this job.

Instructions

1. The “Stock” column includes the ticker & open price for the stock.
2. Separate the “Stock” column into a “Ticker” column and “Open" column.
3. Calculate the % in which the 52-week low increased by to get to the open price and put it into a new column. (Show 4 decimal places)
4. Add a \$ to the numbers in the “Open” & “52-week low” columns by making new columns and naming them “Open Price” & “52-Week Low”.
5. Add a % to the column that has your % you calculated from 3. by making a new column and naming it “Increase %”. (Should look like: 45.21%)
6. Filter the data to only show stocks that had a 25% or more increase in their 52-week low.
7. You noticed that the data has some duplicates, so make sure to get rid of them.
8. Sort the data with the “Increase %” column in descending order.
9. These should be your column headers in order: Ticker, 52-week low, Open Price, Increase %

Data Files

Suggestions and Hints

Calculating the % increase:

• Calculate the difference between the Open and 52-low week columns. Then divide the difference by the 52-week low.

• Use a formula tool with the ToString formula to convert the data into new columns and string while + ‘\$’ or ‘%’ to it.

Solution

Interesting use of regex! Definitely a great skill to have. I opted for text to columns instead.

4 Likes

Great challenge! I always love using RegEx! Here is my solution:

1 Like

Great challenge! It was great practice understanding the different types of data (string, double) and switching between those data types. Here is my solution:

2 Likes

Great challenge, I ended up using text to columns to parse the first column. I also like adding browse tools to the filter and unique tools to see what is getting filtered out.

Here’s my solution:

A simple and clean challenge. I tried to use as few tools as possible so I opted for cleaning in the formula tool using left and right, coupled with findstring functions.

Challenge18_solution_Jae.yxzp (23.3 KB)

1 Like

Stonks Stocks.yxmd (10.3 KB)
Great beginner challenge!

I opted to use regex and I kept the original “Open”, “52-Week Low”, “Increase” columns to see the effect of different data types on sorting. This one, I sorted by “increase” DESC which is a “double” data type. I tried sorting by “increase %” which is a “V_WString” data type and seems like the results are the same.

This is a great recap on alteryx! I am unable to post my solution in alteryx because I am a new user, but here is a screenshot of my solution.

Here’s what I did

techhub.yxmd (15.9 KB)
Challenge18_Dataset_Stonks_Stocks.csv (5.4 KB)

Here’s my solution. Thanks for setting up this problem! It definitely helped me to remember the things I had learned in my Data Analytics class.

Great Challenge! Super quick and fairly simple with a few catches to look out for. I opted to parse the data with RegEx because that’s what I’m most comfortable with. I’ve attached a screen shot of my solution as I am unable to attach my Alteryx file.

Heres my solution! Definitely great practice.

1 Like

I cut down on a few icons but I think our solutions match. Great challenge!

That was a fun one! Here is my solution:

2 Likes

I liked using the remove duplicate tool in this practice. I probably wouldn’t have considered checking for duplicates, but is something I will do going forward! It is helpful having a tool that can check for and remove duplicates quickly.

3 Likes

TechHub2.yxmd (13.9 KB)

Here is my answer! Great practice!

Loved using RegEx in my solution!
TechHubStockMoney_BenOehler.csv (12.9 KB)

StockMoney.yxmd (13.2 KB)