@@ -0,0 +1,1342 @@
+/**%0A * Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies%0A * %0A * Please see distribution for license.%0A */%0Apackage com.opengamma.examples.generator;%0A%0Aimport com.opengamma.financial.generator.AbstractPortfolioGeneratorTool;%0Aimport com.opengamma.financial.generator.FXForwardSecurityGenerator;%0Aimport com.opengamma.financial.generator.LeafPortfolioNodeGenerator;%0Aimport com.opengamma.financial.generator.PortfolioNodeGenerator;%0Aimport com.opengamma.financial.generator.PositionGenerator;%0Aimport com.opengamma.financial.generator.SimplePositionGenerator;%0Aimport com.opengamma.financial.generator.StaticNameGenerator;%0Aimport com.opengamma.financial.security.fx.FXForwardSecurity;%0A%0A/**%0A * Utility for constructing a random FX Forward portfolio.%0A */%0Apublic class FxForwardPortfolioGeneratorTool extends AbstractPortfolioGeneratorTool %7B%0A%0A  @Override%0A  public PortfolioNodeGenerator createPortfolioNodeGenerator(final int portfolioSize) %7B%0A    final FXForwardSecurityGenerator securities = new FXForwardSecurityGenerator();%0A    configure(securities);%0A    final PositionGenerator positions = new SimplePositionGenerator%3CFXForwardSecurity%3E(securities, getSecurityPersister(), getCounterPartyGenerator());%0A    return new LeafPortfolioNodeGenerator(new StaticNameGenerator(%22FX Forwards%22), positions, portfolioSize);%0A  %7D%0A%0A%7D%0A

Add FX Forward generator tool