run_and_write_report#
API documentation for tradeexecutor.backtest.preprocessed_backtest.run_and_write_report Python function.
- run_and_write_report(output_html, output_notebook, dataset, strategy_universe, custom_css='\n/* trade-executor backtest report generator custom CSS */\nbody {\n padding: 0; \n}\n\n.prompt {\n display: none !important;\n}\n\n#notebook {\n padding-top: 0 !important;\n}\n\n#notebook-container {\n padding: 0 !important;\n box-shadow: none;\n width: auto;\n}\n\n.code_cell {\n padding: 0;\n}\n', custom_js='\nconsole.log("Dynamic iframe resizer loaded");\n\nfunction getDocHeight(doc) {\n // stackoverflow.com/questions/1145850/\n var body = doc.body, html = doc.documentElement;\n var height = Math.max( body.scrollHeight, body.offsetHeight, \n html.clientHeight, html.scrollHeight, html.offsetHeight );\n return height;\n}\n\nwindow.addEventListener("load", function(){\n if(window.self === window.top) return; // if w.self === w.top, we are not in an iframe \n send_height_to_parent_function = function(){\n //var height = document.getElementsByTagName("html")[0].clientHeight;\n //var height= document.getElementById(\'wrapper\').offsetHeight;\n const height = getDocHeight(document);\n console.log("Sending height as " + height + "px");\n parent.postMessage({"iframeContentHeight" : height }, "*");\n }\n // send message to parent about height updates\n send_height_to_parent_function(); //whenever the page is loaded\n window.addEventListener("resize", send_height_to_parent_function); // whenever the page is resized\n var observer = new MutationObserver(send_height_to_parent_function); // whenever DOM changes PT1\n var config = { attributes: true, childList: true, characterData: true, subtree:true}; // PT2\n observer.observe(window.document, config); // PT3 \n});\n', show_code=False, timeout=1800)[source]#
- Parameters:
output_html (Path) –
output_notebook (Path) –
dataset (SavedDataset) –
strategy_universe (TradingStrategyUniverse) –