|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mov.analyser.ga.GAIndividual
public class GAIndividual
A trading individual evolved by the GA. The Individual contains a set of parameters for the buy rule and the sell rule.
| Constructor Summary | |
|---|---|
GAIndividual(java.util.Random random,
GAIndividual lowest,
GAIndividual highest)
Randomly generate an individual using two individuals as highest and lowest limits for the parameters. |
|
GAIndividual(java.util.Random random,
GAIndividual mother,
GAIndividual father,
GAIndividual lowest,
GAIndividual highest)
Create a new individual by "breeding" or combining the two parent individuals. |
|
GAIndividual(java.lang.String[] parameters,
double[] values,
int[] types)
Create a new individual with the given parameters. |
|
| Method Summary | |
|---|---|
Portfolio |
getPortfolio()
Get the portfolio according to individual. |
Money |
getValue()
Get the final value of the individual after paper trading. |
java.lang.String |
parameter(int index)
Get the index parameter. |
void |
setPortfolio(Portfolio portfolio)
Set the portfolio according to individual. |
static void |
setRandomPercentage(int randomPercentage)
Set the random mutation constants. |
void |
setValue(Money value)
Set the final value of the individual after paper trading. |
int |
size()
Get the number of parameters for this individual. |
int |
type(int index)
Get the index type. |
double |
value(int index)
Get the index value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GAIndividual(java.lang.String[] parameters,
double[] values,
int[] types)
parameters - the name of parametersvalues - the values of parameterstypes - the types of parameters (integer or float)
public GAIndividual(java.util.Random random,
GAIndividual lowest,
GAIndividual highest)
lowest - lowest individualhighest - highest individual
public GAIndividual(java.util.Random random,
GAIndividual mother,
GAIndividual father,
GAIndividual lowest,
GAIndividual highest)
random - the random number generatorfather - one parent individualmother - another parent individual| Method Detail |
|---|
public Money getValue()
public void setValue(Money value)
value - the final valuepublic Portfolio getPortfolio()
public void setPortfolio(Portfolio portfolio)
portfolio - the portfoliopublic int size()
public java.lang.String parameter(int index)
public double value(int index)
public int type(int index)
public static void setRandomPercentage(int randomPercentage)
randomPercentage - the randomness percentage used in GA algorithm
|
Venice 0.7beta | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||