code from talk on copulas in finance