This project explores the correlations between XAUUSD (Gold), BTCUSD (Bitcoin), and major forex pairs, including;
- EURUSD
- USDCAD
- GBPUSD
- AUDUSD and
- DXY (Dollar Index). The analysis leverages Python and the Yahoo Finance API to provide insights into how these instruments relate to one another.
- Comprehensive Analysis: Examines historical daily data for XAUUSD, BTCUSD, and major forex pairs.
- Statistical Insights: Computes correlation matrices and rolling correlations.
- Visualizations: Heatmaps and line charts to interpret relationships.
- Automated Data Retrieval: Utilizes Yahoo Finance API for reliable and up-to-date financial data.
Ensure you have the following Python libraries installed:
pandas
matplotlib
seaborn
yfinance
Clone the repository:
https://github.com/amoakoh22/Forex-Pairs-Correlation-Analysis.git
Navigate into the project directory:
cd Forex-Pairs-Correlation-Analysis
Install the required libraries:
pip install -r requirements.txt
- Open the
notebooks/xauusd_vs_forex_pairs_correlation_analysis.ipynb
file in Jupyter Notebook or Google Colab. - Run all cells to:
- Fetch historical data
- Compute correlations
- Generate visualizations
- Explore the results , which includes:
- Heatmaps
- Rolling correlation plots
-
Correlation Matrix Heatmap: This heatmap displays the statistical relationships between XAUUSD, BTCUSD, and major forex pairs over the selected timeframe.
-
Rolling Correlation Plots: 30-day rolling correlations help analyze dynamic relationships, offering deeper insights into changing trends.
Contributions are welcome! --To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
Commit your changes and push:
git commit -m "Description of feature"
- Push your changes
git push origin feature-name
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
This project was developed by Samuel Amoakoh, a certified data scientist and mathematician with expertise and interests in:
- Financial Analytics
- Data Science
- Artificial Intelligence/Machine Learning (AI/ML)
- Sustainable Waste Management
- Policy Analysis
Samuel is passionate about leveraging data-driven insights to solve real-world challenges across diverse fields.
For more insights, follow or connect with me on: