Hi,
I have a dataset that contains stocks and financial ratios of communication services companies from different quarters. I would like to analyze the relationship between the stock price and the financial ratios. What kind of analysis should I conduct? Here is the spreadsheet:
Hello,
I have read your initial post again. And now I think I understand ... 🤔🤔
You would just like to study the relationship between the stock price and the financial ratio's, right?
In that case, build one observation per company and then do a regression-based model with PROC REG or PROC GENMOD (dependent on the stock price distribution) or any of the other SAS/Stat regression procedures.
To get one observation for a company you need to transpose and compress the input time series with time series dimension reduction techniques. You can use PROC TSMODEL for that.
Time Series Dimension Reduction (TSDR) is extremely popular in Time Series Data Mining (TSDM). It allows you to use time series as predictors in cross-sectional data.
Koen
Hello,
I haven't looked at your Excel data, but I suspect you have input time series (interval=Quarter) to predict a target series (stock price) and this for (across) several companies.
This is called Time Series Cross Sectional data or panel data, so you need PROC PANEL (SAS/ETS) or PROC TSCSREG (SAS/ETS) or PROC GLIMMIX (SAS/STAT).
There are several video's on Panel Data Modelling on the SAS video portal (https://video.sas.com/).
You can also look for PROC PANEL papers here: https://support.sas.com/rnd/app/ets/papers/index.html
Good luck,
Koen
Hello,
I haven't looked at your data (reluctant to download).
The stock-price for company X is a time series (on a quarterly basis if I remember well from your first post), isn't it?
Are the financial ratio's for company X also time series (with the same frequency)?
The easiest thing is to do frequency conversion if inputs and target don't have the same interval.
Once that's done you can of course use (multiple) input time series to predict a target series. There are a dozen of possibilities to do that (like transfer function models).
But if you want to do it for all companies simultaneously you need models suitable for panel data.
Koen
OK.
So, for every company you have:
, correct?
You cannot predict the absolute height of a stock price from financial ratio's. You can probably predict stock price fluctuations from financial ratio's to a certain extent (!!) but not the absolute height of the stock price. A large company can only raise a small amount of capital on the stock exchange, for example.
Cheers,
Koen
Hello,
I have read your initial post again. And now I think I understand ... 🤔🤔
You would just like to study the relationship between the stock price and the financial ratio's, right?
In that case, build one observation per company and then do a regression-based model with PROC REG or PROC GENMOD (dependent on the stock price distribution) or any of the other SAS/Stat regression procedures.
To get one observation for a company you need to transpose and compress the input time series with time series dimension reduction techniques. You can use PROC TSMODEL for that.
Time Series Dimension Reduction (TSDR) is extremely popular in Time Series Data Mining (TSDM). It allows you to use time series as predictors in cross-sectional data.
Koen
I don't understand that last question very well.
Suppose you have 5 financial ratio's (X1-X2-X3-X4-X5) and 1000 companies (CompID1-CompID1000). That's 5000 time series in total.
You could take the mean of all time series and then you have one summary value (for every ratio per company = 5000 values). But that one value is only characterizing your ratio-x time series for CompID-y in a very limited way (far too limited!!). You need for sure several statistics to characterize your ratio-x time series (or you need all the coefficients of a generic Time Series model).
Depending on the complexity and the length of the time series you probably need between 3 and 10 variable values to properly characterize your time series (that is 3 to 10 values for every time series / financial ratio per company = [3 to 10] * 5 values per company) and get rid of the noise in the full time series.
I often use a Singular Value Decomposition with 5 or 6 dimensions to compress my input time series.
See for example here:
SAS® Visual Forecasting: Time Series Packages | 2020.1.5
Time Series Dimension Reduction Package
Example 11.5 Dimension Reduction by Singular Value Decomposition
https://go.documentation.sas.com/doc/en/castsp/v_004/castsp_tdr_sect033.htm
Example 11.6 Dimension Reduction by Random Projection
https://go.documentation.sas.com/doc/en/castsp/v_004/castsp_tdr_sect034.htm
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.