The financial analysis of RDUS reveals crucial factors influencing its capital needs. Increases in debt-equity ratio and equity multiplier indicate heightened reliance on debt for growth. This reliance is confirmed by a rise in long-term debt ratio. A slight uptick in WACC suggests higher borrowing costs. Decreases in current and quick Quarter imply
Part 1
Task 1
Visualize your capital structure by plotting the debt ratio (total liabilities / total equity) and each of the following ratios in an X-Y (scatter) chart (x is the ratio, y is the debt ratio) for your firm. Label each quarter of your data in the chart.
The scatter plots below vizualize RDUS capital structure. The Debt ratio is on the Y-axis for all plots, and all ratios are graph in the x-axis with the debt ratio always on the y-axis.
All plots have a 10% upward and downward neat band. They also have a lowess smoothed line to better show the trend.
Show the code
import pandas as pdimport plotly.graph_objects as goimport numpy as npfrom statsmodels.nonparametric.smoothers_lowess import lowessfrom plotly.subplots import make_subplots# Load datadata = pd.read_excel("C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx")# functiondef create_scatter_plot_traces(x_column_name, y_column_name, data): quarters_to_include = [f'Q{i}{year}'for year inrange(2017, 2024) for i inrange(1, 5)] filtered_data = data[data['Quarter'].isin(quarters_to_include)] lowess_result = lowess(filtered_data[y_column_name], filtered_data[x_column_name]) smoothed_y = lowess_result[:, 1] x_values = lowess_result[:, 0] ci =0.1* smoothed_y traces = [ go.Scatter( x=filtered_data[x_column_name], y=filtered_data[y_column_name], mode='markers', name='Data', customdata=filtered_data[['Quarter']], hovertemplate=f"<b>{x_column_name}:</b> %{{x}}<br><b>{y_column_name}:</b> %{{y}}<br><b>Quarter:</b> %{{customdata[0]}}<br>", showlegend=False ), go.Scatter( x=x_values, y=smoothed_y, mode='lines', name='Lowess Fit', showlegend=False ), go.Scatter( x=np.concatenate([x_values, x_values[::-1]]), y=np.concatenate([smoothed_y - ci, (smoothed_y + ci)[::-1]]), fill='toself', fillcolor='rgba(0,100,80,0.2)', line=dict(color='rgba(255,255,255,0)'), hoverinfo="skip", name='CI', showlegend=False ) ]return traces# Function to create a subplot figuredef create_subplot_figure(data): fig = make_subplots(rows=2, cols=4, subplot_titles=['ROA', 'T. Asset Turn.','PPE to Asset', 'Market to Book','Dep to Asset','ROE','Current Ratio','Div Pay Out' ])# Add traces metrics = ['Return on Assets', 'Total Asset Turnover', 'PPE to Asset ratio', 'Market to Book ratio', 'Depreciation to Asset ratio', 'Return on Equity', 'Current ratio', 'Dividend Pay Out ratio']for i, metric inenumerate(metrics, start=1):for trace in create_scatter_plot_traces(metric, 'Debt-Equity Ratio', data): fig.add_trace(trace, row=(i-1)//4+1, col=(i-1)%4+1)# Update layout fig.update_layout(height=800, width=1200, title_text="") # title# Show the plot fig.show()# Create and displaycreate_subplot_figure(data)
P1 Task 2
2. Do the observations all lie in a neat band with an upward or downward trend? If not, what may be some competing influences (maybe alternative ratios) that detract from a simple relationship between the debt ratio and this ratio? No, all ratios are extremely volatile, and they all have data points outside the upward and downward bands. All ratios besides the current ratio have a downward trend as the Debt-Equity Ratio increases. In general most ratios have around half the data points within 10% confidence interval bands. An OLS regression model done on this ratios prove that these ratios explained 67% of the dependent variable (Debt ratio) so their is many more independent variables that can affect Debt-Equity Ratio and any of the other ratios.
OLS Regression Result
Debt Ratio as the dependent variable and all eight ratios are in model
Debt-Equity Ratio = at + B1(‘Total Asset Turnover’) + B2(‘Return on Assets’) + B3(‘PPE to Asset ratio’) + B4(‘Market to Book ratio’) + B5(‘Depreciation to Asset ratio’) + B6(‘Return on Equity’) + B7(‘Current ratio’) + B8(‘Dividend Pay Out ratio’) + error
Show the code
# -----------------First Regression------------------import pandas as pdfrom sklearn.linear_model import LinearRegressionfrom statsmodels.regression.linear_model import OLSimport statsmodels.api as smfile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx"df = pd.read_excel(file_path)X = df[['Total Asset Turnover', 'Return on Assets', 'PPE to Asset ratio', 'Market to Book ratio', 'Depreciation to Asset ratio', 'Return on Equity', 'Current ratio', 'Dividend Pay Out ratio']]y = df['Debt-Equity Ratio']X_with_constant = sm.add_constant(X)model = OLS(y, X_with_constant).fit()print(model.summary())
OLS Regression Results
==============================================================================
Dep. Variable: Debt-Equity Ratio R-squared: 0.675
Model: OLS Adj. R-squared: 0.538
Method: Least Squares F-statistic: 4.929
Date: Tue, 19 Nov 2024 Prob (F-statistic): 0.00206
Time: 14:04:13 Log-Likelihood: 31.944
No. Observations: 28 AIC: -45.89
Df Residuals: 19 BIC: -33.90
Df Model: 8
Covariance Type: nonrobust
===============================================================================================
coef std err t P>|t| [0.025 0.975]
-----------------------------------------------------------------------------------------------
const 1.1580 0.624 1.856 0.079 -0.148 2.464
Total Asset Turnover -0.3908 0.488 -0.800 0.434 -1.413 0.632
Return on Assets -32.6595 15.694 -2.081 0.051 -65.507 0.188
PPE to Asset ratio 1.1454 2.268 0.505 0.619 -3.601 5.892
Market to Book ratio -0.0462 0.172 -0.269 0.791 -0.405 0.313
Depreciation to Asset ratio -72.0921 40.913 -1.762 0.094 -157.724 13.539
Return on Equity 18.5054 8.714 2.124 0.047 0.268 36.743
Current ratio 0.1077 0.086 1.254 0.225 -0.072 0.288
Dividend Pay Out ratio -0.0071 0.046 -0.155 0.879 -0.103 0.089
==============================================================================
Omnibus: 5.778 Durbin-Watson: 0.690
Prob(Omnibus): 0.056 Jarque-Bera (JB): 5.000
Skew: -1.034 Prob(JB): 0.0821
Kurtosis: 2.920 Cond. No. 5.78e+03
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[2] The condition number is large, 5.78e+03. This might indicate that there are
strong multicollinearity or other numerical problems.
P1 Task 3
3. Based on your observations, are any of these ratios more important in explaining the capital structure of your firm? Discuss the ones that you think might be. The M&M propositions indicate the leverage is explained by ROA and ROE when taxes are present or bankruptcy is a perceived possibility. Are any of these ratios correlated with ROE and ROA?
Base on the regression output, this observations do not explained the capital structure of the firm (debt-equity), as explained this variables explained this part of the debt-equity but the intercept shows there is many more things that impact debt-equity rather than this variables. Total asset turnover has a very high p-value which means it is not statistically significant in this model for the Debt ratio. ROE, and ROA are the only ratios that were statistically significant to the model. In the analysis, ROE and ROA are the only significant ratios, it implies these measures are critical in understanding the firm’s performance and risk profile in relation to the debt ratio. They are consistent with the M&M framework but also highlight the deviations from the ideal conditions proposed by M&M, such as the presence of taxes and bankruptcy risk, which affect the firm’s capital structure decision. This ties back to the M&M propositions, especially when considering implications like taxes and bankruptcy risks, which affect how ROE and ROA relate to the firm’s leverage and overall value. As shown in the below figure for Optimal capitl strucutre and the cost of capital for RDUS. As the Debt to equity level increases WACC will first enojoy the benefits of the tax shield but will eventually face consequences and expereinced higher cost of equity. The right graph illustrates the rise in cost of equity as RDUS takes on more Debt.
Show the code
import plotly.graph_objects as gofrom plotly.subplots import make_subplotsimport numpy as npfrom scipy.interpolate import interp1d# Given WACC, RU, RE, and D/E valuesWACC = np.array([0.1219, 0.12022592, 0.118915831, 0.118017781, 0.117595616, 0.117735128, 0.118553412, 0.120213529, 0.122948367, 0.127101203, 0.133198373])DE = np.array([0.000, 0.076, 0.162, 0.260, 0.373, 0.503, 0.656, 0.837, 1.057, 1.328, 1.670])RU = np.full_like(WACC, 0.1219)RE = np.array([0.1219, 0.1244, 0.1273, 0.1305, 0.1342, 0.1386, 0.1436, 0.1496, 0.1569, 0.1658, 0.1772])interp_funcs = [interp1d(DE, metric, kind='cubic') for metric in [WACC, RU, RE]]DE_new = np.linspace(min(DE), max(DE), 100)WACC_new, RU_new, RE_new = [func(DE_new) for func in interp_funcs]min_WACC_index = np.argmin(WACC_new)min_WACC_DE = DE_new[min_WACC_index]# Create subplotsfig = make_subplots(rows=1, cols=2, subplot_titles=('WACC and RU', 'RE'))# Add traces for WACC and RUfig.add_trace(go.Scatter(x=DE, y=WACC, mode='markers', name='WACC Markers', marker=dict(color='blue')), row=1, col=1)fig.add_trace(go.Scatter(x=DE_new, y=WACC_new, mode='lines', name='WACC Line', line=dict(color='blue')), row=1, col=1)fig.add_trace(go.Scatter(x=DE, y=RU, mode='markers', name='RU Markers', marker=dict(color='red')), row=1, col=1)fig.add_trace(go.Scatter(x=DE_new, y=RU_new, mode='lines', name='RU Line', line=dict(color='red')), row=1, col=1)# Add traces for RE fig.add_trace(go.Scatter(x=DE, y=RE, mode='markers', name='RE Markers', marker=dict(color='green')), row=1, col=2)fig.add_trace(go.Scatter(x=DE_new, y=RE_new, mode='lines', name='RE Line', line=dict(color='green')), row=1, col=2)# Add a vertical line fig.add_shape(type="line", x0=min_WACC_DE, y0=min(WACC_new), x1=min_WACC_DE, y1=max(WACC_new), line=dict(color="blue", width=2), row=1, col=1)fig.add_annotation(x=min_WACC_DE +0.05, y=max(WACC_new), text="Optimal WACC", showarrow=False, font=dict(size=12, color="blue"), row=1, col=1)# Update layout for both subplotsfig.update_layout(title_text='Optimal Capital Structure and the Cost of Capital', xaxis_title='Debt-Equity Ratio (D/E)', yaxis_title='Cost of Capital (%)')# Show the figurefig.show()
P1 Task 4
4. M&M tell us that a firm cannot increase its value by increasing its debt (Section 16.3), but that increased debt can change the required returns for shareholders. In the text (Section 17.4), we read Ben Graham argues for high dividend payout leading to high market values for a firm.
Has your firm tended to increase its leverage? Yes, RDUS has increased its reliance on debt for growth as evidenced by increases in debt-equity ratio and equity multiplier.
Does your firm pay increased returns to shareholders via dividends? Yes, they pay dividend but is less than a dollar per year per share.
If they do, describe how are the dividends paid/net income and the debt ratio are related? Base on previous reports on RDUS (Term paper 1 & 2), RDUS has done several investments that have increased their operational cost, debt, interest, and contractual obligations. The results of this investments has resulted in highest cost of equity due to higher risk for investors. RDUS investment decisions have affected their Debt ratio the most, and the regression model done in this paper gives the dividend pay out ratio a coefficient of 0.1077 and a p-value of 0.225 and thus the dividend pay out ratio is not statistically significant to affect the debt ratio. Base on this results dividends paid/net income and the debt ratio are not related or their is not enough statiscal evidence to determined a relationship.
If they do not, how does the firm pay increased returns to shareholders?
They don’t increase returns to shareholders, and shareholders have been losing money on RDUS this past couple quaters as their equity in RDUS is losing value like no ones business.
Part 2
OLS Regression Results
Estimate the following regression using data from your selected firm: Debt-Equity Ratio = at + B1(‘Total Asset Turnover’) + B2(‘Return on Assets’) + B3(‘PPE to Asset ratio’) + B4(‘Market to Book ratio’) + B5(‘Depreciation to Asset ratio’) + B6(‘Return on Equity’) + B7(‘Current ratio’) + B8(‘Dividend Pay Out ratio’) + error
Show the code
# -----------------First Regression------------------import pandas as pdfrom sklearn.linear_model import LinearRegressionfrom statsmodels.regression.linear_model import OLSimport statsmodels.api as smfile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx"df = pd.read_excel(file_path)X = df[['Total Asset Turnover', 'Return on Assets', 'PPE to Asset ratio', 'Market to Book ratio', 'Depreciation to Asset ratio', 'Return on Equity', 'Current ratio', 'Dividend Pay Out ratio']]y = df['Debt-Equity Ratio']X_with_constant = sm.add_constant(X)model = OLS(y, X_with_constant).fit()print(model.summary())
OLS Regression Results
==============================================================================
Dep. Variable: Debt-Equity Ratio R-squared: 0.675
Model: OLS Adj. R-squared: 0.538
Method: Least Squares F-statistic: 4.929
Date: Tue, 19 Nov 2024 Prob (F-statistic): 0.00206
Time: 14:04:13 Log-Likelihood: 31.944
No. Observations: 28 AIC: -45.89
Df Residuals: 19 BIC: -33.90
Df Model: 8
Covariance Type: nonrobust
===============================================================================================
coef std err t P>|t| [0.025 0.975]
-----------------------------------------------------------------------------------------------
const 1.1580 0.624 1.856 0.079 -0.148 2.464
Total Asset Turnover -0.3908 0.488 -0.800 0.434 -1.413 0.632
Return on Assets -32.6595 15.694 -2.081 0.051 -65.507 0.188
PPE to Asset ratio 1.1454 2.268 0.505 0.619 -3.601 5.892
Market to Book ratio -0.0462 0.172 -0.269 0.791 -0.405 0.313
Depreciation to Asset ratio -72.0921 40.913 -1.762 0.094 -157.724 13.539
Return on Equity 18.5054 8.714 2.124 0.047 0.268 36.743
Current ratio 0.1077 0.086 1.254 0.225 -0.072 0.288
Dividend Pay Out ratio -0.0071 0.046 -0.155 0.879 -0.103 0.089
==============================================================================
Omnibus: 5.778 Durbin-Watson: 0.690
Prob(Omnibus): 0.056 Jarque-Bera (JB): 5.000
Skew: -1.034 Prob(JB): 0.0821
Kurtosis: 2.920 Cond. No. 5.78e+03
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[2] The condition number is large, 5.78e+03. This might indicate that there are
strong multicollinearity or other numerical problems.
P2 Task 1 & 2
Discuss whether these variables are highly correlated.
The model explains 67% of the model which means there is still 33% of other variables that affect the Debt-Equity ratio.
Total Asset Turnover: Coefficient: -0.3908 P>|t|: 0.434 This variable has a high p-value, suggesting it is not statistically significant in this model.It does not exhibit a high correlation with the Debt-Equity Ratio. Return on Assets: Coefficient: -32.6595 P>|t|: 0.051 This variable is borderline significant (p-value just above 0.05) and could be important in the model.It shows a potential but not definitive correlation with the Debt-Equity Ratio. PPE to Asset Ratio: Coefficient: 1.1454 P>|t|: 0.619 This variable is not statistically significant in this model and does not demonstrate a high correlation with the Debt-Equity Ratio. Market to Book Ratio: Coefficient: -0.0462 P>|t|: 0.791 This variable is not statistically significant. It does not show a high correlation with the Debt-Equity Ratio. Depreciation to Asset Ratio: Coefficient: -72.0921 P>|t|: 0.094 This variable is close to being significant, indicating potential importance but not conclusively so. There may be a moderate correlation with the Debt-Equity Ratio. Return on Equity: Coefficient: 18.5054 P>|t|: 0.047 This variable is statistically significant and likely important in the model. It shows a high correlation with the Debt-Equity Ratio. Current Ratio: Coefficient: 0.1077 P>|t|: 0.225 This variable is not statistically significant and does not indicate a high correlation with the Debt-Equity Ratio. Dividend Pay Out Ratio: Coefficient: -0.0071 P>|t|: 0.879 This variable is not statistically significant and does not demonstrate a high correlation with the Debt-Equity Ratio.
P2 Task 3
Does your regression have good fit? If not, make at least one change to the regression that improves the fit of the regression. Report the results of your new regression and describe the two most important results in your regression.
Can definetly make a few changes, first I will test if other models have a better fit for this variables.
Analysis on the Regression Results
Checking for VIF
Checking for multicollinearity among the variables, examining the statistical significance of each variable, and assessing the overall fit of the model. High VIF values (typically above 5 or 10) indicate high multicollinearity.
Show the code
# -------------First Regression Model VIF calculations ----------------------------------import pandas as pdfrom sklearn.linear_model import LinearRegressionimport statsmodels.api as smfrom statsmodels.stats.outliers_influence import variance_inflation_factorfrom statsmodels.regression.linear_model import OLS# data from Excelfile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx"df = pd.read_excel(file_path)X = df[['Total Asset Turnover', 'Return on Assets', 'PPE to Asset ratio', 'Market to Book ratio', 'Depreciation to Asset ratio', 'Return on Equity', 'Current ratio', 'Dividend Pay Out ratio']]y = df['Debt-Equity Ratio']model = LinearRegression()model.fit(X, y)X_with_constant = sm.add_constant(X)ols_model = OLS(y, X_with_constant).fit()vif_data = pd.DataFrame()vif_data["Variable"] = X.columnsvif_data["VIF"] = [variance_inflation_factor(X.values, i) for i inrange(X.shape[1])]r_squared = ols_model.rsquaredp_values = ols_model.pvaluescoefficients = model.coef_intercept = model.intercept_print("Intercept:", intercept)print("Coefficients:", coefficients)print("\nVIF Data:\n", vif_data)print("\nR-squared:", r_squared)print("\nP-values:\n", p_values)
Intercept: 1.1580079874821734
Coefficients: [-3.90835083e-01 -3.26595228e+01 1.14537675e+00 -4.61789045e-02
-7.20920845e+01 1.85053967e+01 1.07743665e-01 -7.10322642e-03]
VIF Data:
Variable VIF
0 Total Asset Turnover 164.034358
1 Return on Assets 351.596659
2 PPE to Asset ratio 459.726786
3 Market to Book ratio 37.581656
4 Depreciation to Asset ratio 311.171019
5 Return on Equity 325.843289
6 Current ratio 32.010146
7 Dividend Pay Out ratio 1.999554
R-squared: 0.6748466335670171
P-values:
const 0.079002
Total Asset Turnover 0.433546
Return on Assets 0.051198
PPE to Asset ratio 0.619335
Market to Book ratio 0.790658
Depreciation to Asset ratio 0.094136
Return on Equity 0.047044
Current ratio 0.224908
Dividend Pay Out ratio 0.878675
dtype: float64
Multicollinearity: The Variance Inflation Factor (VIF) results suggest that there is significant multicollinearity among some of the variables. ‘Total Asset Turnover’, ‘Return on Assets’, ‘PPE to Asset ratio’, ‘Depreciation to Asset ratio’, and ‘Return on Equity’ have VIF values much higher than the common thresholds of 5 or 10, indicating high multicollinearity. This means these variables are highly correlated with each other.
Model Fit: The R-squared value is approximately 0.675, which means that about 67.5% of the variability in the Debt-Equity Ratio is explained by the model.
Revised Regression Model with Reduced Multicollinearity:
To improve the model fit, considering the high multicollinearity and the lack of statistical significance for some variables, removing some of the highly correlated variables or those that are not statistically significant.
New Regression avoding multicollinary
Removing ‘Return on Assets’ and ‘PPE to Asset ratio’, the results are as follows:
Show the code
# Revised Regression Model with Reduced Multicollinearity --------------------------------------------------------import pandas as pdfrom statsmodels.stats.outliers_influence import variance_inflation_factorfrom statsmodels.regression.linear_model import OLSimport statsmodels.api as sm# Loadfile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx"df = pd.read_excel(file_path)X = df[['Total Asset Turnover', 'Return on Assets', 'PPE to Asset ratio', 'Market to Book ratio', 'Depreciation to Asset ratio', 'Return on Equity', 'Current ratio', 'Dividend Pay Out ratio']]y = df['Debt-Equity Ratio']X_revised = X.drop(['Return on Assets', 'PPE to Asset ratio'], axis=1)X_revised_with_constant = sm.add_constant(X_revised)revised_ols_model = OLS(y, X_revised_with_constant).fit()vif_data_revised = pd.DataFrame()vif_data_revised["Variable"] = X_revised.columnsvif_data_revised["VIF"] = [variance_inflation_factor(X_revised.values, i) for i inrange(X_revised.shape[1])]r_squared_revised = revised_ols_model.rsquaredp_values_revised = revised_ols_model.pvaluesprint("Revised Model Summary:\n", revised_ols_model.summary())print("\nRevised VIF Data:\n", vif_data_revised)
Revised Model Summary:
OLS Regression Results
==============================================================================
Dep. Variable: Debt-Equity Ratio R-squared: 0.600
Model: OLS Adj. R-squared: 0.486
Method: Least Squares F-statistic: 5.256
Date: Tue, 19 Nov 2024 Prob (F-statistic): 0.00191
Time: 14:04:13 Log-Likelihood: 29.052
No. Observations: 28 AIC: -44.10
Df Residuals: 21 BIC: -34.78
Df Model: 6
Covariance Type: nonrobust
===============================================================================================
coef std err t P>|t| [0.025 0.975]
-----------------------------------------------------------------------------------------------
const 1.7292 0.249 6.952 0.000 1.212 2.247
Total Asset Turnover -0.7679 0.441 -1.741 0.096 -1.685 0.149
Market to Book ratio 0.0551 0.173 0.318 0.754 -0.306 0.416
Depreciation to Asset ratio -66.7544 18.119 -3.684 0.001 -104.436 -29.073
Return on Equity 0.4897 1.186 0.413 0.684 -1.977 2.956
Current ratio 0.0628 0.057 1.094 0.287 -0.057 0.182
Dividend Pay Out ratio 0.0031 0.046 0.067 0.948 -0.093 0.099
==============================================================================
Omnibus: 2.322 Durbin-Watson: 0.367
Prob(Omnibus): 0.313 Jarque-Bera (JB): 2.046
Skew: -0.619 Prob(JB): 0.360
Kurtosis: 2.529 Cond. No. 2.40e+03
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
[2] The condition number is large, 2.4e+03. This might indicate that there are
strong multicollinearity or other numerical problems.
Revised VIF Data:
Variable VIF
0 Total Asset Turnover 76.882888
1 Market to Book ratio 33.587439
2 Depreciation to Asset ratio 105.755661
3 Return on Equity 5.233682
4 Current ratio 30.226975
5 Dividend Pay Out ratio 1.891196
Multicollinearity: The revised model still shows multicollinearity concerns, particularly for ‘Total Asset Turnover’, ‘Depreciation to Asset ratio’, and ‘Current ratio’, as indicated by their high VIF values. While ‘Return on Equity’ has a reduced VIF, it’s still above the threshold.
Statistical Significance: The only variable that shows statistical significance in the revised model is ‘Depreciation to Asset ratio’ (p < 0.05). Other variables do not exhibit statistical significance at the 5% level.
Model Fit: The R-squared value has decreased to 0.600, suggesting that about 60% of the variability in the Debt-Equity Ratio is explained by this revised model. This is lower than the original model, indicating a reduced explanatory power.
Model Summary: The regression coefficients indicate how each variable influences the Debt-Equity Ratio. For example, the ‘Depreciation to Asset ratio’ has a large negative coefficient, suggesting a strong inverse relationship with the Debt-Equity Ratio.
Given these results, it appears that reducing multicollinearity through variable removal slightly compromised the model’s explanatory power.
Like explained in Part 2 task 1 & 2 most variables in the revised model are not statistically significant, indicating they may not be strong predictors for the firm’s capital structure. The result for ‘Depreciation to Asset ratio’ shows caution, given the remaining multicollinearity issues.
Improving Model fit
Different Regression models and differebt dependent variables
To improve model fit, further steps include exploring alternative variables, considering interaction effects, or applying different statistical techniques such as ridge or lasso regression, which can handle multicollinearity better.There is high multicollinearity between ROA and ROE or in other words they are highly correlated with each other.
Best regression fit for this model
tested for Linear Regression, Ridge Regression, Lasso Regression and Random Forest
Show the code
# -----------------Regression machine model to test between different regression models-----# test 1import pandas as pd# Load the provided Excel filefile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//regression_log.xlsx"data = pd.read_excel(file_path)import pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.linear_model import LinearRegression, Ridge, Lassofrom sklearn.ensemble import RandomForestRegressorfrom sklearn.metrics import mean_squared_error, r2_score# Assuming 'data' is your DataFrame# Replace 'debt-equity ratio - 5' with the actual column name of your dependent variabley = data['debt-equity ratio - 5']X = data.drop('debt-equity ratio - 5', axis=1)# Handling missing valuesX_filled = X.fillna(X.mean())# Splitting the dataset into training and testing setsX_train, X_test, y_train, y_test = train_test_split(X_filled, y, test_size=0.2, random_state=42)# Defining the modelsmodels = {"Linear Regression": LinearRegression(),"Ridge Regression": Ridge(),"Lasso Regression": Lasso(),"Random Forest": RandomForestRegressor()}# Function to evaluate each modeldef evaluate_model(model, X_train, y_train, X_test, y_test): model.fit(X_train, y_train) y_pred = model.predict(X_test) mse = mean_squared_error(y_test, y_pred) r2 = r2_score(y_test, y_pred)return mse, r2# Evaluating the modelsresults = {}for name, model in models.items(): mse, r2 = evaluate_model(model, X_train, y_train, X_test, y_test) results[name] = {"Mean Squared Error": mse, "R^2 Score": r2}results_df = pd.DataFrame(results).T# Printing the resultsprint(results_df)
Mean Squared Error R^2 Score
Linear Regression 0.001108 0.958445
Ridge Regression 0.012775 0.520850
Lasso Regression 0.028889 -0.083506
Random Forest 0.003280 0.876986
This results show that the Linear regression is the best fit. So the techniques such as ridge or lasso regression, which can handle multicollinearity better did dot work better. Linear Regression has the best fit with an R^2 of 0.95. Note: this test ran multiple dependent variables, and my main regression is an ols linear not just linear, which all contributed to not getting an R^2 of 0.67 like in my main regression.
Testing different variables
The following uses the same model, but shows the results for each variable as a dependent variable. Thismodel runs an OLS linear regression.
Show the code
# test 8 ----- same as test 7 & 6 but w/out the sklearn import# ---------- option to change between reports- - - -- - - - - - -import pandas as pdimport statsmodels.api as sm# Load the datafile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//data1.xlsx"data = pd.read_excel(file_path)# Columns to excludecolumns_to_exclude = ['Quarter'] # 'column_name_2', 'column_name_3'data = data.drop(columns=columns_to_exclude)# Iteratefor column in data.columns:print(f"Evaluating OLS model with dependent variable: {column}") y = data[column] X = data.drop(column, axis=1)# Handling missing values X_filled = X.fillna(X.mean()) y_filled = y.fillna(y.mean())# Add a constant to the independent variables X_filled = sm.add_constant(X_filled)# Define and fit the OLS model model = sm.OLS(y_filled, X_filled) results = model.fit()# Print print(f"R^2 Score: {results.rsquared}")# print("Additional Details:")# print(f"R^2 Score: {results.rsquared}")# print(f"Adjusted R^2 Score: {results.rsquared_adj}")# print(f"Mean Squared Error: {results.mse_model}")# print(results.summary())
Evaluating OLS model with dependent variable: Debt-Equity Ratio
R^2 Score: 0.6748466335670171
Evaluating OLS model with dependent variable: Total Asset Turnover
R^2 Score: 0.8046095903224969
Evaluating OLS model with dependent variable: Return on Assets
R^2 Score: 0.9964158142400905
Evaluating OLS model with dependent variable: PPE to Asset ratio
R^2 Score: 0.9177836127665142
Evaluating OLS model with dependent variable: Market to Book ratio
R^2 Score: 0.6344765076448754
Evaluating OLS model with dependent variable: Depreciation to Asset ratio
R^2 Score: 0.8933302120179509
Evaluating OLS model with dependent variable: Return on Equity
R^2 Score: 0.9965062544754089
Evaluating OLS model with dependent variable: Current ratio
R^2 Score: 0.7967195363413409
Evaluating OLS model with dependent variable: Dividend Pay Out ratio
R^2 Score: 0.4237713226948442
This results show that other variables in this model can have a better fit for a higher R^2. Regression models can sure help indentify what explains certain financials, but for RDUS and its current financial standings, and the state of the economy do not allow to properly show this relationship well. To many other variables not included in this data that affect the ratios.
Just for fun
I ran a linear regression on a larger data set
This was done just to see which variables had the highest R^2, and included more than 60 ratios and financial metrics. Most financial metrics were formatted to the natural log for better regressional fit.
Debt-Equity ratio improve to 0.96 R^2. The following had a higher R^2 than Debt-Equity: Long-term debt ratio Total debt ratio quick ratio taxes Total Costs Day’s sales in receivables Total Current Liabilities Total Liabilities and Shareholders Equity and many more. Dividend Per Share had an R^2 of 1, but it is useless due to multicollinary.
There is many finanical ratios and financial reports that explain each other 100% so they make this statistical analysis useless, but they can be removed to find a good fit model. This was a great paper, which gave me ideas how I can create a model that looks for certain patters, like determinig firms that have been making great capital strucutre decisions and bad capital structure decisions. Making machine learning models to find certain patters in a firm can help quickly indentify key details in a firm’s financials which can useful for many things like trading, investments, management, and figuring out what firms are up to.
Done with paper,the following is just a list of the results for the larger data set so it is long
Show the code
# test 4 ----------- same as test 3 but this mdoel automatically test all different variables as dependent variables---- import pandas as pdfrom sklearn.model_selection import train_test_splitfrom sklearn.linear_model import LinearRegressionfrom sklearn.metrics import mean_squared_error, r2_score# Load the datafile_path ="C://Users//User//OneDrive - BYU-Idaho//BYUI//2024_1 Winter//455 ECON//3 Term paper//regression_log.xlsx"data = pd.read_excel(file_path)# Iterate through each column in the DataFramefor column in data.columns:print(f"Evaluating model with dependent variable: {column}")# Set the current column as the dependent variable y = data[column] X = data.drop(column, axis=1)# Handling missing values X_filled = X.fillna(X.mean()) y_filled = y.fillna(y.mean())# Split the dataset X_train, X_test, y_train, y_test = train_test_split(X_filled, y_filled, test_size=0.2, random_state=42)# Define and train the model model = LinearRegression() model.fit(X_train, y_train)# Evaluate the model y_pred = model.predict(X_test) mse = mean_squared_error(y_test, y_pred) r2 = r2_score(y_test, y_pred)print(f"Mean Squared Error: {mse}")print(f"R^2 Score: {r2}\n")# Optionally, you can also print the coefficients for the model# for i, col in enumerate(X_train.columns):# print(f"{col}: {model.coef_[i]}")
Evaluating model with dependent variable: 1Revenue
Mean Squared Error: 0.00010211518971611322
R^2 Score: 0.9954496271269822
Evaluating model with dependent variable: 2Cost of Revenue
Mean Squared Error: 0.00013096369148416
R^2 Score: 0.9938836769759917
Evaluating model with dependent variable: 3Gross Profit
Mean Squared Error: 0.0017363353664368742
R^2 Score: 0.9437942878408355
Evaluating model with dependent variable: Selling General and Administrative Expenses
Mean Squared Error: 0.004749747233295343
R^2 Score: 0.5794453419933439
Evaluating model with dependent variable: Operating Income or EBIT
Mean Squared Error: 0.0011882846617163351
R^2 Score: 0.9895040974910325
Evaluating model with dependent variable: Interest Expense
Mean Squared Error: 0.002015938017445719
R^2 Score: 0.9344234367969635
Evaluating model with dependent variable: Income Before Income Taxes
Mean Squared Error: 0.009743716291329162
R^2 Score: 0.92349805081604
Evaluating model with dependent variable: Income Tax Expense (Benefit)
Mean Squared Error: 0.0007804315364921883
R^2 Score: 0.9965119324010263
Evaluating model with dependent variable: Net Income Available to Common
Mean Squared Error: 0.0037866014041647994
R^2 Score: 0.9733488308679329
Evaluating model with dependent variable: Cash and Equivalents
Mean Squared Error: 0.08627179667172448
R^2 Score: -1.8194276617990113
Evaluating model with dependent variable: Accounts Receivable - Trade
Mean Squared Error: 0.00016596773866067344
R^2 Score: 0.990515678453589
Evaluating model with dependent variable: Inventories
Mean Squared Error: 0.00010233549785114654
R^2 Score: 0.9951519690075924
Evaluating model with dependent variable: Total Current Assets
Mean Squared Error: 0.00038041786343492927
R^2 Score: 0.9787031842257224
Evaluating model with dependent variable: Property Plant & Equipment - Net
Mean Squared Error: 0.0007910135307131221
R^2 Score: 0.9106342561113856
Evaluating model with dependent variable: Total Assets
Mean Squared Error: 0.0001461864768220604
R^2 Score: 0.990058021213477
Evaluating model with dependent variable: Accounts Payable - Trade
Mean Squared Error: 0.002025785302443697
R^2 Score: 0.9415928176205334
Evaluating model with dependent variable: Short-Term Borrowings
Mean Squared Error: 0.047461239844839846
R^2 Score: 0.6542735885068636
Evaluating model with dependent variable: Total Current Liabilities
Mean Squared Error: 0.0007291404959138938
R^2 Score: 0.9735255249057942
Evaluating model with dependent variable: Total Shareholders Equity
Mean Squared Error: 0.00036663151589128577
R^2 Score: 0.9603136176579922
Evaluating model with dependent variable: Total Liabilities and Shareholders Equity
Mean Squared Error: 0.0001461864768220392
R^2 Score: 0.9900580212134784
Evaluating model with dependent variable: Long term debt
Mean Squared Error: 0.0010876053112482233
R^2 Score: 0.9616017338545166
Evaluating model with dependent variable: Current Market Cap
Mean Squared Error: 0.0020561287979844775
R^2 Score: 0.862263929173652
Evaluating model with dependent variable: Common Stock
Mean Squared Error: 1.2942037287560796e-05
R^2 Score: 0.3971204695847669
Evaluating model with dependent variable: EBITDA
Mean Squared Error: 0.07550906830965302
R^2 Score: -0.3649762051917971
Evaluating model with dependent variable: Diluted EPS - 4
Mean Squared Error: 0.005039309408404358
R^2 Score: 0.9627930141726645
Evaluating model with dependent variable: Dividends Paid
Mean Squared Error: 0.0011946682554662142
R^2 Score: -5.656366571515758
Evaluating model with dependent variable: Retained Earnings (Accumulated Deficit)
Mean Squared Error: 0.000383966483498984
R^2 Score: 0.96116333300137
Evaluating model with dependent variable: Effective Tax Rate
Mean Squared Error: 0.061810711436965114
R^2 Score: 0.1613939616612895
Evaluating model with dependent variable: Tax Efficiency
Mean Squared Error: 0.05706100461391026
R^2 Score: -10.493426925233162
Evaluating model with dependent variable: interval measure
Mean Squared Error: 0.0009581715993822194
R^2 Score: 0.27824369574757823
Evaluating model with dependent variable: Day's sales in inventory
Mean Squared Error: 3.531285750044181e-05
R^2 Score: 0.9754386724686923
Evaluating model with dependent variable: Day's sales in receivables
Mean Squared Error: 3.37966535755209e-05
R^2 Score: 0.9807340396587596
Evaluating model with dependent variable: Total Costs
Mean Squared Error: 0.00014478937065078015
R^2 Score: 0.9930219992801493
Evaluating model with dependent variable: Selling, egn & admin expense
Mean Squared Error: 0.004749747233295434
R^2 Score: 0.5794453419933359
Evaluating model with dependent variable: interest
Mean Squared Error: 0.0020159380174457407
R^2 Score: 0.9344234367969628
Evaluating model with dependent variable: taxes
Mean Squared Error: 0.0007804315364922276
R^2 Score: 0.9965119324010261
Evaluating model with dependent variable: fixed assets
Mean Squared Error: 0.0007910135307131161
R^2 Score: 0.9106342561113864
Evaluating model with dependent variable: Other non-current assets
Mean Squared Error: 0.002651461064882422
R^2 Score: 0.8937474614465978
Evaluating model with dependent variable: Overridable Raw Beta
Mean Squared Error: 19.88480399734291
R^2 Score: -78.41442874443186
Evaluating model with dependent variable: Last Price
Mean Squared Error: 32.667263818855695
R^2 Score: 0.4192571321037455
Evaluating model with dependent variable: Diluted EPS - 4.1
Mean Squared Error: 0.1692443463306228
R^2 Score: 0.7345660919878183
Evaluating model with dependent variable: Dividend Per Share
Mean Squared Error: 0.0
R^2 Score: 1.0
Evaluating model with dependent variable: Current ratio - 14
Mean Squared Error: 0.018023368966276758
R^2 Score: 0.5624813311378456
Evaluating model with dependent variable: quick ratio
Mean Squared Error: 0.0003100250080131335
R^2 Score: 0.9795775496979469
Evaluating model with dependent variable: Cash ratio
Mean Squared Error: 0.00407036579883783
R^2 Score: -7.994254025729562
Evaluating model with dependent variable: Net worling capital to total assets
Mean Squared Error: 6.427985688911794e-05
R^2 Score: 0.883206583283765
Evaluating model with dependent variable: Total debt ratio - 6
Mean Squared Error: 0.00011045325792941782
R^2 Score: 0.9593457242330439
Evaluating model with dependent variable: debt-equity ratio - 5
Mean Squared Error: 0.0011079415688917168
R^2 Score: 0.9584453152568507
Evaluating model with dependent variable: equity multiplier
Mean Squared Error: 0.001107941568891754
R^2 Score: 0.9584453152568493
Evaluating model with dependent variable: Long-term debt ratio
Mean Squared Error: 7.168357981873842e-05
R^2 Score: 0.9760051903732019
Evaluating model with dependent variable: Times interest earned ratio - 7
Mean Squared Error: 83.42174644935503
R^2 Score: 0.6001304303915767
Evaluating model with dependent variable: Inventory turnover
Mean Squared Error: 0.027092971635851486
R^2 Score: 0.22541402239692887
Evaluating model with dependent variable: receivables turnover
Mean Squared Error: 0.0373737656601477
R^2 Score: 0.5872390140786977
Evaluating model with dependent variable: NWC turnover (net working capital)
Mean Squared Error: 0.1448147843038976
R^2 Score: -1.4278653539909025
Evaluating model with dependent variable: Return on Equity (ROE)
Mean Squared Error: 9.593992392214665e-05
R^2 Score: 0.8221245097280655
Evaluating model with dependent variable: Retun on Assets (ROA) - 2
Mean Squared Error: 5.3653001834971495e-05
R^2 Score: 0.5948447313961628
Evaluating model with dependent variable: ROA using EBIT instead of net inc - 9
Mean Squared Error: 6.636103377687592e-05
R^2 Score: 0.6699690598477659
Evaluating model with dependent variable: Profit margin - 1
Mean Squared Error: 0.00010397642650573068
R^2 Score: 0.7563952709202335
Evaluating model with dependent variable: PPE to Asset ratio - 10
Mean Squared Error: 0.0003873087683250345
R^2 Score: 0.5042124784898951
Evaluating model with dependent variable: Market to Book ratio - 11
Mean Squared Error: 0.006492172643813653
R^2 Score: 0.49634025178113805
Evaluating model with dependent variable: Depreciation to asset ratio - 12
Mean Squared Error: 1.6787900689712156e-07
R^2 Score: 0.9165631053778744
Evaluating model with dependent variable: Retained earnings to asset ratio - 13
Mean Squared Error: 0.00013227177295043003
R^2 Score: 0.9445998867759109
Evaluating model with dependent variable: dividend pay out ratio
Mean Squared Error: 0.05759194412243231
R^2 Score: 0.6294145190148294
Evaluating model with dependent variable: Equity multiplier - 3
Mean Squared Error: 0.001107941568891693
R^2 Score: 0.9584453152568516
Evaluating model with dependent variable: Total asset turnover - 8
Mean Squared Error: 0.0008591371374417083
R^2 Score: 0.7005375470166024