new ExampleMultiAssetPortfolioLoader().initAndRun(args, ToolContext.class);
System.exit(0);
}
private void persistToPortfolio() {
PortfolioMaster portfolioMaster = getToolContext().getPortfolioMaster();
ManageablePortfolioNode rootNode = new ManageablePortfolioNode(PORTFOLIO_NAME);
ManageablePortfolio portfolio = new ManageablePortfolio(PORTFOLIO_NAME, rootNode);
PortfolioDocument portfolioDoc = new PortfolioDocument();
portfolioDoc.setPortfolio(portfolio);
addPortfolioNode(rootNode, getIborSwaps(), "Ibor swaps", BigDecimal.ONE);
addPortfolioNode(rootNode, getCMSwaps(), "CM swaps", BigDecimal.ONE);
addPortfolioNode(rootNode, getSimpleFX(), "FX forward", BigDecimal.ONE);
addPortfolioNode(rootNode, getFXOptions(), "FX options", BigDecimal.ONE);
addPortfolioNode(rootNode, getSwaptions(), "Swaptions", BigDecimal.ONE);
addPortfolioNode(rootNode, getIborCapFloor(), "Ibor cap/floor", BigDecimal.ONE);
addPortfolioNode(rootNode, getCMCapFloor(), "CM cap/floor", BigDecimal.ONE);
portfolioMaster.add(portfolioDoc);
}