Install any skill in seconds. Free to start, no credit card required.
Get Started Free →mkurman/backtrader
Python backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
Passed 20 of 22 test cases with the skill, and 19 of 22 without it.
1 fixed19 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
How do you feed historical pricing data into the main simulation engine instance?
| Checked | Without skill | With skill |
|---|---|---|
| Calls adddata on the cerebro instance | Missed | Passed |
The instructions your model reads when the skill loads.
Backtrader is a Python backtesting framework for trading strategies. Supports multiple data feeds, live trading, commission/slippage models, custom analyzers, and visualization. Well-suited for equity, futures, and crypto strategy development.
uv pip install backtrader
import backtrader as bt
class SmaCross(bt.Strategy):
params = dict(short=10, long=30)
def __init__(self):
sma_short = bt.ind.SMA(self.data.close, period=self.params.short)
sma_long = bt.ind.SMA(self.data.close, period=self.params.long)
self.crossover = bt.ind.CrossOver(sma_short, sma_long)
def next(self):
if self.crossover > 0:
self.buy()
elif self.crossover < 0:
self.sell()
cerebro = bt.Cerebro()
data = bt.feeds.YahooFinanceData(dataname="AAPL", fromdate="2022-01-01", todate="2023-01-01")
cerebro.adddata(data)
cerebro.addstrategy(SmaCross)
cerebro.broker.setcash(10000.0)
print(f"Final value: ${cerebro.run()[0]:.2f}")
cerebro.plot()
test cases passed, vs 19 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.