Notes

  • Evolutionary Algorithms
    • Subset of Evolutionary Compuatation
    • Reproduction, mutation, recombination, and selection
    • They borrow concepts of biological evolution to use in solving problems, commonly optimization problems
    • They do well in approximate solutions because they do not assume anything about the underlying landscape and problem scope
  • Evolutionary programming
    • In the form of computer programs, and their fitness is determined by their ability to solve a computational problem. The structure of the program is fixed and its numerical parameters are allowed to evolve.
  • Mutation
    • Avoid local minima (a minimum that looks like the lowest, but actually there is a lower minimum elsewhere in the solution set)
    • GA (Genetic Algorithm) systems avoid only taking the fittest of the population in generating the next but rather a random (or semi-random) selection with a weighting toward those that are fitter.
  • Selection
    1. The fitness function is evaluated for each individual, providing fitness values, which are then normalized. Normalization means multiplying the fitness value of each individual by a fixed number, so that the sum of all fitness values equals 1.
    2. The population is sorted by descending fitness values.
    3. Accumulated normalized fitness values are computed (the accumulated fitness value of an individual is the sum of its own fitness value plus the fitness values of all the previous individuals). The accumulated fitness of the last individual should of course be 1 (otherwise something went wrong in the normalization step!).
    4. A random number R between 0 and 1 is chosen.
    5. The selected individual is the first one whose accumulated normalized value is greater than R.

Brainstorm

  • brainstormed for a few hours about larger main project ideas
    • the way I see it now, I am doing practice sessions or modules for my class due dates each week
    • they are deliverable quality, but I will want to take the concepts and code behind them and weave them into a larger more encompasing project that I envisioned and documented on assignment 2 asset valuation forecasting
  • came up with possible solutions to what was bothering me about different data sets / collections, and how they would be treated differently when analyzing and forecasting, and interrelating.
    • Ex: fundamental data such as balance sheet VS. market data such as stock price
    • they are very different, and forecasted very differently
    • some only have few attributes per time period (market data), some have many (balance sheet)

Integrating Intelligence in StockTrading.xls

  • Real Data - My thoughts are to begin pulling in real data, either from research insight, or yahoo
    • Just one instance hard coded in at first, one time frame
    • Later, outside of this assignment, I want to add in the ability to replicate through many time frames, and therefore use the replication functionality already built in.
  • Intelligence - I want to automate and repeat various Runs of the simulation.
    • Each run, the computer will do what I was formerly doing by hand and brain
      • Genetic or Evolutionary Algorithm
      • Look at the ‘Comparison’ worksheet, see how the last set of inputs helped or hindered a better output, and modify some inputs in hopes of better output.
      • At first, for simplicity, it may be random changes
      • Down the line, there may need to be some more intelligence on the changes and comparison to former result sets
    • There will need to be a user set, number of times for the computer, to run the simulation and use its intelligence
      • Could also implement a STOP point, where once output doesn’t get better, you stop the thinking

Editing Excel file

  • Used last testing version of file
  • used old Barry and Igor file, and also a pre-written Research insight market report, to get the formatting of research insight cells needed
  • Changed the ‘Inputs’ worksheet around to have a Stock Ticker user input field, and got rid of the 4 days market price inputs, as those will not be imported
  • Removed market mean and Stddev, since we are using real data now
  • Changed commenting to user about it being a simulation of stock data, now its real data
  • Had BIG problem with getting market data into excel from research insight
    • Sometimes would get @NM symbols
    • FIXME had to create temporary cell If
      • =IF((SPWS(Ticker,"PRCCD[-217]"))="@NM", 1, SPWS(Ticker,"PRCCD[-217]"))
  • Started to code the ‘Reproduce’ function, later renamed ‘Evolve’
    • Got the loop in, main call successfully

Planning Evolutionary Algorithm

  • I noticed that I needed to plan this more, I did not have a good understanding of how my evolutionary algorithm would work functionally
  • Started penciling a sample run of evolutionary changes
    • This gave me a MUCH better understanding of what was going on
    • the best lesson was that I had to change multiple variables, by the same amount, during on generation, instead of just two changes
  • I then wrote out a generalized pseudo-function in english
  • I took this pseudo code and made it my comments in VBA
    • I added many more comments, clarified the pseudo code, gave headers to each clump of new comments
    • this adds another level of clarity to the documentation and commenting, so that other users and myself can more easily understand this algorithm

Interim Testing

  • Tested to see if very initial looping happens correct
    • SUCCESS
  • Tested to see how long many repititions (100), would effect many generations (20)
    • It did it in a few seconds
    • SUCCESS
  • Sleep

Evolutionary Computing Research

  • See notes above
  • thought of more ideas, but I need to code the one I have, it surprisingly makes sense enough and I came up with it naturally / before doing this research, yay!

Scope Learning

  • Public variable redo
    • I had my ‘public’ var’s, or as pearson calls them, project-scope var’s declared incorrectly, now they are good
  • Module separation
    • Also figured out how to do code in multiple modules and how scope effects modules and procedures, etc
    • Split into 5 modules, thus far
      1. Simulate
      2. Histogram
      3. Compare
      4. Evolve
      5. User Interface
 
personal/school/financialitsystems_is698/assignment_5_intelligence.txt · Last modified: 03.10.2008 05:08 by 96.244.4.59
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki