Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementing Genetic Algorithms in Finance Applications Nihaar Sinha.

Similar presentations


Presentation on theme: "Implementing Genetic Algorithms in Finance Applications Nihaar Sinha."— Presentation transcript:

1 Implementing Genetic Algorithms in Finance Applications Nihaar Sinha

2 Abstract This project investigates the use of genetic algorithms in a financial application of portfolio optimization. Genetic algorithms have long been used in optimization problems as well as the financial sector. Banks and hedge funds pay millions of dollars to programmers who can develop the most accurate optimization algorithms. What this project does is try to replicate that development on a very small scale- using only three different companies and 8 total shares in the portfolio. The genetic algorithm considers a number of factors in coming up with the optimized solution. These factors include an evaluation of the price to earnings ratio of the stock, the yield on the stock, and a special weight determining how diversified the portfolio is. While the metrics used are to an extent crude, they serve the purpose of demonstrating how a concept such as genetic algorithms can be used in the field of finance.

3 What are Genetic Algorithms? Search technique used to find exact and approx. solutions Used in optimization and search problems “Evolutionary algorithim” Inheritance, Crossover, Mutation, Crossover Four phases: initialization, selection, reproduction, termination

4 Genetic Algorithm http://www.meteck.org/IMAGES/imag e001.gif

5 Similar Research Genetic Algorithms have been used in finance for years “Genetic Algorithm Optimisation for Finance and Investment” by Robert Pereira is a good paper to explain fundamentals of financial genetic algorithms This project is similar in that it uses a simple example to describe applied mathematics

6 Reading in Data Source code is imported from the Internet Data is parsed for keywords Last Trade: “ P/E :“ :

7 Reading in Data (cont.) Parsing data means source must be permanent Source utilized is Yahoo! Finance Snapshot of what the Yahoo! Finance interface looks like http://finance.yahoo.com/q?s=IBM

8 Genetic Algorithm User picks 3 stocks Stocks are assigned “point value” based on 3 metrics Metrics are P/E closeness to 16, yield, and diversification

9 Genetic Algorithm (cont.) Random combinations of 8 shares amongst 3 stocks are generated Combinations are ranked, and bottom half are eliminated Top half are crossed over and re-ranked Process continues until one solution remains 10/29/09

10 Class Structure The Main method prompts for the stock symbols and sends them to the Rank class for data mining and generation Rank class imports data, calculates it, and formats it Main method receives the data and runs the genetic algorithm

11 Problems Run Into How exactly to parse through all the data and find the relevant information How to organize the program to make it less cluttered How to form combinations that can be crossed over Training the algorithm to return the ideal result every time

12 Solutions After inspecting the source, relevant data is always followed by a specific tag User prompted for information through JDialog boxes Combinations turned into permutations, with 8 total shares Ideal result can be pre-derived, and algorithm can then be coached to find the right solution.

13 How has my hypothesis changed? Focus has shifted to applying genetic algorithms in finance Concentration on educational purposes and helping explain how applied mathematics play a role in finance Testing has shown that the best way to import data is through importing the source code and not trying to download files

14 Progress since 2 nd Quarter Program now includes genetic algorithm Better class structure and code organization Several more complex data structures introduced Matrices Arrays Genetic Algorithm


Download ppt "Implementing Genetic Algorithms in Finance Applications Nihaar Sinha."

Similar presentations


Ads by Google