Deep Learning to Forecast Time Series

Job ID: 38446644

Budget: $250 – $750 USD

**Project Requirements and Timeline**

This project requires deep expertise in large language models, GPT, NLP, time series analysis, and PyTorch. It is **time-sensitive**, with a **deadline of August 15 at 5 PM EST**. The goal is to use the Transformers Diviner model from GitHub to forecast various time series data, focusing on gold prices, APPL, EUR/USD, and GDP, while maintaining performance in terms of MSE.

**Project Steps**

1. **Forecasting Gold Prices**
- Use the gold prices from `gold.csv` in the `Exchange` data folder from the original GitHub repository. Disregard all other datasets like ETT, WTH, etc.
- Calculate MSE/RMSE (provided in the code) and display predictions alongside actual prices and dates.
- Create a table with columns for the date, true prices, and predicted prices for a 60-day period.
- Visualize 60-day true vs. pred performance over time with graphs for each asset/GDP
- **Example**: For each test sample, the table should show the actual price on a specific date and the forecasted prices for each preceding day up to 60 days. For instance, if the actual price on 10/29/20 was 1870.3, the table should include predicted prices for 1 day before (e.g., 1868.1), 2 days before (e.g., 1898.5), and so on, up to 60 days before. So if today's 29/10/24, and the model forecasts the gold price will be 1510 in 60 days later, you should track with each time step the model's predictions until the 60th day compare to the actual "true" price with when you reach the 60th day, with predictions for each preceding day up to the 60th day.
- Complete this step fully before proceeding.

2. **Data Collection and Forecasting for Multiple Assets**
- You are responsible for sourcing and downloading your own data from credible websites like Yahoo Finance, World Bank, OECD, IMF, etc.
- Download data into CSV files, including the date, target feature, and variables.
- Datasets:
- Daily Apple stock prices as target feature, with P/E ratio and Earnings per Share for 10 years as variables.
- EUR/USD spot prices as target feature, with U.S. interest rates and trade balance for 10 years as variables.
- U.S. Real GDP as target feature, with U.S. interest rates, inflation CPI, and China’s Real GDP for 10 years as variables.

3. **Attention Weights Analysis**
- Analyze and display attention weights for each asset/GDP.
- Use traditional attention weight analysis on all layers to rank features by importance in percentage terms.
- Use ddblock for difference attention module analysis and rank features by importance in percentage terms.
- **Example**: If the model forecasts APPL to be $152.41 in the next 60 days, attention weights might show that the price is 50% responsible, P/E ratio 25%, and EPS 25% for that forecast.

4. **Simultaneous Forecasting**
- Use the model to forecast 60 days ahead for all 4 target features, gold, APPL, EURUSD, GDP simultaneously, just like the main.py in the GitHub repository did for WTH, ETT, Exchange, etc
- For non-daily variables, use the most recent values until the next release.

**Implementation Details**
- Ensure compatibility with Google Colab using a GPU
- Include clear notes in the code for ease of understanding and replication.
- Adjust the existing algorithm to forecast different datasets without completely changing it. Ensure that these adjustments do not impact the model's performance in terms of MSE.
- Use the parameters and command script from the gold data in the GitHub repository for all datasets.

**GitHub Details**
- Utilize the Transformers Diviner Model from the GitHub repository: [Diviner-Nonstationary-time-series-forecasting](https://github.com/CapricornGuang/Diviner-Nonstationary-time-series-forecasting/blob/main/README.md).

**Timeline**
- The project is straightforward since most of the coding is already available. Adjust the model to forecast different CSV datasets promptly.
- **Deadline: August 15 at 5 PM EST.**