Git Product home page Git Product logo

jessicadecunha / time-series-regression-analysis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 6.85 MB

This repo tests various time series forecasting and linear regression modeling in order to predict future movements in the value of the Canadian dollar versus the Japanese yen.

Jupyter Notebook 100.00%
series-forecasting forecasting time series linear-regression modelling series-analysis

time-series-regression-analysis's Introduction

Time Series & Linear Regression Forecasting

Background

The financial departments of large companies often have to make foreign currency transactions when doing international business, while hedge funds are also interested in anything that will provide an edge in predicting currency movements. Hence, both are always eager to gain a better understanding of the future direction and risk of various currencies.

In this repo I have tested various time series tools in order to predict future movements in the value of the Canadian dollar versus the Japanese yen.

I have used:

  1. Time series forecasting
  2. Linear regression modelling

Summary of Results

Time Series Analysis

ARMA Model

The ARMA model may be a good fit as the p-value for the first AR and MA component, lag 1, are less than 0.05 making it statistically significant. This indicates that there is strong evidence against the null hypothesis, as there is less than a 5% probability the null is correct. However, the model may not a good fit because the p-value for AR.L2 is above 0.05 thus making it statistically insignificant. The ARMA Model results produced a high score in AIC, BIC, and HQIC indicating that this model is not the best fit. Overall the model is most likely not a good fit.

ARIMA Model

The p-value for each result in the ARIMA model are all greater than 0.05 thus making the model not a good fit. The AIC, BIC, and HQIC are all also relatively high.

GARCH Model

The GARCH Model is forecasting an increase in price over the next five days. However, the model is not a good fit as the p-value is far greater than 0.05

Linear Regression Forecasting

Regression Analysis

In-sample Root Mean Squared Error (RMSE): 0.8342483222052092 Out-of-Sample Root Mean Squared Error (RMSE): 0.6445828596930245

The higher RMSE result show that the sample data did not fit the model well and needs to be adjusted before it can be helpful.


Conclusion

Based on the time series anaysis the Yen should not be bought at this time based on the analysis. Although the currency is forecasted to increase, the model results show that the models themselves are not a good fit. There is confidence that these models are not a good fit and should not be used.

The amount of volatility associated with the Yen may indicate that the currency is too risky to purchase now. Due to models producing conflicting results (i.e. ARMIA suggests that the Yen will decrease whereas the GARCH indicates that the Yen will increase), the Yen may be to risky at the moment to purchase. It is suggested to adjust the models until a good fit is found.

Based on all the models I would not suggest using them for trading until they have been adjusted to show more promising results. Therefore, the the model performed better with data that it has not been tested on.

time-series-regression-analysis's People

Contributors

jessicadecunha avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.