Econometrics models from scratch
In this file, you will find method to estimate and predict using linear, lasso and ridge regression. For the linear and ridge regression, you'll also find the close form formula. Many optimization techniques are available. However the tuning of the hyperparameters is not !
One can find code (built from scratch) to fit the data to a model from the ARMA familly. 3 methods have been implemented to fit the data with an AR(p) (Yule Walker, Least Square and Conditional Maximum Likelihood), 1 method have been implemented to fit the data with the MA(q) and 1 method have been implemented to fit the data with the ARMA(p,q). Results are very close from those found using the statsmodels package.
This script show how to implement a solver of linear systems using the Cholesky decomposition method.
One can find a method to compute the long run probabilities of states, and a method to evaluate the probability of reaching state j from state i after n steps. One can also find the code for the forward algortihm. The script will be updated until the replication of the results found in: Stock Price Prediction using Hidden Markov Model, (Nguyen, 2016)
This script show the implementation of a garch(1,1) model. The extention to a garch(p,q) have been made and will soon be released.
This implementation of PCA comes from the paper The JK method (H. F. Kaiser, 1971).
- Decision Tree
- Random Forest
- Gradient Bossting for classification
Note: I am aware that errors/ wrong implementations are possible and I please you to send me an email if you notice an (some) error(s). It would be very helpful, and will help me to improve myself. Here is my mail address: nicolas.manelli013@gmail.com