Back

Algo Framework buying at nonexistent prices and missing Up insights

Hello,

I'm seeing a few unintended behaviors with this algorithm.  Here are three examples of the unintended behaviors that I'm seeing on several of the orders from the backtest:

  1. There is a purchase of 72 shares of AFL at a share price of 40.5091 on 7/15.  The share price of AFL never reached above 36.64 on 7/15 according to Yahoo Finance.  (A similar thing happens on LYB.)
  2. 178 shares of EQ were purchased at a HOD break at a share price of 16.42 at 14:03.17 on 7/15.  I believe that's 10:03am.  Previous to 10:03, the HOD was 16.00.  Why did the algorithm not purchase at 16.01 or 16.02 or 16.03 etc?  Why did it wait all the way until 16.42 to purchase?  Is that all just slippage?  (A similar thing happens on BOXL and WIMI.)
  3. Why did the algorithm stop trading BE after 14:14 (share price of $15.8) on 7/15?  BE continued breaking through to new HOD marks all the way up to a share price of $18.26.
Thank you!
Sean
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 S O’Keeffe,

Please see our previous thread on why prices seem different.

Best,
Shile Wen

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 Shile,

Thank you so much for you response!  I don't think that data normalization is what's causing the nonexistant prices in my first question.  The sale prices for AFL and LYB line up exactly with what I'm seeing on the minute candles on Yahoo Finance charts.  It's just those two specific buy prices (one on AFL and one on LYB) that are completely outside the minute candles as well as the day candles on Yahoo Finance.  Maybe there are just a couple iregularities in the historical prices here and there that are causing a few buy order anomalies?

And for my second and third questions, do you know why the Up insights don't seem to be working all the time?  Sometimes it seems to entirely miss buying a stock breaking out (question 3) or buy far too late after the insight has been triggered (question 2).

Thank you!
Sean

 

0

Hi S O’Keeffe,

It is definitely possible that an anomaly (e.g. a sudden and short spike) in the prices caused the high price for AFL.

As for why the Up insights aren’t always being emitted, that may have something to do with the algorithm’s logic. I suggest trying out our Debugger to see if the algorithm’s logic is correct.

Best,
Shile Wen

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.


OK great thank you Shile!  I have not used that Debugger tool before so I will check it out!

Sean

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