The financial departments of large companies often deal with foreign currency transactions while doing international business. As a result, they are always looking for anything that can help them better understand the future direction and risk of various currencies. Hedge funds, too, are keenly interested in anything that will give them a consistent edge in predicting currency movements.
In this assignment, you will test the many time-series tools that you have learned in order to predict future movements in the value of the Japanese yen versus the U.S. dollar.
You will gain proficiency in the following tasks:
- Time Series Forecasting
- Linear Regression Modeling
Use the following starter code to complete this assignment.
Note: The starter code shows example calculations and figures to use as a guide. However, your actual output may differ depending on the code and data used.
Linear Regression Starter Notebook
In this notebook, you will load historical Dollar-Yen exchange rate futures data and apply time series analysis and modeling to determine whether there is any predictable behavior.
Follow the steps outlined in the time-series starter notebook to complete the following:
- Decomposition using a Hodrick-Prescott Filter (Decompose the Settle price into trend and noise).
- Forecasting Returns using an ARMA Model.
- Forecasting the Settle Price using an ARIMA Model.
- Forecasting Volatility with GARCH.
Use the results of the time series analysis and modeling to answer the following questions:
- Based on your time series analysis, would you buy the yen now?
- Is the risk of the yen expected to increase or decrease?
- Based on the model evaluation, would you feel confident in using these models for trading?
In this notebook, you will build a Scikit-Learn linear regression model to predict Yen futures ("settle") returns with lagged Yen futures returns and categorical calendar seasonal effects (e.g., day-of-week or week-of-year seasonal effects).
Follow the steps outlined in the regression_analysis starter notebook to complete the following:
- Data Preparation (Creating Returns and Lagged Returns and splitting the data into training and testing data)
- Fitting a Linear Regression Model.
- Making predictions using the testing data.
- Out-of-sample performance.
- In-sample performance.
Use the results of the linear regression analysis and modeling to answer the following question:
- Does this model perform better or worse on out-of-sample data compared to in-sample data?
- Out-of-sample data is data that the model hasn't seen before (Testing data).
- In-sample data is data that the model was trained on (Training data).
-
Create Jupyter Notebooks for the analysis and host the notebooks on GitHub.
-
Include a Markdown that summarizes your models and findings and include this report in your GitHub repo.
-
Submit the link to your GitHub project to Bootcampspot.
- Utilize the Hodrick-Prescott Filter to decompose the settle price into trend and noise. (5 points)
- Use the ARMA Model to forecast returns. (5 points)
- Use the ARIMA Model to forecast returns. (5 points)
- Use the GARCH Model to forecast returns. (5 points)
- Analyze the yen to decide whether to make a purchase. (5 points)
- Analyze the risk of the yen. (5 points)
- Analyze the confidence of models as a basis for trading. (5 points)
- Prepare the data, create returns and lagged returns, then split the data into training and testing sets. (5 points)
- fit a linear Regression model to the data. (5 points)
- Make predictions using the testing data. (6 points)
- Evaluate the out-of-sample performance. (7 points)
- Evaluate the In-sample performance. (7 points)
- Analyze the model performance for out-of-sample and in-sample data and write a conclusion. (5 points)
- Place imports at the beginning of the file, just after any module comments and docstrings and before module globals and constants. (3 points)
- Name functions and variables with lowercase characters and with words separated by underscores. (2 points)
- Follow Don't Repeat Yourself (DRY) principles by creating maintainable and reusable code. (3 points)
- Use concise logic and creative engineering where possible. (2 points)
- Submit a link to a GitHub repository that’s cloned to your local machine and contains your files. (5 points)
- Include appropriate commit messages in your files. (5 points)
- Be well commented with concise, relevant notes that other developers can understand. (10 points)
© 2021 Trilogy Education Services