Back

Is it possible to backtest within a notebook? What's the best approach for debugging / testing strategies prior to backtesting?

Is it possible to perform backtesting in a notebook environment (or local linux env) for programmatic access to the result metrics (eg. PSR) ?

When developing a python strategy, is it possible to debug / test using small data slices outside of scheduling a full backtest of the main.py strategy?

Update Backtest







0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Ryan Bell ,

It is not possible to perform a full backtest in a notebook.
The PSR is not available at the "algorithm level", it belongs to the "engine level" in the result handler. After we run the backtest, its final value and a rolling window are available in the results json file. 

What is the objective of testing using a small data slice? If we know that we give a concrete answer.

1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Got it. I think with a little bit of abstraction, I could experiment in a local Backtrader environment with a SharpeRatio then port to QuantConnect.

The research notebook is great, but without being able to run an algorithm or simulate scheduled events, it's utility for prototyping is limited.

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed