nan occurs when loss_bhp is calculated, so that nan occurs throughout
nan occurs when loss_bhp is calculated, so that nan occurs throughout