I am working on a binary classification problem using balanced bagging random forest, neural networks and boosting techniques. my dataset size is 977 and class proportion is 77:23. 

I had 61 features in my dataset. However, after lot of feature selection activities, I arrived at 5 features. So, with 5 features, I thought that my Xgboost model will not overfit and provide me better performance in test set but still the Xgboost model overfits and produces poor results on test set. However, Random forest does similar performance on both `train` and `test`. Can help me understand why does this happen?

performance shown below for train and test 

**Random Forest - train data**

[![enter image description here][1]][1]

**Random Forest - test data**

[![enter image description here][2]][2]

**roc_auc for random forest - 81**

**********************************************

**Xgboost - train data**

[![enter image description here][3]][3]

**Xgboost - test data**

[![enter image description here][4]][4]

roc_auc for xgboost - 0.81

 [1]: https://i.sstatic.net/3LoC2.png
 [2]: https://i.sstatic.net/t2wJz.png
 [3]: https://i.sstatic.net/MXM70.png
 [4]: https://i.sstatic.net/hAkjQ.png