Markov chains and the pricing of derivatives