Skip to content

Comprehensive correlation analysis of XAUUSD, BTCUSD, and major forex pairs using Python, statistical insights, and visualizations for financial analytics

License

Notifications You must be signed in to change notification settings

amoakoh22/Forex-Pairs-Correlation-Analysis

Repository files navigation

Correlation Analysis of XAUUSD, BTCUSD, and Forex Pairs

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.

📈 Key Features

  • 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.

🛠️ Requirements

Ensure you have the following Python libraries installed:

pandas
matplotlib
seaborn
yfinance

🚀 Installation

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

requirements.txt

💻 Usage

  • 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

📊 Results

  • 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.

🤝 Contribution

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.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🖋️ Author

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.

🔗 Connect

For more insights, follow or connect with me on:

About

Comprehensive correlation analysis of XAUUSD, BTCUSD, and major forex pairs using Python, statistical insights, and visualizations for financial analytics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published