Inspiration
In light of the recent elections, we want to know how the US politics will affect the purchasing power of Canadian consumers and how it will impact our economy.
What it does
The project forecasts the USD/CAD currency pair value over varying time periods, providing crucial insights into future trends in currency fluctuations. This prediction is significant because it equips Canadian consumers and businesses with a tool to anticipate and prepare for potential changes in the forex market, making informed decisions to protect purchasing power and mitigate the impact of exchange rate volatility. By understanding how US political events—such as elections—affect the forex market, consumers can gain better control over their financial planning, while policymakers and financial institutions can develop strategies to address economic challenges.
How we built it
To develop our tool, we gathered and processed data from three key sources, each contributing essential insights to our forecasting model. First, we obtained Forex Data through Alpha Vantage, focusing specifically on the USD/CAD currency pair over the past several years. This dataset provided a historical record of exchange rates, forming the basis of our predictive model. Next, we turned to News Data from reputable sources, including the New York Times, to conduct Sentiment Analysis. We focused on political events and significant news stories that could influence the forex market. By analyzing these articles, we extracted sentiment trends that could potentially correlate with fluctuations in the exchange rate, especially during election cycles and periods of political uncertainty. Finally, we collected Macroeconomic Indicators, including data on Gross Domestic Product (GDP), Interest Rates, and Inflation Rates. These indicators are critical in understanding the broader economic context, as they directly influence currency valuations and consumer purchasing power. We integrated these factors into our model to enhance its accuracy and account for the larger economic environment. After gathering the necessary datasets, we proceeded with data preprocessing to clean and transform the data into a usable format. This step included handling missing values, normalizing variables, and ensuring the data was consistent across different time periods. With the data prepared, we fed it into an LSTM model, a powerful machine learning algorithm known for its effectiveness in time-series forecasting and regression tasks. The model was trained to forecast the USD/CAD exchange rate for various time periods, providing valuable insights into future currency fluctuations. Finally, we integrated our model's predictions into the demo page of our website, allowing users to interact with forecasts. The demo page showcases the model's ability to predict upcoming forex trends, giving users a practical tool to navigate potential changes in the exchange rate. This interface highlights our commitment to not only building a robust predictive model but also providing accessible, actionable insights to Canadian consumers, helping them make informed financial decisions.
Challenges we ran into
One of the main challenges we faced was collecting data and ensuring a consistent frequency across datasets. Forex data was updated frequently, while news data from the New York Times was less predictable and often fragmented. Additionally, macroeconomic indicators like GDP, interest rates, and inflation were updated quarterly or annually, creating difficulties when aligning them with more frequent data.
Accomplishments We're Proud Of
We are proud of the progress we’ve made in forecasting the USD/CAD exchange rate over different time periods using our LSTM model. Despite challenges with data frequency and inconsistencies, we’ve been able to preprocess and integrate various datasets—Forex data, news sentiment, and macroeconomic indicators—to generate meaningful predictions. While we are still working on finalizing the visualization on the frontend, the model itself shows promise in providing insights into future currency fluctuations. We’re excited to continue refining the tool to make it a useful resource for Canadian consumers and businesses.
What we learned
This project taught us the importance of efficient data preprocessing when working with datasets of varying formats and frequencies. We gained valuable experience with LSTM for time-series forecasting, learning how to refine the model for better accuracy. We also realized the importance of continuous testing and refinement, especially when integrating predictions into a real-world interface to ensure reliability and usability.
What's next for News4X
To improve our model, we plan to refine our data by incorporating more factors, such as additional economic indicators or geopolitical events, to enhance the accuracy of our forecasts. We also aim to expand the demo page by adding more features that would benefit Canadian consumers, providing them with deeper insights into how currency fluctuations impact their finances. Currently, our model can predict the USD/CAD exchange rate for various time periods, but we hope to further tune the model for better longer-term predictions, helping users plan better for future market changes.
Credit to @ctrlastudio (ctrlastudio.com) for the logo graphics Credit to @NYTimes for news articles and @AlphaVantage for the forex data
Built With
- alpha-vantage
- fred
- html
- javascript
- new-york-times
- python
Log in or sign up for Devpost to join the conversation.