{"id":"backtrader-engine","card_id":"card_backtrader_engine","name":"backtrader engine","description":"Runs a deterministic DATA ONLY TypeScript reimplementation of a narrow OSS backtrader 1.9.78.123 single-asset backtest engine over caller-supplied OHLCV bars and declarative strategy rules.","stage":1,"safety_level":"data_only_read_only","auth":{"type":"hmac-sha256","required_headers":["x-apex-tool-timestamp","x-apex-tool-nonce","x-apex-tool-content-sha256","x-apex-tool-signature"],"canonical_payload":"APEX-TOOL-V1\\n{tool_id}\\n{timestamp}\\n{nonce}\\n{sha256(canonical_json(body))}"},"permissionless":{"enabled":true,"tier":"bounded_public","rate_limit":"Shared 20 calls per IP per hour across all permissionless bounded tools.","review_required":false,"note":"First-run DATA ONLY tier: no HMAC required. The wrapper simulates over supplied bars only and never connects to brokers, exchanges, accounts, wallets, balances, or order routes."},"input_schema":{"type":"object","required":["initial_cash","bars","strategy"],"properties":{"initial_cash":{"type":"number"},"bars":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object"}},"strategy":{"type":"object"},"costs":{"type":"object"}}},"output_schema":{"type":"object","properties":{"schema":{"type":"string"},"output":{"type":"object","properties":{"trades":{"type":"array"},"equity_curve":{"type":"array"},"stats":{"type":"object"}}},"conventions":{"type":"object"}}},"sample_input":{"initial_cash":10000,"bars":[{"dt":"2026-01-01","open":100,"high":102,"low":99,"close":101,"volume":1000},{"dt":"2026-01-02","open":101,"high":103,"low":100,"close":102,"volume":1100},{"dt":"2026-01-03","open":102,"high":106,"low":101,"close":105,"volume":1200}],"strategy":{"entry":{"type":"price_threshold","op":">","threshold":100},"sizing":{"type":"fixed_fraction_sizing","fraction":0.5}},"costs":{"commission":0,"slippage":0}},"test_vectors":[{"input":{"vector_id":"sma_cross_basic","bars":[{"close":10,"dt":"2026-01-01","high":11,"low":9,"open":10,"volume":1000},{"close":10,"dt":"2026-01-02","high":11,"low":9,"open":10,"volume":1001},{"close":10,"dt":"2026-01-03","high":11,"low":9,"open":10,"volume":1002},{"close":11,"dt":"2026-01-04","high":12,"low":9,"open":10,"volume":1003},{"close":12,"dt":"2026-01-05","high":13,"low":10,"open":11,"volume":1004},{"close":13,"dt":"2026-01-06","high":14,"low":11,"open":12,"volume":1005},{"close":14,"dt":"2026-01-07","high":15,"low":12,"open":13,"volume":1006}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"direction":"above","fast":2,"slow":3,"type":"sma_cross"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10000},{"bar":3,"dt":"2026-01-04","equity":10000},{"bar":4,"dt":"2026-01-05","equity":10449.006000000001},{"bar":5,"dt":"2026-01-06","equity":10903.006000000001},{"bar":6,"dt":"2026-01-07","equity":11357.006000000001}],"stats":{"max_drawdown":0,"sharpe":14.477663843301974,"total_return":0.13570060000000006,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"ema_cross_basic","bars":[{"close":10,"dt":"2026-01-01","high":11,"low":9,"open":10,"volume":1000},{"close":9,"dt":"2026-01-02","high":11,"low":8,"open":10,"volume":1001},{"close":8,"dt":"2026-01-03","high":10,"low":7,"open":9,"volume":1002},{"close":9,"dt":"2026-01-04","high":10,"low":7,"open":8,"volume":1003},{"close":10,"dt":"2026-01-05","high":11,"low":8,"open":9,"volume":1004},{"close":11,"dt":"2026-01-06","high":12,"low":9,"open":10,"volume":1005},{"close":12,"dt":"2026-01-07","high":13,"low":10,"open":11,"volume":1006},{"close":13,"dt":"2026-01-08","high":14,"low":11,"open":12,"volume":1007}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"direction":"above","fast":2,"slow":4,"type":"ema_cross"},"sizing":{"fraction":0.4,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10000},{"bar":3,"dt":"2026-01-04","equity":10000},{"bar":4,"dt":"2026-01-05","equity":10000},{"bar":5,"dt":"2026-01-06","equity":10395.01},{"bar":6,"dt":"2026-01-07","equity":10794.01},{"bar":7,"dt":"2026-01-08","equity":11193.01}],"stats":{"max_drawdown":0,"sharpe":12.719746108422925,"total_return":0.1193010000000001,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"price_threshold_long","bars":[{"close":10,"dt":"2026-01-01","high":11,"low":9,"open":10,"volume":1000},{"close":11,"dt":"2026-01-02","high":12,"low":9,"open":10,"volume":1001},{"close":12,"dt":"2026-01-03","high":13,"low":10,"open":11,"volume":1002},{"close":13,"dt":"2026-01-04","high":14,"low":11,"open":12,"volume":1003}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":11,"type":"price_threshold"},"sizing":{"fraction":0.25,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10000},{"bar":3,"dt":"2026-01-04","equity":10205.504}],"stats":{"max_drawdown":0,"sharpe":9.16515138991168,"total_return":0.02055040000000008,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"no_signal","bars":[{"close":10,"dt":"2026-01-01","high":11,"low":9,"open":10,"volume":1000},{"close":9,"dt":"2026-01-02","high":11,"low":8,"open":10,"volume":1001},{"close":8,"dt":"2026-01-03","high":10,"low":7,"open":9,"volume":1002},{"close":7,"dt":"2026-01-04","high":9,"low":6,"open":8,"volume":1003}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":20,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10000},{"bar":3,"dt":"2026-01-04","equity":10000}],"stats":{"max_drawdown":0,"sharpe":0,"total_return":0,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"single_bar","bars":[{"close":10,"dt":"2026-01-01","high":11,"low":9,"open":10,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":5,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000}],"stats":{"max_drawdown":0,"sharpe":0,"total_return":0,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"gap_up_entry","bars":[{"close":10,"dt":"2026-02-01","high":11,"low":9,"open":10,"volume":1000},{"close":12,"dt":"2026-02-02","high":12,"low":9,"open":10,"volume":1000},{"close":20,"dt":"2026-02-03","high":21,"low":19,"open":20,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":11,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-02-01","equity":10000},{"bar":1,"dt":"2026-02-02","equity":10000},{"bar":2,"dt":"2026-02-03","equity":9995.02}],"stats":{"max_drawdown":-0.0004979999999999984,"sharpe":-11.224972160321826,"total_return":-0.0004979999999999984,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"gap_down_entry","bars":[{"close":20,"dt":"2026-02-04","high":21,"low":19,"open":20,"volume":1000},{"close":23,"dt":"2026-02-05","high":23,"low":19,"open":20,"volume":1000},{"close":12,"dt":"2026-02-06","high":13,"low":11,"open":12,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":22,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-02-04","equity":10000},{"bar":1,"dt":"2026-02-05","equity":10000},{"bar":2,"dt":"2026-02-06","equity":9995.008}],"stats":{"max_drawdown":-0.000499200000000033,"sharpe":-11.224972160321824,"total_return":-0.000499200000000033,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"take_profit_hit","bars":[{"close":100,"dt":"2026-03-01","high":101,"low":99,"open":100,"volume":1000},{"close":102,"dt":"2026-03-02","high":102,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-03-03","high":104,"low":101,"open":102,"volume":1000},{"close":108,"dt":"2026-03-04","high":110,"low":102,"open":103,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":101,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"},"take_profit":{"pct":0.05,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-03-01","equity":10000},{"bar":1,"dt":"2026-03-02","equity":10000},{"bar":2,"dt":"2026-03-03","equity":10043.104},{"bar":3,"dt":"2026-03-04","equity":10234.763200000001}],"stats":{"max_drawdown":0,"sharpe":12.3685170662511,"total_return":0.023476320000000106,"trade_count":1,"win_rate":1},"trades":[{"commission":10.0368,"entry_bar":2,"entry_dt":"2026-03-03","entry_price":102,"exit_bar":3,"exit_dt":"2026-03-04","exit_price":107.10000000000001,"gross_pnl":244.8000000000004,"id":0,"pnl":234.7632000000004,"quantity":48}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"stop_loss_hit","bars":[{"close":100,"dt":"2026-03-05","high":101,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-03-06","high":103,"low":99,"open":100,"volume":1000},{"close":102,"dt":"2026-03-07","high":104,"low":101,"open":103,"volume":1000},{"close":92,"dt":"2026-03-08","high":103,"low":90,"open":102,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"},"stop_loss":{"pct":0.05,"type":"stop_loss"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-03-05","equity":10000},{"bar":1,"dt":"2026-03-06","equity":10000},{"bar":2,"dt":"2026-03-07","equity":9947.056},{"bar":3,"dt":"2026-03-08","equity":9743.1592}],"stats":{"max_drawdown":-0.025684079999999998,"sharpe":-12.826228525729654,"total_return":-0.025684079999999998,"trade_count":1,"win_rate":0},"trades":[{"commission":9.640799999999999,"entry_bar":2,"entry_dt":"2026-03-07","entry_price":103,"exit_bar":3,"exit_dt":"2026-03-08","exit_price":97.84999999999998,"gross_pnl":-247.20000000000095,"id":0,"pnl":-256.84080000000097,"quantity":48}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"stop_and_tp_same_bar","bars":[{"close":100,"dt":"2026-03-09","high":101,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-03-10","high":103,"low":99,"open":100,"volume":1000},{"close":102,"dt":"2026-03-11","high":104,"low":101,"open":103,"volume":1000},{"close":100,"dt":"2026-03-12","high":110,"low":90,"open":102,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"},"stop_loss":{"pct":0.05,"type":"stop_loss"},"take_profit":{"pct":0.05,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-03-09","equity":10000},{"bar":1,"dt":"2026-03-10","equity":10000},{"bar":2,"dt":"2026-03-11","equity":9947.056},{"bar":3,"dt":"2026-03-12","equity":9743.1592}],"stats":{"max_drawdown":-0.025684079999999998,"sharpe":-12.826228525729654,"total_return":-0.025684079999999998,"trade_count":1,"win_rate":0},"trades":[{"commission":9.640799999999999,"entry_bar":2,"entry_dt":"2026-03-11","entry_price":103,"exit_bar":3,"exit_dt":"2026-03-12","exit_price":97.84999999999998,"gross_pnl":-247.20000000000095,"id":0,"pnl":-256.84080000000097,"quantity":48}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"insufficient_cash","bars":[{"close":100,"dt":"2026-01-01","high":101,"low":99,"open":100,"volume":1000},{"close":101,"dt":"2026-01-02","high":102,"low":99,"open":100,"volume":1001},{"close":102,"dt":"2026-01-03","high":103,"low":100,"open":101,"volume":1002}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":100,"type":"price_threshold"},"sizing":{"fraction":0.00001,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10000}],"stats":{"max_drawdown":0,"sharpe":0,"total_return":0,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"with_slippage","bars":[{"close":50,"dt":"2026-01-01","high":51,"low":49,"open":50,"volume":1000},{"close":55,"dt":"2026-01-02","high":56,"low":49,"open":50,"volume":1001},{"close":60,"dt":"2026-01-03","high":61,"low":54,"open":55,"volume":1002},{"close":65,"dt":"2026-01-04","high":66,"low":59,"open":60,"volume":1003}],"costs":{"commission":0.001,"slippage":0.002},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":54,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-01-01","equity":10000},{"bar":1,"dt":"2026-01-02","equity":10000},{"bar":2,"dt":"2026-01-03","equity":10435.1401},{"bar":3,"dt":"2026-01-04","equity":10885.1401}],"stats":{"max_drawdown":0,"sharpe":18.329744254416507,"total_return":0.08851401000000014,"trade_count":0,"win_rate":0},"trades":[]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"multi_trade_three_cycles","bars":[{"close":100,"dt":"2026-04-01","high":101,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-02","high":103,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-03","high":104,"low":102,"open":103,"volume":1000},{"close":106,"dt":"2026-04-04","high":108,"low":102,"open":103,"volume":1000},{"close":106,"dt":"2026-04-05","high":107,"low":105,"open":106,"volume":1000},{"close":109,"dt":"2026-04-06","high":112,"low":105,"open":106,"volume":1000},{"close":109,"dt":"2026-04-07","high":110,"low":108,"open":109,"volume":1000},{"close":112,"dt":"2026-04-08","high":116,"low":108,"open":109,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.35,"type":"fixed_fraction_sizing"},"take_profit":{"pct":0.03,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-04-01","equity":10000},{"bar":1,"dt":"2026-04-02","equity":10000},{"bar":2,"dt":"2026-04-03","equity":9996.600999999999},{"bar":3,"dt":"2026-04-04","equity":10095.07003},{"bar":4,"dt":"2026-04-05","equity":10091.572030000001},{"bar":5,"dt":"2026-04-06","equity":10192.909090000001},{"bar":6,"dt":"2026-04-07","equity":10189.42109},{"bar":7,"dt":"2026-04-08","equity":10290.46845}],"stats":{"max_drawdown":-0.00034650576861816607,"sharpe":11.975116201614386,"total_return":0.0290468450000001,"trade_count":3,"win_rate":1},"trades":[{"commission":6.89997,"entry_bar":2,"entry_dt":"2026-04-03","entry_price":103,"exit_bar":3,"exit_dt":"2026-04-04","exit_price":106.09,"gross_pnl":101.97000000000011,"id":0,"pnl":95.07003000000012,"quantity":33},{"commission":7.1009400000000005,"entry_bar":4,"entry_dt":"2026-04-05","entry_price":106,"exit_bar":5,"exit_dt":"2026-04-06","exit_price":109.18,"gross_pnl":104.94000000000023,"id":1,"pnl":97.83906000000023,"quantity":33},{"commission":7.08064,"entry_bar":6,"entry_dt":"2026-04-07","entry_price":109,"exit_bar":7,"exit_dt":"2026-04-08","exit_price":112.27,"gross_pnl":104.63999999999987,"id":2,"pnl":97.55935999999987,"quantity":32}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"long_120_bars_costs_slippage","bars":[{"close":99,"dt":"2026-05-01","high":101,"low":98,"open":100,"volume":2000},{"close":103,"dt":"2026-05-02","high":104,"low":98,"open":99,"volume":2001},{"close":103,"dt":"2026-05-03","high":104,"low":102,"open":103,"volume":2002},{"close":106,"dt":"2026-05-04","high":110,"low":102,"open":103,"volume":2003},{"close":99,"dt":"2026-05-05","high":107,"low":98,"open":106,"volume":2004},{"close":98,"dt":"2026-05-06","high":100,"low":97,"open":99,"volume":2005},{"close":99,"dt":"2026-05-07","high":100,"low":97,"open":98,"volume":2006},{"close":103,"dt":"2026-05-08","high":104,"low":98,"open":99,"volume":2007},{"close":103,"dt":"2026-05-09","high":104,"low":102,"open":103,"volume":2008},{"close":106,"dt":"2026-05-10","high":110,"low":102,"open":103,"volume":2009},{"close":99,"dt":"2026-05-11","high":107,"low":98,"open":106,"volume":2010},{"close":98,"dt":"2026-05-12","high":100,"low":97,"open":99,"volume":2011},{"close":99,"dt":"2026-05-13","high":100,"low":97,"open":98,"volume":2012},{"close":103,"dt":"2026-05-14","high":104,"low":98,"open":99,"volume":2013},{"close":103,"dt":"2026-05-15","high":104,"low":102,"open":103,"volume":2014},{"close":106,"dt":"2026-05-16","high":110,"low":102,"open":103,"volume":2015},{"close":99,"dt":"2026-05-17","high":107,"low":98,"open":106,"volume":2016},{"close":98,"dt":"2026-05-18","high":100,"low":97,"open":99,"volume":2017},{"close":99,"dt":"2026-05-19","high":100,"low":97,"open":98,"volume":2018},{"close":103,"dt":"2026-05-20","high":104,"low":98,"open":99,"volume":2019},{"close":103,"dt":"2026-05-21","high":104,"low":102,"open":103,"volume":2020},{"close":106,"dt":"2026-05-22","high":110,"low":102,"open":103,"volume":2021},{"close":99,"dt":"2026-05-23","high":107,"low":98,"open":106,"volume":2022},{"close":98,"dt":"2026-05-24","high":100,"low":97,"open":99,"volume":2023},{"close":99,"dt":"2026-05-25","high":100,"low":97,"open":98,"volume":2024},{"close":103,"dt":"2026-05-26","high":104,"low":98,"open":99,"volume":2025},{"close":103,"dt":"2026-05-27","high":104,"low":102,"open":103,"volume":2026},{"close":106,"dt":"2026-05-28","high":110,"low":102,"open":103,"volume":2027},{"close":99,"dt":"2026-05-29","high":107,"low":98,"open":106,"volume":2028},{"close":98,"dt":"2026-05-30","high":100,"low":97,"open":99,"volume":2029},{"close":99,"dt":"2026-05-31","high":100,"low":97,"open":98,"volume":2030},{"close":103,"dt":"2026-06-01","high":104,"low":98,"open":99,"volume":2031},{"close":103,"dt":"2026-06-02","high":104,"low":102,"open":103,"volume":2032},{"close":106,"dt":"2026-06-03","high":110,"low":102,"open":103,"volume":2033},{"close":99,"dt":"2026-06-04","high":107,"low":98,"open":106,"volume":2034},{"close":98,"dt":"2026-06-05","high":100,"low":97,"open":99,"volume":2035},{"close":99,"dt":"2026-06-06","high":100,"low":97,"open":98,"volume":2036},{"close":103,"dt":"2026-06-07","high":104,"low":98,"open":99,"volume":2037},{"close":103,"dt":"2026-06-08","high":104,"low":102,"open":103,"volume":2038},{"close":106,"dt":"2026-06-09","high":110,"low":102,"open":103,"volume":2039},{"close":99,"dt":"2026-06-10","high":107,"low":98,"open":106,"volume":2040},{"close":98,"dt":"2026-06-11","high":100,"low":97,"open":99,"volume":2041},{"close":99,"dt":"2026-06-12","high":100,"low":97,"open":98,"volume":2042},{"close":103,"dt":"2026-06-13","high":104,"low":98,"open":99,"volume":2043},{"close":103,"dt":"2026-06-14","high":104,"low":102,"open":103,"volume":2044},{"close":106,"dt":"2026-06-15","high":110,"low":102,"open":103,"volume":2045},{"close":99,"dt":"2026-06-16","high":107,"low":98,"open":106,"volume":2046},{"close":98,"dt":"2026-06-17","high":100,"low":97,"open":99,"volume":2047},{"close":99,"dt":"2026-06-18","high":100,"low":97,"open":98,"volume":2048},{"close":103,"dt":"2026-06-19","high":104,"low":98,"open":99,"volume":2049},{"close":103,"dt":"2026-06-20","high":104,"low":102,"open":103,"volume":2050},{"close":106,"dt":"2026-06-21","high":110,"low":102,"open":103,"volume":2051},{"close":99,"dt":"2026-06-22","high":107,"low":98,"open":106,"volume":2052},{"close":98,"dt":"2026-06-23","high":100,"low":97,"open":99,"volume":2053},{"close":99,"dt":"2026-06-24","high":100,"low":97,"open":98,"volume":2054},{"close":103,"dt":"2026-06-25","high":104,"low":98,"open":99,"volume":2055},{"close":103,"dt":"2026-06-26","high":104,"low":102,"open":103,"volume":2056},{"close":106,"dt":"2026-06-27","high":110,"low":102,"open":103,"volume":2057},{"close":99,"dt":"2026-06-28","high":107,"low":98,"open":106,"volume":2058},{"close":98,"dt":"2026-06-29","high":100,"low":97,"open":99,"volume":2059},{"close":99,"dt":"2026-06-30","high":100,"low":97,"open":98,"volume":2060},{"close":103,"dt":"2026-07-01","high":104,"low":98,"open":99,"volume":2061},{"close":103,"dt":"2026-07-02","high":104,"low":102,"open":103,"volume":2062},{"close":106,"dt":"2026-07-03","high":110,"low":102,"open":103,"volume":2063},{"close":99,"dt":"2026-07-04","high":107,"low":98,"open":106,"volume":2064},{"close":98,"dt":"2026-07-05","high":100,"low":97,"open":99,"volume":2065},{"close":99,"dt":"2026-07-06","high":100,"low":97,"open":98,"volume":2066},{"close":103,"dt":"2026-07-07","high":104,"low":98,"open":99,"volume":2067},{"close":103,"dt":"2026-07-08","high":104,"low":102,"open":103,"volume":2068},{"close":106,"dt":"2026-07-09","high":110,"low":102,"open":103,"volume":2069},{"close":99,"dt":"2026-07-10","high":107,"low":98,"open":106,"volume":2070},{"close":98,"dt":"2026-07-11","high":100,"low":97,"open":99,"volume":2071},{"close":99,"dt":"2026-07-12","high":100,"low":97,"open":98,"volume":2072},{"close":103,"dt":"2026-07-13","high":104,"low":98,"open":99,"volume":2073},{"close":103,"dt":"2026-07-14","high":104,"low":102,"open":103,"volume":2074},{"close":106,"dt":"2026-07-15","high":110,"low":102,"open":103,"volume":2075},{"close":99,"dt":"2026-07-16","high":107,"low":98,"open":106,"volume":2076},{"close":98,"dt":"2026-07-17","high":100,"low":97,"open":99,"volume":2077},{"close":99,"dt":"2026-07-18","high":100,"low":97,"open":98,"volume":2078},{"close":103,"dt":"2026-07-19","high":104,"low":98,"open":99,"volume":2079},{"close":103,"dt":"2026-07-20","high":104,"low":102,"open":103,"volume":2080},{"close":106,"dt":"2026-07-21","high":110,"low":102,"open":103,"volume":2081},{"close":99,"dt":"2026-07-22","high":107,"low":98,"open":106,"volume":2082},{"close":98,"dt":"2026-07-23","high":100,"low":97,"open":99,"volume":2083},{"close":99,"dt":"2026-07-24","high":100,"low":97,"open":98,"volume":2084},{"close":103,"dt":"2026-07-25","high":104,"low":98,"open":99,"volume":2085},{"close":103,"dt":"2026-07-26","high":104,"low":102,"open":103,"volume":2086},{"close":106,"dt":"2026-07-27","high":110,"low":102,"open":103,"volume":2087},{"close":99,"dt":"2026-07-28","high":107,"low":98,"open":106,"volume":2088},{"close":98,"dt":"2026-07-29","high":100,"low":97,"open":99,"volume":2089},{"close":99,"dt":"2026-07-30","high":100,"low":97,"open":98,"volume":2090},{"close":103,"dt":"2026-07-31","high":104,"low":98,"open":99,"volume":2091},{"close":103,"dt":"2026-08-01","high":104,"low":102,"open":103,"volume":2092},{"close":106,"dt":"2026-08-02","high":110,"low":102,"open":103,"volume":2093},{"close":99,"dt":"2026-08-03","high":107,"low":98,"open":106,"volume":2094},{"close":98,"dt":"2026-08-04","high":100,"low":97,"open":99,"volume":2095},{"close":99,"dt":"2026-08-05","high":100,"low":97,"open":98,"volume":2096},{"close":103,"dt":"2026-08-06","high":104,"low":98,"open":99,"volume":2097},{"close":103,"dt":"2026-08-07","high":104,"low":102,"open":103,"volume":2098},{"close":106,"dt":"2026-08-08","high":110,"low":102,"open":103,"volume":2099},{"close":99,"dt":"2026-08-09","high":107,"low":98,"open":106,"volume":2100},{"close":98,"dt":"2026-08-10","high":100,"low":97,"open":99,"volume":2101},{"close":99,"dt":"2026-08-11","high":100,"low":97,"open":98,"volume":2102},{"close":103,"dt":"2026-08-12","high":104,"low":98,"open":99,"volume":2103},{"close":103,"dt":"2026-08-13","high":104,"low":102,"open":103,"volume":2104},{"close":106,"dt":"2026-08-14","high":110,"low":102,"open":103,"volume":2105},{"close":99,"dt":"2026-08-15","high":107,"low":98,"open":106,"volume":2106},{"close":98,"dt":"2026-08-16","high":100,"low":97,"open":99,"volume":2107},{"close":99,"dt":"2026-08-17","high":100,"low":97,"open":98,"volume":2108},{"close":103,"dt":"2026-08-18","high":104,"low":98,"open":99,"volume":2109},{"close":103,"dt":"2026-08-19","high":104,"low":102,"open":103,"volume":2110},{"close":106,"dt":"2026-08-20","high":110,"low":102,"open":103,"volume":2111},{"close":99,"dt":"2026-08-21","high":107,"low":98,"open":106,"volume":2112},{"close":98,"dt":"2026-08-22","high":100,"low":97,"open":99,"volume":2113},{"close":99,"dt":"2026-08-23","high":100,"low":97,"open":98,"volume":2114},{"close":103,"dt":"2026-08-24","high":104,"low":98,"open":99,"volume":2115},{"close":103,"dt":"2026-08-25","high":104,"low":102,"open":103,"volume":2116},{"close":106,"dt":"2026-08-26","high":110,"low":102,"open":103,"volume":2117},{"close":99,"dt":"2026-08-27","high":107,"low":98,"open":106,"volume":2118},{"close":98,"dt":"2026-08-28","high":100,"low":97,"open":99,"volume":2119}],"costs":{"commission":0.0015,"slippage":0.001},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.4,"type":"fixed_fraction_sizing"},"take_profit":{"pct":0.025,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-05-01","equity":10000},{"bar":1,"dt":"2026-05-02","equity":10000},{"bar":2,"dt":"2026-05-03","equity":9990.209128999999},{"bar":3,"dt":"2026-05-04","equity":10086.047186225},{"bar":4,"dt":"2026-05-05","equity":9817.236303225},{"bar":5,"dt":"2026-05-06","equity":9780.236303225},{"bar":6,"dt":"2026-05-07","equity":9817.236303225},{"bar":7,"dt":"2026-05-08","equity":9965.236303225},{"bar":8,"dt":"2026-05-09","equity":9965.236303225},{"bar":9,"dt":"2026-05-10","equity":10172.27024815},{"bar":10,"dt":"2026-05-11","equity":9896.19420615},{"bar":11,"dt":"2026-05-12","equity":9858.19420615},{"bar":12,"dt":"2026-05-13","equity":9896.19420615},{"bar":13,"dt":"2026-05-14","equity":10048.19420615},{"bar":14,"dt":"2026-05-15","equity":10048.19420615},{"bar":15,"dt":"2026-05-16","equity":10260.8236631},{"bar":16,"dt":"2026-05-17","equity":9984.7476211},{"bar":17,"dt":"2026-05-18","equity":9946.7476211},{"bar":18,"dt":"2026-05-19","equity":9984.7476211},{"bar":19,"dt":"2026-05-20","equity":10136.7476211},{"bar":20,"dt":"2026-05-21","equity":10136.7476211},{"bar":21,"dt":"2026-05-22","equity":10349.37707805},{"bar":22,"dt":"2026-05-23","equity":10073.30103605},{"bar":23,"dt":"2026-05-24","equity":10035.30103605},{"bar":24,"dt":"2026-05-25","equity":10073.30103605},{"bar":25,"dt":"2026-05-26","equity":10225.30103605},{"bar":26,"dt":"2026-05-27","equity":10225.30103605},{"bar":27,"dt":"2026-05-28","equity":10437.930493},{"bar":28,"dt":"2026-05-29","equity":10154.589292},{"bar":29,"dt":"2026-05-30","equity":10115.589292},{"bar":30,"dt":"2026-05-31","equity":10154.589292},{"bar":31,"dt":"2026-06-01","equity":10310.589292},{"bar":32,"dt":"2026-06-02","equity":10310.589292},{"bar":33,"dt":"2026-06-03","equity":10528.814260975},{"bar":34,"dt":"2026-06-04","equity":10245.473059975},{"bar":35,"dt":"2026-06-05","equity":10206.473059975},{"bar":36,"dt":"2026-06-06","equity":10245.473059975},{"bar":37,"dt":"2026-06-07","equity":10401.473059975},{"bar":38,"dt":"2026-06-08","equity":10401.473059975},{"bar":39,"dt":"2026-06-09","equity":10619.698028949999},{"bar":40,"dt":"2026-06-10","equity":10336.35682795},{"bar":41,"dt":"2026-06-11","equity":10297.35682795},{"bar":42,"dt":"2026-06-12","equity":10336.35682795},{"bar":43,"dt":"2026-06-13","equity":10492.35682795},{"bar":44,"dt":"2026-06-14","equity":10492.35682795},{"bar":45,"dt":"2026-06-15","equity":10710.581796924998},{"bar":46,"dt":"2026-06-16","equity":10419.975436924999},{"bar":47,"dt":"2026-06-17","equity":10379.975436924999},{"bar":48,"dt":"2026-06-18","equity":10419.975436924999},{"bar":49,"dt":"2026-06-19","equity":10579.975436924999},{"bar":50,"dt":"2026-06-20","equity":10579.975436924999},{"bar":51,"dt":"2026-06-21","equity":10803.795917924997},{"bar":52,"dt":"2026-06-22","equity":10513.189557924998},{"bar":53,"dt":"2026-06-23","equity":10473.189557924998},{"bar":54,"dt":"2026-06-24","equity":10513.189557924998},{"bar":55,"dt":"2026-06-25","equity":10673.189557924998},{"bar":56,"dt":"2026-06-26","equity":10673.189557924998},{"bar":57,"dt":"2026-06-27","equity":10897.010038924996},{"bar":58,"dt":"2026-06-28","equity":10599.138519924996},{"bar":59,"dt":"2026-06-29","equity":10558.138519924996},{"bar":60,"dt":"2026-06-30","equity":10599.138519924996},{"bar":61,"dt":"2026-07-01","equity":10763.138519924996},{"bar":62,"dt":"2026-07-02","equity":10763.138519924996},{"bar":63,"dt":"2026-07-03","equity":10992.554512949997},{"bar":64,"dt":"2026-07-04","equity":10694.682993949998},{"bar":65,"dt":"2026-07-05","equity":10653.682993949998},{"bar":66,"dt":"2026-07-06","equity":10694.682993949998},{"bar":67,"dt":"2026-07-07","equity":10858.682993949998},{"bar":68,"dt":"2026-07-08","equity":10858.682993949998},{"bar":69,"dt":"2026-07-09","equity":11088.098986974996},{"bar":70,"dt":"2026-07-10","equity":10790.227467974997},{"bar":71,"dt":"2026-07-11","equity":10749.227467974997},{"bar":72,"dt":"2026-07-12","equity":10790.227467974997},{"bar":73,"dt":"2026-07-13","equity":10954.227467974997},{"bar":74,"dt":"2026-07-14","equity":10954.227467974997},{"bar":75,"dt":"2026-07-15","equity":11183.643460999994},{"bar":76,"dt":"2026-07-16","equity":10878.506782999995},{"bar":77,"dt":"2026-07-17","equity":10836.506782999995},{"bar":78,"dt":"2026-07-18","equity":10878.506782999995},{"bar":79,"dt":"2026-07-19","equity":11046.506782999995},{"bar":80,"dt":"2026-07-20","equity":11046.506782999995},{"bar":81,"dt":"2026-07-21","equity":11281.518288049994},{"bar":82,"dt":"2026-07-22","equity":10976.381610049995},{"bar":83,"dt":"2026-07-23","equity":10934.381610049995},{"bar":84,"dt":"2026-07-24","equity":10976.381610049995},{"bar":85,"dt":"2026-07-25","equity":11144.381610049995},{"bar":86,"dt":"2026-07-26","equity":11144.381610049995},{"bar":87,"dt":"2026-07-27","equity":11379.393115099994},{"bar":88,"dt":"2026-07-28","equity":11074.256437099995},{"bar":89,"dt":"2026-07-29","equity":11032.256437099995},{"bar":90,"dt":"2026-07-30","equity":11074.256437099995},{"bar":91,"dt":"2026-07-31","equity":11242.256437099995},{"bar":92,"dt":"2026-08-01","equity":11242.256437099995},{"bar":93,"dt":"2026-08-02","equity":11477.267942149994},{"bar":94,"dt":"2026-08-03","equity":11164.866105149995},{"bar":95,"dt":"2026-08-04","equity":11121.866105149995},{"bar":96,"dt":"2026-08-05","equity":11164.866105149995},{"bar":97,"dt":"2026-08-06","equity":11336.866105149995},{"bar":98,"dt":"2026-08-07","equity":11336.866105149995},{"bar":99,"dt":"2026-08-08","equity":11577.473122224994},{"bar":100,"dt":"2026-08-09","equity":11265.071285224993},{"bar":101,"dt":"2026-08-10","equity":11222.071285224993},{"bar":102,"dt":"2026-08-11","equity":11265.071285224993},{"bar":103,"dt":"2026-08-12","equity":11437.071285224993},{"bar":104,"dt":"2026-08-13","equity":11437.071285224993},{"bar":105,"dt":"2026-08-14","equity":11677.678302299993},{"bar":106,"dt":"2026-08-15","equity":11365.276465299994},{"bar":107,"dt":"2026-08-16","equity":11322.276465299994},{"bar":108,"dt":"2026-08-17","equity":11365.276465299994},{"bar":109,"dt":"2026-08-18","equity":11537.276465299994},{"bar":110,"dt":"2026-08-19","equity":11537.276465299994},{"bar":111,"dt":"2026-08-20","equity":11777.883482374993},{"bar":112,"dt":"2026-08-21","equity":11458.216486374993},{"bar":113,"dt":"2026-08-22","equity":11414.216486374993},{"bar":114,"dt":"2026-08-23","equity":11458.216486374993},{"bar":115,"dt":"2026-08-24","equity":11634.216486374993},{"bar":116,"dt":"2026-08-25","equity":11634.216486374993},{"bar":117,"dt":"2026-08-26","equity":11880.419015474994},{"bar":118,"dt":"2026-08-27","equity":11560.752019474994},{"bar":119,"dt":"2026-08-28","equity":11516.752019474994}],"stats":{"max_drawdown":-0.031097660531606786,"sharpe":1.3483233668164218,"total_return":0.1516752019474994,"trade_count":20,"win_rate":1},"trades":[{"commission":11.900663774999998,"entry_bar":2,"entry_dt":"2026-05-03","entry_price":103.103,"exit_bar":3,"exit_dt":"2026-05-04","exit_price":105.68057499999999,"gross_pnl":97.94784999999985,"id":0,"pnl":86.04718622499985,"quantity":38},{"commission":11.924988074999998,"entry_bar":4,"entry_dt":"2026-05-05","entry_price":106.106,"exit_bar":9,"exit_dt":"2026-05-10","exit_price":108.75864999999999,"gross_pnl":98.14804999999978,"id":1,"pnl":86.22306192499978,"quantity":37},{"commission":12.247285049999999,"entry_bar":10,"entry_dt":"2026-05-11","entry_price":106.106,"exit_bar":15,"exit_dt":"2026-05-16","exit_price":108.75865,"gross_pnl":100.80070000000032,"id":2,"pnl":88.55341495000032,"quantity":38},{"commission":12.247285049999999,"entry_bar":16,"entry_dt":"2026-05-17","entry_price":106.106,"exit_bar":21,"exit_dt":"2026-05-22","exit_price":108.75865,"gross_pnl":100.80070000000032,"id":3,"pnl":88.55341495000032,"quantity":38},{"commission":12.247285049999999,"entry_bar":22,"entry_dt":"2026-05-23","entry_price":106.106,"exit_bar":27,"exit_dt":"2026-05-28","exit_price":108.75865,"gross_pnl":100.80070000000032,"id":4,"pnl":88.55341495000032,"quantity":38},{"commission":12.569582024999999,"entry_bar":28,"entry_dt":"2026-05-29","entry_price":106.106,"exit_bar":33,"exit_dt":"2026-06-03","exit_price":108.75864999999999,"gross_pnl":103.45334999999977,"id":5,"pnl":90.88376797499977,"quantity":39},{"commission":12.569582024999999,"entry_bar":34,"entry_dt":"2026-06-04","entry_price":106.106,"exit_bar":39,"exit_dt":"2026-06-09","exit_price":108.75864999999999,"gross_pnl":103.45334999999977,"id":6,"pnl":90.88376797499977,"quantity":39},{"commission":12.569582024999999,"entry_bar":40,"entry_dt":"2026-06-10","entry_price":106.106,"exit_bar":45,"exit_dt":"2026-06-15","exit_price":108.75864999999999,"gross_pnl":103.45334999999977,"id":7,"pnl":90.88376797499977,"quantity":39},{"commission":12.891879,"entry_bar":46,"entry_dt":"2026-06-16","entry_price":106.106,"exit_bar":51,"exit_dt":"2026-06-21","exit_price":108.75864999999999,"gross_pnl":106.10599999999977,"id":8,"pnl":93.21412099999976,"quantity":40},{"commission":12.891879,"entry_bar":52,"entry_dt":"2026-06-22","entry_price":106.106,"exit_bar":57,"exit_dt":"2026-06-27","exit_price":108.75864999999999,"gross_pnl":106.10599999999977,"id":9,"pnl":93.21412099999976,"quantity":40},{"commission":13.214175974999998,"entry_bar":58,"entry_dt":"2026-06-28","entry_price":106.106,"exit_bar":63,"exit_dt":"2026-07-03","exit_price":108.75864999999999,"gross_pnl":108.75864999999976,"id":10,"pnl":95.54447402499976,"quantity":41},{"commission":13.214175974999998,"entry_bar":64,"entry_dt":"2026-07-04","entry_price":106.106,"exit_bar":69,"exit_dt":"2026-07-09","exit_price":108.75864999999999,"gross_pnl":108.75864999999976,"id":11,"pnl":95.54447402499976,"quantity":41},{"commission":13.214175974999998,"entry_bar":70,"entry_dt":"2026-07-10","entry_price":106.106,"exit_bar":75,"exit_dt":"2026-07-15","exit_price":108.75864999999999,"gross_pnl":108.75864999999976,"id":12,"pnl":95.54447402499976,"quantity":41},{"commission":13.536472949999999,"entry_bar":76,"entry_dt":"2026-07-16","entry_price":106.10599999999998,"exit_bar":81,"exit_dt":"2026-07-21","exit_price":108.75864999999997,"gross_pnl":111.41129999999976,"id":13,"pnl":97.87482704999975,"quantity":42},{"commission":13.536472949999999,"entry_bar":82,"entry_dt":"2026-07-22","entry_price":106.10599999999998,"exit_bar":87,"exit_dt":"2026-07-27","exit_price":108.75864999999997,"gross_pnl":111.41129999999976,"id":14,"pnl":97.87482704999975,"quantity":42},{"commission":13.536472949999999,"entry_bar":88,"entry_dt":"2026-07-28","entry_price":106.10599999999998,"exit_bar":93,"exit_dt":"2026-08-02","exit_price":108.75864999999997,"gross_pnl":111.41129999999976,"id":15,"pnl":97.87482704999975,"quantity":42},{"commission":13.858769924999999,"entry_bar":94,"entry_dt":"2026-08-03","entry_price":106.106,"exit_bar":99,"exit_dt":"2026-08-08","exit_price":108.75864999999999,"gross_pnl":114.06394999999975,"id":16,"pnl":100.20518007499975,"quantity":43},{"commission":13.858769924999999,"entry_bar":100,"entry_dt":"2026-08-09","entry_price":106.106,"exit_bar":105,"exit_dt":"2026-08-14","exit_price":108.75864999999999,"gross_pnl":114.06394999999975,"id":17,"pnl":100.20518007499975,"quantity":43},{"commission":13.858769924999999,"entry_bar":106,"entry_dt":"2026-08-15","entry_price":106.106,"exit_bar":111,"exit_dt":"2026-08-20","exit_price":108.75864999999999,"gross_pnl":114.06394999999975,"id":18,"pnl":100.20518007499975,"quantity":43},{"commission":14.1810669,"entry_bar":112,"entry_dt":"2026-08-21","entry_price":106.106,"exit_bar":117,"exit_dt":"2026-08-26","exit_price":108.75864999999999,"gross_pnl":116.71659999999974,"id":19,"pnl":102.53553309999974,"quantity":44}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"dynamic_fixed_fraction_sizing_balance","bars":[{"close":100,"dt":"2026-04-12","high":101,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-13","high":103,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-14","high":104,"low":102,"open":103,"volume":1000},{"close":108,"dt":"2026-04-15","high":110,"low":102,"open":103,"volume":1000},{"close":108,"dt":"2026-04-16","high":109,"low":107,"open":108,"volume":1000},{"close":107,"dt":"2026-04-17","high":109,"low":106,"open":108,"volume":1000},{"close":101,"dt":"2026-04-18","high":108,"low":100,"open":107,"volume":1000},{"close":104,"dt":"2026-04-19","high":105,"low":100,"open":101,"volume":1000},{"close":104,"dt":"2026-04-20","high":105,"low":103,"open":104,"volume":1000},{"close":110,"dt":"2026-04-21","high":112,"low":103,"open":104,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.55,"type":"fixed_fraction_sizing"},"stop_loss":{"pct":0.04,"type":"stop_loss"},"take_profit":{"pct":0.04,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-04-12","equity":10000},{"bar":1,"dt":"2026-04-13","equity":10000},{"bar":2,"dt":"2026-04-14","equity":9994.541000000001},{"bar":3,"dt":"2026-04-15","equity":10207.223640000002},{"bar":4,"dt":"2026-04-16","equity":10201.715640000002},{"bar":5,"dt":"2026-04-17","equity":10150.715640000002},{"bar":6,"dt":"2026-04-18","equity":9976.107960000003},{"bar":7,"dt":"2026-04-19","equity":9976.107960000003},{"bar":8,"dt":"2026-04-20","equity":9970.699960000002},{"bar":9,"dt":"2026-04-21","equity":10181.39564}],"stats":{"max_drawdown":-0.02317218553663436,"sharpe":2.695692330225169,"total_return":0.018139564000000163,"trade_count":3,"win_rate":0.6666666666666666},"trades":[{"commission":11.13636,"entry_bar":2,"entry_dt":"2026-04-14","entry_price":103,"exit_bar":3,"exit_dt":"2026-04-15","exit_price":107.12,"gross_pnl":218.36000000000024,"id":0,"pnl":207.22364000000024,"quantity":53},{"commission":10.79568,"entry_bar":4,"entry_dt":"2026-04-16","entry_price":108,"exit_bar":6,"exit_dt":"2026-04-18","exit_price":103.67999999999999,"gross_pnl":-220.3200000000004,"id":1,"pnl":-231.1156800000004,"quantity":51},{"commission":11.03232,"entry_bar":8,"entry_dt":"2026-04-20","entry_price":104,"exit_bar":9,"exit_dt":"2026-04-21","exit_price":108.16,"gross_pnl":216.31999999999982,"id":2,"pnl":205.28767999999982,"quantity":52}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"},{"input":{"vector_id":"exit_and_reentry_signal_overlap","bars":[{"close":100,"dt":"2026-04-23","high":101,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-24","high":103,"low":99,"open":100,"volume":1000},{"close":103,"dt":"2026-04-25","high":104,"low":102,"open":103,"volume":1000},{"close":106,"dt":"2026-04-26","high":108,"low":102,"open":103,"volume":1000},{"close":106,"dt":"2026-04-27","high":107,"low":105,"open":106,"volume":1000},{"close":111,"dt":"2026-04-28","high":113,"low":105,"open":106,"volume":1000}],"costs":{"commission":0.001,"slippage":0},"initial_cash":10000,"strategy":{"entry":{"op":">","threshold":102,"type":"price_threshold"},"sizing":{"fraction":0.5,"type":"fixed_fraction_sizing"},"take_profit":{"pct":0.03,"type":"take_profit"}}},"expected":{"result":{"schema":"apex-backtrader-engine/1","output":{"equity_curve":[{"bar":0,"dt":"2026-04-23","equity":10000},{"bar":1,"dt":"2026-04-24","equity":10000},{"bar":2,"dt":"2026-04-25","equity":9995.056},{"bar":3,"dt":"2026-04-26","equity":10138.28368},{"bar":4,"dt":"2026-04-27","equity":10133.30168},{"bar":5,"dt":"2026-04-28","equity":10277.63022}],"stats":{"max_drawdown":-0.000494400000000006,"sharpe":10.937922547892098,"total_return":0.027763021999999804,"trade_count":2,"win_rate":1},"trades":[{"commission":10.03632,"entry_bar":2,"entry_dt":"2026-04-25","entry_price":103,"exit_bar":3,"exit_dt":"2026-04-26","exit_price":106.08999999999999,"gross_pnl":148.31999999999948,"id":0,"pnl":138.2836799999995,"quantity":48},{"commission":10.11346,"entry_bar":4,"entry_dt":"2026-04-27","entry_price":106,"exit_bar":5,"exit_dt":"2026-04-28","exit_price":109.18,"gross_pnl":149.46000000000032,"id":1,"pnl":139.34654000000032,"quantity":47}]}}},"match":"subset","verified_at":"2026-07-05T12:00:00.000Z"}]}