Essays on Time Series and Machine Learning Techniques for Risk Management