Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Runs event-driven backtests of trading strategies on minute or daily data, with pipeline factors and risk and performance analytics.
73% 77%+5 ptsof test cases passed
Passed 17 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
Not used yet
Zipline Reloaded is an event-driven backtesting engine (forked from Quantopian). Supports minute and daily data, custom factors, pipeline API, and built-in risk/performance analytics.
uv pip install zipline-reloaded
from zipline.api import order_target, symbol
from zipline import run_algorithm
def initialize(context):
context.asset = symbol("AAPL")
def handle_data(context, data):
price = data.current(context.asset, "price")
sma20 = data.history(context.asset, "price", 20, "1d").mean()
sma50 = data.history(context.asset, "price", 50, "1d").mean()
order_target(context.asset, 100 if sma20 > sma50 else 0)
results = run_algorithm(start=pd.Timestamp("2022-01-01"), end=pd.Timestamp("2023-01-01"),
initialize=initialize, handle_data=handle_data, capital_base=10000)
Next to this one in the catalogue, plus popular skills in the same category.