Research
Research copied to clipboard
[WIP] Add Short USD risk parity trading algorithm for QuantConnect
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:
- Trades 8 forex pairs (EURUSD, GBPUSD, AUDUSD, NZDUSD long; USDCAD, USDCHF, USDJPY, USDMXN short)
- Targets 20% portfolio volatility
- Sizes positions so each pair gets 2.5% of risk budget, divided by that pair's blended volatility
- Calculates blended vol as: 30% 2520-day rolling avg + 70% exponential weighted vol (alpha=0.06)
- Rebalances daily based on updated volatilities
- Long pairs increase USD exposure when they fall (shorting USD indirectly)
- 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:
- Trades 8 forex pairs (EURUSD, GBPUSD, AUDUSD, NZDUSD long; USDCAD, USDCHF, USDJPY, USDMXN short)
- Targets 20% portfolio volatility
- Sizes positions so each pair gets 2.5% of risk budget, divided by that pair's blended volatility
- Calculates blended vol as: 30% 2520-day rolling avg + 70% exponential weighted vol (alpha=0.06)
- Rebalances daily based on updated volatilities
- Long pairs increase USD exposure when they fall (shorting USD indirectly)
- 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.