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:

  1. Open the Strategies page.
  2. Click Publish Strategy.
  3. In the Project field, select one of your projects.
  4. In the Backtest field, select one of the backtests of the selected project.
  5. The Strategy Name and Strategy Description fields are generated by Mia.

  6. In the Strategy Name field, change the generated name if needed.
  7. In the Strategy Description field, change the generated description if needed.
  8. In the Version Notes field, describe any changes or updates in this version.
  9. Click Publish.

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/except blocks.
  • 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:
  • 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() or self.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.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: