Package com.quantcomponents.algo

Examples of com.quantcomponents.algo.TradingAgentConfiguration


  }
 
  @Override
  public TradingAgentConfigurationHandle createConfiguration(TradingAgentFactoryHandle factoryHandle, Properties properties, String name) {
    ITradingAgentFactory factory = retrieveFactory(factoryHandle);
    TradingAgentConfiguration configuration = new TradingAgentConfiguration(factory, properties);
    TradingAgentConfigurationHandle handle = new TradingAgentConfigurationHandle(name == null || name.equals("") ? configuration.toString() : name, factory.getInputSeriesNames());
    hierarchyContainer.putTradingAgentConfiguration(handle, configuration, factoryHandle);
    return handle;
  }
View Full Code Here


    return handle;
  }

  @Override
  public TradingAgentBindingHandle createBinding(TradingAgentConfigurationHandle configurationHandle, Map<String, ? extends ISeries<Date, Double, ISeriesPoint<Date, Double>>> inputSeries, String name) {
    TradingAgentConfiguration configuration = retrieveConfiguration(configurationHandle);
    TradingAgentBinding binding = new TradingAgentBinding(configuration, inputSeries);
    TradingAgentBindingHandle handle = new TradingAgentBindingHandle(name == null || name.equals("") ? binding.toString() : name);
    hierarchyContainer.putTradingAgentBinding(handle, binding, configurationHandle);
    return handle;
  }
View Full Code Here

    }
    return binding;
  }
 
  private TradingAgentConfiguration retrieveConfiguration(TradingAgentConfigurationHandle configurationHandle) {
    TradingAgentConfiguration configuration = hierarchyContainer.getTradingAgentConfiguration(configurationHandle);
    if (configuration == null) {
      throw new IllegalArgumentException("Handle: " + configurationHandle + " does not correspont to an object");
    }
    return configuration;
  }
View Full Code Here

    HierarchyItem factoryHierarchyItem = hierarchy.get(factoryHandle);
    handleIdentities.put(factoryHandle, factoryHandle);
   
    ITradingAgentFactory factory = factoriesByHandle.get(factoryHandle);
    for (Map.Entry<TradingAgentConfigurationHandle, Properties> entry : factoryConfigurationByHandle.entrySet()) {
      configurationByHandle.put(entry.getKey(), new TradingAgentConfiguration(factory, entry.getValue()));
      factoryHierarchyItem.children.add(entry.getKey());
      handleIdentities.put(entry.getKey(), entry.getKey());
    }
   
    for (Map.Entry<TradingAgentBindingHandle, BindingPersistentData> entry : factoryBindingByHandle.entrySet()) {
      TradingAgentConfiguration configuration = configurationByHandle.get(entry.getValue().configurationHandle);
      TradingAgentBinding binding = new TradingAgentBinding(configuration, decodeInputSeriesMap(entry.getValue().inputSeriesNames));
      bindingByHandle.put(entry.getKey(), binding);
      handleIdentities.put(entry.getKey(), entry.getKey());
    }
   
View Full Code Here

TOP

Related Classes of com.quantcomponents.algo.TradingAgentConfiguration

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.