Skip to content

Conversation

Copy link

Copilot AI commented Nov 13, 2025

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 AI self-assigned this Nov 13, 2025
Copilot stopped work on behalf of weazardofinance due to an error November 13, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant