Closed sichen1234 closed 2 years ago
Changes to allow for tickers to be used is in 1c01eb2 An example ticker file is stock_tickers.csv
Hardcoding has now been allowed in ed672d4 Lines 33 & 34 are used for hardcoding
@mattbowler This is great. Just running off a list of 7 Best Oil Stocks to Buy and 7 Renewable Energy Stocks and ETFs got good results:
Look at the carbon betas on Chevron (CVX), Schlumberger (SLB), Pioneer Natural Resources (PXD) and the negative beta on VWDRY (Vestas Window). Interestingly SLB and PXD are exploration companies and have much higher carbon risk betas than the oil companies.
For the output, could you please also get the other statistics that are relevant for the regression such as r2?
Added the Durbin-Watson (autocorrelation), Breusch-Pagan (heteroskedasticity) & Jarques-Bera (normality) statistics to the table, as well as
@mattbowler Do you think in addition to the P>|t| it would be also useful to get the t-statistics for each of the coefficients?
Also, in the attached screenshot, there are 2 rows of Jarque-Bera and Breusch-Pagan statistics, one for the coefficients and one for the P>|t|. What do the different numbers mean?
@sichen1234 committed the changes to include standard error & t-statistic in the output table. I also included an option to use default values
@mattbowler How do I run it with standard values?
@sichen1234 I only added that option to factor_regression.py. I have now added it to bulk_script.py. I will clean up the code so that factor_regression.py & bulk_script.py use the same user input function so that changes made are made to both
Now it works. Thanks!
Modify the bulk_script.py to generate results for list of stocks.
It can be a list of stock tickers either in a CSV file or embedded in bulk_script.py as an array for now. (We'll eventually hook it up to a database and backend.)
The output can be the same as now, statistics for each stock separated by a header.