# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# <img src="https://www.quantrocket.com/assets/img/notebook-header-logo.png">
#
# <a href="https://www.quantrocket.com/disclaimer/">Disclaimer</a>

# # Run backtest
#
# We can now run our backtest from the QuantRocket client. The API for the satellite service lets us execute an arbitrary Python function or shell command and optionally return a file. In our case, we'll execute the `run` function in our Python script and tell QuantRocket to return the PDF performance chart that our script will create.
#

from quantrocket.satellite import execute_command
execute_command("codeload.backtrader_dma.dual_moving_average.run",
                return_file="/tmp/backtrader-plot.pdf",
                filepath_or_buffer="backtrader-plot.pdf")

# Finally, open the resulting `backtrader-plot.pdf` and have a look at the results.

StarcoderdataJupyterScriptsDedupFiltered