Examples of portfolio()


Examples of com.collective2.signalEntry.adapter.dynamicSimulator.SystemManager.portfolio()

                                                        profitTargetSignalId==SystemManager.NO_ID?null:profitTargetSignalId,
                                                        OK);

                case GetBuyPower:
                   //  long lastTickTime = lastTickDataProvider.endingTime();
                     BigDecimal buyPower = system.portfolio().cash().add(system.totalMargin());
                     return new SimulatedResponseGetBuyPower(OK,time,buyPower);

                case Cancel:

                    Integer id = (Integer)request.get(Parameter.SignalId);
View Full Code Here

Examples of com.collective2.signalEntry.adapter.dynamicSimulator.SystemManager.portfolio()

                    system.cancelAllPending(time);
                    return new SimulatedResponseCancelAllPending(OK);

                case CloseAllPositions:

                    system.portfolio().closeAllPositions();
                    return new SimulatedResponseCloseAllPositions(OK);

                case FlushPendingSignals:

                    system.flushPendingSignals(lastTickDataProvider);
View Full Code Here

Examples of com.collective2.signalEntry.adapter.dynamicSimulator.SystemManager.portfolio()

                    return new SimulatedResponseGetAllSignals(OK, allPendingSignals);

                case GetSystemEquity:

                    long lastTickTime = lastTickDataProvider.endingTime();
                    Number equity = system.portfolio().equity(lastTickDataProvider);
                    return new SimulatedResponseGetSystemEquity(OK,lastTickTime,equity);

                case GetSystemHypothetical:

                    List<Map<C2Element, Object>> data = new ArrayList<Map<C2Element, Object>>();
View Full Code Here

Examples of com.collective2.signalEntry.adapter.dynamicSimulator.SystemManager.portfolio()

                    return new SimulatedResponseGetSystemHypothetical(data);

                case PositionStatus:

                    String symbol = (String)request.get(Parameter.Symbol);
                    Integer position = system.portfolio().position(symbol).quantity();
                    return new SimulatedResponsePositionStatus(OK,time,symbol,position);

                case RequestOCAId:

                    Integer ocaid = system.generateNewOCAId();
View Full Code Here

Examples of com.opengamma.engine.target.resolver.PositionSourceResolver.portfolio()

      addResolver(ComputationTargetType.SECURITY, new SecuritySourceResolver(securitySource));
    }
    _positionSource = positionSource;
    if (positionSource != null) {
      final PositionSourceResolver resolver = new PositionSourceResolver(positionSource);
      addResolver(ComputationTargetType.PORTFOLIO, new LazyResolver.LazyPortfolioResolver(this, resolver.portfolio()));
      addResolver(ComputationTargetType.PORTFOLIO_NODE, new LazyResolver.LazyPortfolioNodeResolver(this, resolver.portfolioNode()));
      addResolver(ComputationTargetType.POSITION, new LazyResolver.LazyPositionResolver(this, resolver.position()));
      addResolver(ComputationTargetType.TRADE, new LazyResolver.LazyTradeResolver(this, resolver.trade()));
    }
    addResolver(ComputationTargetType.CURRENCY);
View Full Code Here

Examples of org.jamesii.asf.portfolios.ga.GeneticAlgorithmPortfolioSelector.portfolio()

      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

Examples of org.jamesii.asf.portfolios.ga.GeneticAlgorithmPortfolioSelector.portfolio()

    gaps.setNumIndividuals(NUM_OF_IND);
    gaps.setMutationRate(MUTATION_RATE);
    gaps.setFactoryGenePool(FACTORY_GENE_POOL);
    gaps.setIndividualFactory(FACTORY_INDIVIDUAL);
    double[] vector =
        gaps.portfolio(new PortfolioProblemDescription(perfData, 0, MAXIMIZE,
            MIN_SIZE, MAX_SIZE));

    System.out.println("PerformanceTest finished.");
    System.out.println("Vector:");
    for (int i = 0; i < vector.length; i++) {
View Full Code Here

Examples of org.jamesii.asf.portfolios.stochsearch.StochSearchPortfolioSelector.portfolio()

    if (COMPARE_STOCHASTIC) {
      StochSearchPortfolioSelector ssps =
          new StochSearchPortfolioSelector(gaps.getNumIndividuals()
              * NUM_OF_GENERATIONS, SimSystem.getRNGGenerator().getNextRNG());
      stochasticPortfolio = ssps.portfolio(pdd);
    }
    return new Pair<>(portfolio, stochasticPortfolio);
  }

  /**
 
View Full Code Here

Examples of org.jamesii.asf.portfolios.stochsearch.StochSearchPortfolioSelector.portfolio()

      StochSearchPortfolioSelector ssps =
          new StochSearchPortfolioSelector(NUM_GENERATIONS * NUM_INDIVIDUALS,
              SimSystem.getRNGGenerator().getNextRNG());
      System.err.println("1");
      double[] stochasticPortfolio = ssps.portfolio(pdd);
      System.err.println("2");
      for (int i = 0; i < NUM_OF_PROBLEMS; i++) {
        System.err.println("Problem #" + i);
        IProblemDefinition problem =
            portPerfData.problems[(int) (portPerfData.problems.length * SimSystem
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.