Package org.jamesii.asf.portfolios.ga

Examples of org.jamesii.asf.portfolios.ga.ListIndividualFactory


    PortfolioPerformanceData perfData = generator.generateTestMatrix();
    PortfolioProblemDescription pdd =
        new PortfolioProblemDescription(perfData, acceptableRisk, false,
            MIN_SIZE, MAX_SIZE);
    gaps.setIndividualFactory(new ListIndividualFactory());
    double[] portfolio = gaps.portfolio(pdd);
    double[] stochasticPortfolio = null;

    if (COMPARE_STOCHASTIC) {
      StochSearchPortfolioSelector ssps =
View Full Code Here


          new GeneticAlgorithmPortfolioSelector();
      gaps.setAbortCriterion(new GenerationCountAbort(NUM_GENERATIONS));
      gaps.setFitness(new ASRFitness());
      gaps.setNumIndividuals(NUM_INDIVIDUALS);
      gaps.setMutationRate(0.001);
      gaps.setIndividualFactory(new ListIndividualFactory());

      double[] gaPortfolio = gaps.portfolio(pdd);
      double[] completePortfolio = new double[gaPortfolio.length];
      for (int i = 0; i < completePortfolio.length; i++) {
        completePortfolio[i] = 1.0 / completePortfolio.length;
View Full Code Here

TOP

Related Classes of org.jamesii.asf.portfolios.ga.ListIndividualFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.