Various scripts in R for financial analysis