Package com.opengamma.financial.generator

Examples of com.opengamma.financial.generator.StaticNameGenerator


  }

  private BloombergExamplePortfolioGeneratorTool portfolioGeneratorTool() {
    final BloombergExamplePortfolioGeneratorTool tool = new BloombergExamplePortfolioGeneratorTool();
    tool.setCounterPartyGenerator(new StaticNameGenerator(AbstractPortfolioGeneratorTool.DEFAULT_COUNTER_PARTY));
    return tool;
  }
View Full Code Here


  public PortfolioGenerator createPortfolioGenerator(final NameGenerator portfolioNameGenerator) {
    final SwaptionSecurity[] swaptions = createSwaptions(PORTFOLIO_SIZE);
    final SecurityGenerator<SwaptionSecurity> securities = createSwaptionSecurityGenerator(swaptions, PORTFOLIO_SIZE);
    configure(securities);
    final PositionGenerator positions = new SimplePositionGenerator<>(securities, getSecurityPersister(), getCounterPartyGenerator());
    final PortfolioNodeGenerator rootNode = new LeafPortfolioNodeGenerator(new StaticNameGenerator("Swaptions"), positions, PORTFOLIO_SIZE);
    return new PortfolioGenerator(rootNode, portfolioNameGenerator);
  }
View Full Code Here

  public PortfolioNodeGenerator createPortfolioNodeGenerator(final int size) {
    final SwaptionSecurity[] swaptions = createSwaptions(size);
    final SecurityGenerator<SwaptionSecurity> securities = createSwaptionSecurityGenerator(swaptions, size);
    configure(securities);
    final PositionGenerator positions = new SimplePositionGenerator<>(securities, getSecurityPersister(), getCounterPartyGenerator());
    return new LeafPortfolioNodeGenerator(new StaticNameGenerator("Swaptions"), positions, size);
  }
View Full Code Here

    final CMSSwapSecurityGenerator cmsSwap = new CMSSwapSecurityGenerator(TRADE_DATE, TENORS);
    final CMSCapFloorSpreadSecurityGenerator cmsSpreads = new CMSCapFloorSpreadSecurityGenerator(TRADE_DATE, PAY_TENORS, RECEIVE_TENORS, TENORS, STRIKES);
    configure(capFloors);
    configure(cmsSwap);
    configure(cmsSpreads);
    final TreePortfolioNodeGenerator rootNode = new TreePortfolioNodeGenerator(new StaticNameGenerator("Mixed CM Portfolio"));
    rootNode.addChildNode(capFloors);
    rootNode.addChildNode(cmsSwap);
    rootNode.addChildNode(cmsSpreads);
    return rootNode;
  }
View Full Code Here

  @Override
  public PortfolioNodeGenerator createPortfolioNodeGenerator(final int portfolioSize) {
    final SecurityGenerator<ManageableSecurity> securities = new GovernmentBondSecurityGenerator<>(BONDS, AMOUNTS, "US Treasuries");
    configure(securities);
    final TreePortfolioNodeGenerator rootNode = new TreePortfolioNodeGenerator(new StaticNameGenerator("Government Bonds"));
    rootNode.addChildNode((PortfolioNodeGenerator) securities);
    return rootNode;
  }
View Full Code Here

  @Override
  public PortfolioGenerator createPortfolioGenerator(final NameGenerator portfolioNameGenerator) {
    final SecurityGenerator<FXForwardSecurity> securities = createFXForwardSecurityGenerator();
    configure(securities);
    final PositionGenerator positions = new SimplePositionGenerator<>(securities, getSecurityPersister(), getCounterPartyGenerator());
    final PortfolioNodeGenerator rootNode = new LeafPortfolioNodeGenerator(new StaticNameGenerator("FX Forwards"), positions, FX_FORWARDS.size());
    return new PortfolioGenerator(rootNode, portfolioNameGenerator);
  }
View Full Code Here

  @Override
  public PortfolioNodeGenerator createPortfolioNodeGenerator(final int portfolioSize) {
    final SecurityGenerator<FXForwardSecurity> securities = createFXForwardSecurityGenerator();
    configure(securities);
    final PositionGenerator positions = new SimplePositionGenerator<>(securities, getSecurityPersister(), getCounterPartyGenerator());
    return new LeafPortfolioNodeGenerator(new StaticNameGenerator("FX Forwards"), positions, FX_FORWARDS.size());
  }
View Full Code Here

    final MySecurityGenerator<ManageableSecurity> fourthGenerator = getVanillaSwapSecurityGenerator();
    configure(firstGenerator);
    configure(secondGenerator);
    configure(thirdGenerator);
    configure(fourthGenerator);
    final TreePortfolioNodeGenerator rootNode = new TreePortfolioNodeGenerator(new StaticNameGenerator("EUR Fixed Income Portfolio"));
    rootNode.addChildNode(firstGenerator);
    rootNode.addChildNode(secondGenerator);
    rootNode.addChildNode(thirdGenerator);
    rootNode.addChildNode(fourthGenerator);
    return rootNode;
View Full Code Here

  @Override
  public PortfolioNodeGenerator createPortfolioNodeGenerator(final int size) {
    final FutureSecurityGenerator<ManageableSecurity> generator = getIRFutureSecurityGenerator();
    configure(generator);
    final TreePortfolioNodeGenerator rootNode = new TreePortfolioNodeGenerator(new StaticNameGenerator("ER Future Portfolio"));
    rootNode.addChildNode(generator);
    return rootNode;
  }
View Full Code Here

  @Override
  public PortfolioGenerator createPortfolioGenerator(final NameGenerator portfolioNameGenerator) {
    final SecurityGenerator<SwapSecurity> securities = createSwapSecurityGenerator();
    configure(securities);
    final PositionGenerator positions = new SimplePositionGenerator<>(securities, getSecurityPersister(), getCounterPartyGenerator());
    final PortfolioNodeGenerator rootNode = new LeafPortfolioNodeGenerator(new StaticNameGenerator("AUD Swaps"), positions, 4);
    return new PortfolioGenerator(rootNode, portfolioNameGenerator);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.generator.StaticNameGenerator

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.