Skip to content

Lumiwealth/lumibot-strategies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Lumibot Community Strategies

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

Strategies

Strategy Asset Class Description
Stock Buy and Hold Stocks Simple buy-and-hold with portfolio allocation
SMA Crossover Stocks Classic moving average crossover signal
Stock Momentum Stocks Momentum rotation across a stock universe
Classic 60/40 Stocks + Bonds Traditional 60% stocks, 40% bonds with rebalancing
Crypto 50/50 Crypto Equal-weight Bitcoin and Ethereum
Options Strangle Options Short strangle strategy for premium collection
Drift Rebalancer Multi-Asset Rebalance 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

About

Community-contributed trading strategies for Lumibot. Stocks, options, crypto, futures, forex. Fork, backtest, and share your strategies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages