15
An LCS for Stock Market Analysis Christopher Mark Gore [email protected] http://www.cgore.com Computer Science 401 Evolutionary Computation

An LCS for Stock Market Analysis Christopher Mark Gore [email protected] Computer Science 401 Evolutionary Computation

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Page 1: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

An LCS for Stock Market AnalysisChristopher Mark Gore

[email protected]://www.cgore.com

Computer Science 401Evolutionary Computation

Page 2: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

What happened to conversation intervention?

• An LCS requires lots of training data.• Conversation intervention would

require hundreds, if not thousands, of conversations for both the training phase and for the evaluation phase.

• I currently only have one conversation.

Page 3: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Why stock market analysis?

• There is more data available than I can even use: daily data for thousands of stocks over the last 100 years.

• It is a very unpredictable problem, and therefore it is interesting.

• If this actually produces results, than it is a self-funding project.

Page 4: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Why not ZCS?

• ZCS doesn’t easily produce long decision chains

• ZCS runs a panmictic GA, which is slow.

• ZCS doesn’t apply selective pressure towards a complete mapping.

• ZCS often fails to evolve accurate generalizations.

Page 5: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Why XCS?

• XCS is basically a “fixed” ZCS.• XCS is the subject of a lot of research.• XCS is one of the easiest LCS’s to

implement.• XCS has performed well before for this.

[Schulenburg and Ross: Strength and Money: An LCS Approach to Increasing Returns]

Page 6: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Resources for XCS

• Stewart W. Wilson: http://www.prediction-dynamics.com

• Classifier Fitness Based on Accuracy. (original paper)

• An Algorithmic Description of XCS. (a simple overview of the XCS algorithm)

Page 7: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

How do you get lots of stock data?

• Pay too much money to any major investment company.

OR• Take it from Yahoo! Finance’s back-

end.• http://finance.yahoo.com• Write a parser for their slightly

modified CSV files, and a data retrieval program.

Page 8: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

What data is available?

On a daily, weekly, or monthly basis:• Opening price.• High price.• Low price.• Closing price.• Trading volume.

Page 9: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

What questions can we use in the learning classifier?

• Is today higher/lower than yesterday?• Is today a week-long high/low?• Is this an n-day high/low?• Is this a high/low trading volume?• Is the monthly trend up or down?… and many, many more.

Page 10: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Shulenburg and Ross

Strength and Money: An LCS Approach to Increasing Returns.

Three different trader types:1. Price information only.2. Primarily volume information, limited

price information.3. Price, volume, limited history,

competitor’s information.

Page 11: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Simple trading methods

These were used for comparison.• Bank: ignore the stock, keep the

money in the bank the whole time.• Buy and Hold: ignore the bank

account, keep the money in the stock for the long run.

• Trend Following: buy if yesterday is higher than the day before, sell if yesterday is lower than the day before.

Page 12: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Schulenburg and Ross versus Me

• S&R were interested in mostly what data was most useful for prediction. Therefore, they made simplistic agents purposefully, each with different restricted data.

• I am most interested in how good of performance I can produce. Therefore, I will give them as much data as possible.

Page 13: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Possible future improvements

• What about switching between several stocks, instead of just a single stock and bank? Perhaps there are strong inter-relations among the stocks.

• What other data would be useful? Perhaps non-market indicators would be useful.

• What predicates really matter? Perhaps an s-classifier would help.

Page 14: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

My current status

Completed:• Yahoo! Finance data retrieval program.• Yahoo! Finance CSV file parser.• Most stock data support functions.In progress:• XCS algorithm: ~25% completed.Not yet started:• Current condition predicates.• Trial runs: needs XCS algorithm.

Page 15: An LCS for Stock Market Analysis Christopher Mark Gore chris-gore@earthlink.net  Computer Science 401 Evolutionary Computation

Questions? (hopefully answers too)

?