Skip to content

pythongiant/Wavelet-strategy-with-Gold

Repository files navigation

Wavelet Trading Strategy Backtester

A Python-based trading strategy that uses wavelet decomposition to analyze price trends and generate trading signals.

Overview

This project implements a trading strategy that:

  • Uses wavelet analysis to decompose price data into trend and cycle components
  • Backtests the strategy across multiple 30-day intervals
  • Generates performance metrics and visualizations
  • Performs Monte Carlo simulations using bootstrap resampling

Key Files

Requirements

backtesting
pandas
numpy
pywt
matplotlib
arch
empyrical
scipy

Usage

  1. Place your data files in the data/gold directory as CSV files with columns:

    • Volume
    • Date
    • Open
    • High
    • Low
    • Close
  2. Run the strategy:

python wavelet.py

Key Features

  • Wavelet decomposition of price data
  • Rolling 30-day interval backtesting
  • Performance metrics calculation including:
    • Returns
    • Sharpe ratio
    • Maximum drawdown
    • Win rate
    • SQN
    • Profit factor
  • Monte Carlo simulation with bootstrap resampling
  • Train/test period analysis
  • Risk metrics including VaR and CVaR

Output

The script generates:

  • Trading logs and performance metrics in CSV format
  • Performance visualization plots
  • Risk analysis and Monte Carlo simulation results
  • Train

About

Wavelet Based Gold/Metal trading Strategy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published