Some code samples for pricing and risk management