Lumibot Community Strategies

April 11, 2026 ยท View on GitHub

A collection of trading strategies for Lumibot. Browse, fork, backtest, and share your own.

Strategies

StrategyAsset ClassDescription
Stock Buy and HoldStocksSimple buy-and-hold with portfolio allocation
SMA CrossoverStocksClassic moving average crossover signal
Stock MomentumStocksMomentum rotation across a stock universe
Classic 60/40Stocks + BondsTraditional 60% stocks, 40% bonds with rebalancing
Crypto 50/50CryptoEqual-weight Bitcoin and Ethereum
Options StrangleOptionsShort strangle strategy for premium collection
Drift RebalancerMulti-AssetRebalance portfolio when drift exceeds threshold

Quick Start

pip install lumibot

# Run any strategy
python strategies/sma_crossover.py

How to Contribute

We welcome community strategies! To submit yours:

  1. Fork this repo
  2. Add your strategy to the strategies/ folder
  3. Include a docstring with:
    • Strategy description (1-2 sentences)
    • Asset class (stocks, options, crypto, futures, forex)
    • Required data source (Yahoo is free, or specify ThetaData/Polygon/etc.)
    • Expected behavior (what it buys/sells and why)
  4. Make sure it runs with python strategies/your_strategy.py
  5. Open a pull request

Strategy Template

"""
My Strategy Name

Asset class: Stocks
Data source: Yahoo Finance (free)
Description: Brief description of what this strategy does.
"""

from datetime import datetime
from lumibot.strategies import Strategy
from lumibot.backtesting import YahooDataBacktesting

class MyStrategy(Strategy):
    parameters = {}

    def initialize(self):
        self.sleeptime = "1D"

    def on_trading_iteration(self):
        # Your strategy logic here
        pass

if __name__ == "__main__":
    MyStrategy.backtest(
        YahooDataBacktesting,
        datetime(2023, 1, 1),
        datetime(2024, 1, 1),
    )

Resources

License

MIT