Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using PCA study similarities in stock behaviour In this example we will use stock prices of 9 companies from Jan 2015 to Mar 2023. Four
Using PCA study similarities in stock behaviour In this example we will use stock prices of 9 companies from Jan 2015 to Mar 2023. Four of the companies belong to the Tech sector and four belong to the Financial sector. There is one company which is unknown. We will use PCA to analyse these stocks and guess the sector to which the unknown company belongs to. The data is given in stocks.csv which we import as a data frame using pandas. This dataframe has 2052 rows and 9 columns. Since we are intersted in trends rather than actual stock prices, the data is converted to percent change using .pct_change(). This is common practice when looking for trends in time series data
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started