Description Usage Arguments Value
A single speciman consists of *num_stock* stocks, each encoded by *num_genes* bits. Therefore a speciman is encoded with num_genes * num_stocks bits. During each iteration only a single stock (bits encoding one stock) is taken into accunt for crossover.
1 2 3 | genalg(num_iter = 200, num_spec = 400, num_genes = 10, p_cross = 0.9,
p_mutant = 0.01, num_stocks. = num_stocks,
expectedReturn. = expectedReturn)
|
num_iter |
Number of iterations |
num_spec |
Number of specimen (must be even) |
num_genes |
Number of number of bits encoding a single stock |
p_cross |
Crossing-over probability |
p_mutant |
Mutation probability |
num_stocks. |
Number of stocks in analysis |
expectedReturn. |
Vector of expected returns (returned by prepareData) |
List with the following components:
$value - maximum adaptaion for each generation
$avg - average adaptation for each generation
$std - standard deviation of adaptation for each generation
$specimen - Sequence of bits encoding the best speciman in each generation
$popul - the whole population for the first and the last generation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.