Create-portfolio-template script is not working


#1

I have tried everything but when I run this script (with all the possible parameters) - for example with ./create-portfolio-template.sh -f all_types.csv -s all - all I get is the help screen of PortfolioTemplateCreationTool.
So here is what I get :

usage: java com.opengamma.integration.tool.portfolio.PortfolioTemplateCreationTool [-h] [-l ] -s
-h,–help prints this message
-l,–logback Logback (ignored)
-s,–securitytype The security type(s) for which to generate a template, or ‘all’ to create a template for each
available security type: CorporateBond GovernmentBond MunicipalBond CapFloorCMSSpread
CapFloor Cash CDS LegacyFixedRecoveryCDS LegacyRecoveryLockCDS LegacyVanillaCDS
StandardFixedRecoveryCDS StandardRecoveryLockCDS StandardVanillaCDS ContinuousZeroDeposit
PeriodicZeroDeposit SimpleZeroDeposit Equity EquityVarianceSwap AgricultureForward
CommodityForward EnergyForward MetalForward FRA AgricultureFuture BondFuture CommodityFuture
EnergyFuture EquityFuture EquityIndexDividendFuture Future FXFuture IndexFuture
InterestRateFuture MetalFuture StockFuture FXForward NonDeliverableFXForward BondFutureOption
CommodityFutureOption EquityBarrierOption EquityIndexDividendFutureOption
EquityIndexFutureOption EquityIndexOption EquityOption FXBarrierOption FXDigitalOption
FXOption IRFutureOption NonDeliverableFXDigitalOption NonDeliverableFXOption ForwardSwap Swap

Any ideas guys?
Thank you.


#2

I tested by running this from Eclipse. I ran the PortfolioTemplateCreationTool with the arguments “-s all” and the correct output csv files were produced. Perhaps it is objecting about the “-f all_types.csv” argument, which is not supported?

In general, the best approach to debugging issues with tools is to run them from within an IDE, using debugging mode if necessary.


#3

Thank you stephen for your fast reply!
Can I run this tool (PortfolioTemplateCreationTool) from the command line since the script is not working?


#4

I don’t know if the script is or is not working as I didn’t test that. At the command line, you just run the file as you would run any other Java class with a main method, adding the jar files to the classpath. The problem is that there are lots and lots of jar files to add, which is why it is easier to run it from an IDE or script.


#5

Yeah finally I’ve run it from the command line and it generated the appropriate cdv files.
Thank you so much stephen for your lightning fast help.