Machine learning algorithms for pricing and hedging of derivatives