Research icon indicating copy to clipboard operation
Research copied to clipboard

[WIP] Add Short USD risk parity trading algorithm for QuantConnect

Open Copilot opened this issue 3 months ago • 0 comments

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Create a Short USD Risk Parity trading algorithm for QuantConnect that:

  1. Trades 8 forex pairs (EURUSD, GBPUSD, AUDUSD, NZDUSD long; USDCAD, USDCHF, USDJPY, USDMXN short)
  2. Targets 20% portfolio volatility
  3. Sizes positions so each pair gets 2.5% of risk budget, divided by that pair's blended volatility
  4. Calculates blended vol as: 30% 2520-day rolling avg + 70% exponential weighted vol (alpha=0.06)
  5. Rebalances daily based on updated volatilities
  6. Long pairs increase USD exposure when they fall (shorting USD indirectly)
  7. Short pairs decrease USD exposure when they fall (shorting USD directly)

Output should show:

  • Total return, Sharpe ratio, max drawdown, annualized volatility (~54% = 20% target × 2.7x avg leverage)
  • Year-by-year progression
  • Final positions and notional exposure

The backtest should run from 2005-01-01 to present on daily data.

This pull request was created as a result of the following prompt from Copilot chat.

Create a Short USD Risk Parity trading algorithm for QuantConnect that:

  1. Trades 8 forex pairs (EURUSD, GBPUSD, AUDUSD, NZDUSD long; USDCAD, USDCHF, USDJPY, USDMXN short)
  2. Targets 20% portfolio volatility
  3. Sizes positions so each pair gets 2.5% of risk budget, divided by that pair's blended volatility
  4. Calculates blended vol as: 30% 2520-day rolling avg + 70% exponential weighted vol (alpha=0.06)
  5. Rebalances daily based on updated volatilities
  6. Long pairs increase USD exposure when they fall (shorting USD indirectly)
  7. Short pairs decrease USD exposure when they fall (shorting USD directly)

Output should show:

  • Total return, Sharpe ratio, max drawdown, annualized volatility (~54% = 20% target × 2.7x avg leverage)
  • Year-by-year progression
  • Final positions and notional exposure

The backtest should run from 2005-01-01 to present on daily data.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot avatar Nov 13 '25 23:11 Copilot