fixed bug in trainCFD and PortfolioNav