This repository provides the required files for tutorial 2 (Genetic Algorithm with R) for the course Artificial Intelligence in Finance (ACCFIN5230), at the Adam Smith Business School, University of Glasgow, 2022-23.
We use the ga function from GA package to implement genetic algorithm in R. We have four examples to show the applications of this package.
- One-dimensional minimization
- One-dimensional maximization
- Global (absolute) maximum
- Two-dimensional optimization (OLS regression with genetic algorithm)
There is a good bibliography along with a short review on the advantages of genetic algorithm.
Cortez, P. (2021). Modern optimization with R. Second Edition, New York: Springer.
Haupt, R. L., & Haupt, S. E. (2004). Practical genetic algorithms. Second Edition, John Wiley & Sons.
Scrucca, L. (2013). GA: A package for genetic algorithms in R. Journal of Statistical Software, 53, 1-37.
Scrucca, L. (2017). On some extensions to GA package: hybrid optimisation, parallelisation and islands evolution. The R Journal, 9(1), 187-206.