Project · R · MBA case study
Earnings Manipulation Prediction
Can a company's financial ratios give away that it is manipulating its earnings? A case study from my MBA, comparing five classification models.
- 1,239companies
- 39manipulators
- 8ratios each
- 5models compared
The ratios
Each company is described by the eight ratios of the Beneish M-score, a model built to spot companies that inflate their earnings.
- DSRI
- Days' sales in receivables index
- GMI
- Gross margin index
- AQI
- Asset quality index
- SGI
- Sales growth index
- DEPI
- Depreciation index
- SGAI
- Sales, general and administrative expenses index
- ACCR
- Accruals to total assets
- LEVI
- Leverage index
The catch
Only about 3% of the companies are manipulators, so a model that always answers "no" would look 97% accurate and catch nothing. Before fitting, the training data was rebalanced with SMOTE, which creates synthetic examples of the rare class.
The models
Logistic regression
The baseline, also checked with an ROC curve.
Decision tree
CART, pruned at the complexity with the lowest cross-validated error.
Random forest
100 trees, with a ranking of which ratios matter most.
SVM and XGBoost
A linear support vector machine, and gradient-boosted trees over 100 rounds.
Every model was judged on a held-out test set, with a confusion matrix.
- R
- caret
- rpart
- randomForest
- e1071
- xgboost
- SMOTE