Some Programs

Sampling Method

  1. A Computationally Faster Package for Survey Sampling
    (Work in progress) [Python, R]
    This package will provide users with fast computation of estimators under the design-based and the model-based approach, using C/C++ and parallel programming techniques.

Forecasting

  1. The Diebold-Mariano Test for Forecast Equivalance [Python]
    This Python function dm_test implements the Diebold-Mariano Test (1995) with modification suggested by Harvey et. al (1997) to statitsitcally identify forecast accuracy equivalance for 2 sets of predictions.
    Jorge Sandoval, a technical consultant at a Brazilian state government, wrote a notebook on Kaggle using this code to compare XGBoost and LightGBM.
  2. Backtesting [Stata]
    A function for backtesting forecasts, accompanied by a STATA help file explaining how to use the program.
  3. Grid Search Hyperparameter Tuning and Rolling Forecast [Python]
    This Python function uses machine learning modelling object from scikit-learn to implement a design of grid search hyperparameter selection that respects temporal ordering of time-series, and forecast time-series using the sliding (rolling)-window strategy.

Model

  1. Threshold Vector Autoregression with 2 Regimes [Stata]
    TVAR_2r_grid_search implements a grid search of the optimal threshold variable according to a given criterion.
    TVAR_2r estimates a TVAR(2) (with the first regime indexed as 0 and the second regime indexed as 1) using the Ordinary Least Square (OLS) Estimation or the Maximum Likelihood (ML) Estimation.
    A collaborative effort with Myeongwan Kim.

Others

  1. Summary Statistics and Sparkline Generation [Python]
    This Python class takes pandas dataframe as input to generate formatted summary statistics outputs in text, Latex and PDF with sparklines.
  2. Capital Asset Pricing Model [Excel VBA]

  3. An Improved String Class [C++]
    This C++ class allows the overloading of multiplication, accompanied by a set of test cases.