Skip to content

AlgoTrading101/Econometrics-on-Stock-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Econometrics on Stock Data with R - Algotrading101

R Finance – An Econometrics Guide to Stocks

When working with a time series you need to test your model for serial correlation and correct it with the Cochrane-Orcutt method. We also want to make sure that the time series is stationary so we can make predictions.

When looking for the correlation between time series you need to use cointegration because it is more informative. Too many people just look for plain correlations that can be meaningless.

This article was written in order to help traders make data informed decisions and will be linked here upon release.

And remember these wise words: "Correlation doesn't mean causation!".

Table of contents

  1. What is R?
  2. How can R be used for Finance?
  3. Why should I use R for Finance?
  4. Why shouldn’t I use R for Finance?
  5. What are some R alternatives?
  6. What is Econometrics?
  7. Stock problem definition
  8. How to download stock data with R?
  9. How to save data to CSV with R?
  10. What is linear regression? 
  11. What is the null hypothesis?
  12. What is the p-value?
    1. p-value downfalls
    2. p-value alternatives and supplements
  13. How to do a linear regression on stock data with R?
  14. What is the Granger causality test?
  15. How to do a Granger causality test in R?
  16. What is Serial Correlation?
  17. How to do a Serial Correlation test with R?
  18. How to remove Serial Correlation from a model in R?
  19. What is Stationarity?
  20. How to test for Stationarity with R?
  21. What is Cointegration?
  22. How to test for Cointegration with R?
  23. What are the 3 Common Analysis/Testing Mistakes?
  24. Final thoughts
  25. Full code

Info

Author Igor Radovanovic
Published February 12, 2023