Investigating the Black Scholes European Option Valuation Model

Download Report

Transcript Investigating the Black Scholes European Option Valuation Model

Implementing Genetic
Algorithms in Finance
Applications
Nihaar Sinha
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.
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
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
Reading in Data
Source code is imported from the Internet
Data is parsed for keywords
Last Trade: “</small><big><b><span
id="yfs_l10_ibm">
P/E :“</span>:</th><td
class="yfnc_tabledata1">
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
Genetic Algorithm
http://www.meteck.org/IMAGES/imag
e001.gif
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
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
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
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
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.
Future Research Potential
Using different metrics to rank portfolio combinations
Changing rank system to real-time structure, allowing buy
and sell triggers
Incorporating past performances into ranking method as
another metric
Graphing results to provide accuracy percentage to user