Community
Strategies
Introduction
The Strategies page contains algorithms shared by community members for you to learn from or use for your investing. QuantConnect backtests these strategies on behalf of the community each day, allowing you to see it it performs with out-of-sample data. You can add strategies to your own watchlist, clone them into your own projects, and contribute your own strategies to the community.
Leaderboard
The Leaderboard lists top performing strategies ranked by performance metrics.
We rank strategies by their returns over the last three months daily. The chart shows the equity curve of the 10 highest ranked strategies for the aforementioned period, and the table below displays the relevant metrics: the three-month return, the one-year Sharpe ratio, and the score.
The score is the Sharpe ratio over one year with a penalty for strategies with less than one year of out-of-sample data. The penalty is proportional to the fraction of the year they have been in-of-sample. For example, a strategy that has been in-of-sample for six months will have its Sharpe ratio halved to calculate its score. A strategy submitted for over a year will have no penalty applied, and its score matches its Sharpe ratio.
Submit your strategies to join the competition.
Submit Your Strategies
Follow these steps to submit a strategy for the Strategies page:
- Open the Strategies page.
- Click .
- In the Project field, select one of your projects.
- In the Backtest field, select one of the backtests of the selected project.
- In the Strategy Name field, change the generated name if needed.
- In the Strategy Description field, change the generated description if needed.
- In the Version Notes field, describe any changes or updates in this version.
- Click .
The Strategy Name and Strategy Description fields are generated by Mia.
Submission Guidelines
To keep community strategies reliable, readable, and easy to maintain, respect the following guidelines when submitting or updating strategies:
- The backtest must run without throwing buying power or runtime errors.
- The code should not have
try/exceptblocks. - If you use daily data and place a Scheduled Event to rebalance the portfolio, set the time rule to 8 AM.
- Use current QuantConnect LEAN APIs and patterns; avoid deprecated methods.
- Match scheduling cadence to data resolution (daily vs intraday vs monthly).
- The backtest period must be the last 5 years
self.set_start_date(self.end_date - timedelta(5*365))backtest period. - Follow PEP8-style readability with a maximum line length of 120 characters.
- Add a leading underscore to private class members.
- Keep total backtest runtime under 1 hour.
-
Use the default models.
Do not override models to artificially improve performance. For example:
- Do not override the transaction fees model to reduce/eliminate fees.
- Do not increase the leverage, see Buying power model.
- Do not disable Option assignments.
-
Strategies must not add or modify CashBook cash balances during a backtest (no cash deposits or withdrawals).
Initial capital must be set only via
self.set_cash()orself.set_account_currency(). - If the algorithm has regular rebalances (weekly, monthly, quarterly, etc), call your rebalance logic in on_warmup_finished so the start of the equity curve isn't flat.