dcndn4 / HW-7-TimeSrs_YenFuture

Homework # 7 on Unit # 10 Time Series Yen for the Future

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HW-7-TimeSrs_YenFuture

Homework # 7 on Unit # 10 Time Series Yen for the Future Focus on Future Rates

Predicting future movements in the value of the Japenese Yen in relation to the US Dollar

This file accompanies Visual Data Analysis notebook being provided to my FinTech Company CFO.

Goal of This Notebook

The goal of these analysis tools is to provide information about Yen exchange rates.

Part I - Time-Series Forecasting

I plotted the Settle price fluctuation of the Yen, from 1990 to today:

Settle Prices

The patterns I noted were substantial volatility in the shorter-term, and an upward thrust in general over the long term.

In comparing the settle price to the trend line derived from the Hodrick-Prescott Filter, that upward direction is very clear.

Settle Prices with Trend Line indicated

I forecasted Returns using the ARMA model and the Settle Price using the ARIMA model - initial results yielded AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) levels of approximately 15000 (ARMA) and 83000 (ARIMA) which argued against the usefulness of these models for trading without further iterations and improvements, as the current data has too many parameters. However in both cases the projections show an uptick in exchange rate futures.

My GARCH Analysis results:

GARCH Volatility Forecast

From GARCH my conclusion is that although there is significant volatility, the Japanese Yen's substantial upside makes it a worthwhile investment even so.

Part II - Linear Regression Forecasting

I also built a linear regression model to further explore Yen futures (options), using Scikit-Learn. It was run on data consisting of returns vs. lagged-returns (returns 1 day earlier), which were split into training data sets (feed into the predictive model) and test data (run on the model afterwards, to test its accuracy) by a time period definition.

My results were as follows:

In-sample (training) data:

** MSE .37

** RMSE .61

Out-of-sample (testing) date:

** MSE .17

** RMSE .41

This model performed better on in-sample data (training data) then out-of-sample data (test data).

Technical Notes

Libraries

This Jupyter Lab notebook utilizes the following libraries:

-- arch

-- statsmodels.api

-- sklearn

-- pandas

-- Numpy

-- Pathlib

-- matplotlib

Acknowledgements

I would like to first acknowledge the guidance and teaching of our FinTech Boot Camp Instructor, Garth Mortensen, our TA, Alejandro Esquivel, and out Student Success Manager, Angelica Baraona. I also found the collective Stack Overflow wisdom (especially the Quantitative Finance community) essential as ever. Regarding Time Series and Machine Learning overall I utilized information from the geeksforgeeks.org (again) website, as well as Jason Brownlee's '11 Classical Time Series Forecasting Methods in Python (Cheat Sheet)' page, 'Time Series Analysis in Python - A Comprehensive Guide with Examples' from the Machine_Learning_+ website, and the Dataquest website's tutorial 'Time Series Analysis with Pandas'; as well as the tech website collective in general. The Pandas books section on Time Series were helpful. And finally, Weapons of Math Destruction by Cathy O'Neil was a great source for context regarding modeling and the inherent challenges facing our communities.

About

Homework # 7 on Unit # 10 Time Series Yen for the Future


Languages

Language:Jupyter Notebook 100.0%