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?
Alexandre Catarino
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.
Ryan Bell
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.
Ryan Bell
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!