Lib Backtesting Py

Single-asset bar-loop backtester with honest next-open fills, an AGPL-3.0 licence, and an indicator API that computes over the entire series before slicing. TRIGGER - from backtesting import Backtest, Strategy; pip install backtesting, bt = Backtest(df, MyStrategy), bt.run(), bt.optimize(), self.I(), self.buy(), self.sell(), self.data.Close, trade_on_close, exclusive_orders, finalize_trades, commission, spread, backtesting.lib crossover, _OutOfMoneyError, "kernc"; wanting a portfolio, a universe or a second instrument inside it. Memory is stale here: it is alive at 0.6.6 (2026-07-22), it is AGPL-3.0-or-later rather than MIT, and trade_on_close fills at data.Close[-2] rather than the current bar's close. SKIP for multi-asset or cross-sectional work and for engine choice generally (backtesting-engines). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill.

howard-lynn-ye 4cf021b 7.0 KB Updated

File contents

howard-lynn-ye/fin-skills/tree/main/fin_skills/_skills/lib-backtesting-py commit 4cf021bc1b

Frequently asked questions

npx skillmds@latest add howard-lynn-ye/lib-backtesting-py