Back

Emitting Insights for Profit Taker Orders

Hi There,

I'm working on an Alpha currently which emits insights indicating when a security should be purchased. This occurs when the security is trading at a price commensurate with the insight. (Ie. the insight indicates the security is currently to be purchased, within the timeframe of the insight).

Typically with a normal algorithm, I would place this order as a limit order. Once confirmed filled in OnOrderEvent, I would place another limit order to take profit - for the sake of argument say at the Fill Price + 10%. This order obviously sits for some time until filled, but one thing is certain - the prevailing market price does not meet the requirement to sell the security yet.

How do I emit insights for the profit taker? If I emit an insight when I place the limit order, I am emitting an insight at the wrong price. Can I emit an insight for the security to indicate a particular price?

Thank you

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

Insights shouldn't be used to place take-profit orders. When implementing with the Algorithm Framework style, it's most appropriate for the take-profit order logic to be placed insight the execution model. To build a custom one execution model, refer to our documentation.

Best,
Derek Melchin

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.


Thanks Derek,
Just to clarify, I don't want to place a take-profit in the alpha model. I am more interested in understanding how I should model the insights. Is it required to emit a flat insight when we are no longer positive on the asset, or is it sufficient to emit a positive insight with a period that covers our expected or proposed holding period? (ie. which of the below is correct, or are both suitable in their own way - both assuming we expect the holding period to be 1 week)

Example 1 - Single Buy Insight
1 Jun: Emit "Up" Insight, Expected Duration 1 week
7 Jun: Do nothing

Example 2 - Buy Insight & Flat Insight
1 Jun: Emit "Up" Insight, Expected Duration 1 week
7 Jun: Emit "Flat" Insight

0

Hi Daniel,

Both examples will result in the same trades, but we recommend favoring example #1. Some users use a flat insight to exit a trade early. This would like like:
1 Jun: Emit "Up" Insight, duration 1 week
3 Jun: Emit "Flat" Insight, with a duration atleast a long as the remaining duration of the first insight

For more information on how to use Insights, refer to our documentation.

Best,
Derek Melchin

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.


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