I wrote a perl spider to find & feed business news story headlines from the internet into a genetic/evolution AI population with the health function being profit made on the stock market. I wrote another perl script that connected to an online stock market game (@investopedia.com) and placed the orders that the healthiest member of the population came up with.
It didnt quite work. Was always about even on the buy/sell, I was hoping for 1% growth a day.
Money = (initial investment)*(1+.01)^days
So, for $2000 initial investment after 300 business days
Money = ($2000)*(1+.01)^300 = $39,577
After 600 business daya
Money = $783,167
After 900 Business days
Money = $15,497,670
I had one function that searched headlines for businesses (so the AI knew what stock to buy/sell). Each member of the population had different values for differnt words (this is what was evolved), so the headline was parsed by adding up the values of thwe words. Then the AI either buy if positve, or sold if negative. Held for a day then rectifed the transaction.
I think my problem was in using individual words and not considering phrases. I think Im going to rewrite it for the FOREX since the FORX is open almost 24-7.
|