Posts

Showing posts with the label Genetic Algorithms

Genetic Algorithms: Playing God: Elitism vs Egalitarianism

Image
Genetic Algorithms (GA) are a class of Artificial Intelligence that encode your model variables as chromosomes. And then you breed them over hundreds of generations mimicking evolution, using crossover and mutation of genes to improve the species. GA applications include optimizing airline schedules, discovery of new drugs and new metal alloys, optimizing capacity of transportation systems etc. But I don’t have the data to practice on these topics, so I use GA to optimize portfolio strategies for the 30 constituents of the Straits Times Index (STI) and compare their performance. The two GA approaches are (1) Elitism where parents compete in a tournament (like the Hunger Games) and  only high-performance parents are allowed to breed and in each generation the children with good performance become parents, and the weak performance offspring are killed. (2) Egalitarianism where any compatible parents are allowed to marry and produce offspring.  The performance of strategies 1 and...

Artificial Intelligence: Genetic Algorithms are forbidden to commit Incest

Image
Genetic Algorithms (GA) are a type of AI that mimics the evolutionary process of survival of the fittest. With GA you can solve multi-objective multi-constraint problems such as designing a resilient financial portfolio of securities, allocating a fleet of buses, or planes to routes using the least resources, or selecting potential combination of compounds or alloys that lead to discovery of new drugs or materials. In a past post on my Finance blog I wanted to design an ultra-low risk portfolio consisting of a portfolio of ETFs from 6 Asia Pacific countries that would mitigate the effects of the MAGA President's unpredictable actions. The 6 countries were: Singapore, Hong Kong, India, Malaysia, Thailand and Indonesia. Their country stock Exchange Indices are given below. Genetic Algotithms seemed to be really the best tool if you equate gene pool resilience with diversity just like in Nature as generations evolve through crossover and mutation of genes. In this specific case GAs...

Bio-Inspired Artificial Intelligence

Image
I am still reading the three books above, but have already begun to wonder at the marvel that is Nature. Like all scientific endeavors, Artificial Intelligence is constantly evolving. But I can see that the direction for the future is towards 'softer' systems that emulate the biological neural systems. Less of the machine-based algorithms that are faster but more brittle; towards systems which closer emulate Nature. Nature's ways are sometimes strange. Many redundancies (e.g. junk DNA), meandering and seemingly aimless moves. But eventually a more robust solution. The workings of AI's current Genetic Algorithms that are used for Optimization are more of a Mendelian process of selective breeding rather than natural evolution. Nature's evolution is an open process. There is no predetermined goal. Each generation adapts to whatever its environment throws up, and the fitness of a generation is only specific to fitness for the environment of that moment. Genetic Algor...

The Case for a BlackBox Approach to Modeling the Financial Markets

Image
It is an accepted principle that in attempting to build a model of something in the real world, one should have a deep knowledge of the subject that is being modeled. Because domain expertise is crucial for choice of input variables, as well as clear statement of the relationship between the variables, as well as the quantification of the coefficients [parameters] for each equation of the model. However, in recent times, there is some serious study of blackbox approaches to modeling. A blackbox type of model is one where [1] choice of Input need not be restricted to those which are justified to be inputs according to the theoretical principles of the subject to be modeled. [2] A clear statement of the relationship between input variables is not absolutely necessary, instead leaving it to the blackbox to work out the relationship. [3] For [2], non-parametric methods machine-learning methods such as neural nets, fuzzy logic and genetic algorithms are used to classify, detect patterns or ...

Blackbox Modeling of the Housing Market: Domain Expertise Role for Choice of Input Variables.

Blackbox models of complex situations are tempting. Without the need to specify parameters, and not limited by choice of variables, you can throw in everything including the kitchen sink, and see how the model performs. But in real life, it is not that simple. With every variable that you throw in, you are increasing the complexity of the model exponentially as well as the computational workload. Although there are algorithms for dimension reduction as well as for assessing the significance of an input towards model accuracy, nothing beats a good old human being with expertise in the subject domain, for initial choice of input variables. Let's do an academic exercise for the building of a model that (1) hopefully gives an objective, 'true' valuation of a house. (2) predict the future house price. We will attempt to build our model using a Neural Network, or a hybrid Neural with Genetic Algorithms for the last mile of calculation, to avoid local optima. Any human expert in r...

Using Genetic Algorithms for Optimization Problems

Image
One of the most common things we humans face in our daily lives is the problem of optimization. viz what is the optimum solution for a problem using certain mix of resources that we have, and bearing in mind our objective(s) In Life we seldom find that there is only one solution to a problem, but in fact many possible choices for a solution. Here are some examples: Which is the best route to travel from A to B, after defining what is ‘best’. {is it the shortest route in time, which again is different from the shortest route in distance, or is it the most economical route, the most scenic route etc}. What is the minimum risk and maximum gain I can get from re-allocating the number of shares in each stock that I hold in a portfolio? What combination of resources [land, labor, capital] will enable me to complete a certain construction project in a specified period of time. What is the best way to draw up the School timetable using the variables we can juggle with viz the school hours Mon-...