Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Backtest Vs. Live Trade Results

Hi All,

I'm trying to run the same algo in both back test & live trade environment for Price vs. VWAP (I've just cloned the code provided by another user in the discussion thread). There is apparently some mismatch in the live trade & back test results (attached is the back test ) & in the live environment I'm getting a loss of -74% (though my parameters are exactly the same).

This is also something we are trying to figure out in our in-house automated platform.

It would be great to get some insight on this.

best regards

maitreyi

1 response

Hi Maitreyi,

Alisa and I took a look at this for you. It looks to me like you have some discrepencies based on 2 things, 1) date range and 2) settings for slippage and transaction costs.

When we set identical settings for date range, set_commissions and set_slippage based on your simulated results (7/15-7/18 trading range) we were able to get very close agreement between the backtest results and what we saw in your simulation (something like -27% returns).

Those numbers don't really match your comments either here or in your email to feedback though, so its possible we aren't comparing the correct code. If you still see a discrepancy in your results after double checking the traded dates and settings for commissions and slippage please send us a note via [email protected] with links to the exact results you'd like us to review.

Keep in mind that if you do not explicitly set the values for slippage and commissions in your initialize() method the backtester will use default values (see docs here) as opposed to defaulting to zero commissions and slippage.

Best regards,
Jess

P.S. One other thing I noticed, you have the capital base set to $10,000 but the bet size set to $500,000. That's going to make your results look a bit strange because our backtester will allow you to take that ~10:1 leverage, and it will show your results based on % change from the original capital amount. It might make more sense if you set the capital base to cover the exposures the algo is going to take on - that will give you more intuitive results I think.

Disclaimer

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 Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian 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.