$29
You have been hired to be a data analyst at an equity investment fund. You will need to use your data analysis skills to look at market data and come up with an investment strategy.
One way to approach this problem is by looking at the historical performance of some equities, identifying a group of high performers, and trying to identify common factors that contributed to their success.
If these factors can be identified, you can build an investment strategy by selecting other equities to purchase in the future which exhibit similar characteristics to your high-performing group.
:
1. Download the data. Create a new database for this assignment.
Create tables for the data (in your new database), and load all of the .csv data into them.
Calculate all annual returns for each symbol for each year and sort them by performance. (not daily - just yearly is good enough).
Annual Return Formula: (good for one year only - multi-year is different).
R = (end_price / start_price) - 1 (%)
Example: Start at $100, end at $115:
R = ($115 / $100) - 1 = (1.15) - 1 = 0.15 = 15%
Select a group of 30-60 or so companies with very good annual returns. You may want the top group, or you may want to eliminate a few from the very top - if you are suspicious that they might be anomalies, and that the company cannot consistently repeat these very high returns.
Save these high-performing companies into a table for use in HW5.
Hint: CREATE TABLE awesome_performers AS
SELECT ... FROM ... WHERE ... ;
Hint II: You may want to use OFFSET if you don't want to take the top 30.
I.e., to eliminate the top 3 and take numbers 4 through 34:
SELECT ... LIMIT 30 OFFSET 3;
You can use more than 30 companies if you feel it gives you better results, but use at least 30.
Submit the SQL script that you used to create the database and the tables. Submit the SQL script that you used to calculate the annual returns and save
your high-performers to a new table of their own.