profit and loss calculation example - Search