Back

Mixed Resolution in Indicators

Hi everyone,

I'm trying to figure out how to create an indicator that ingests, say, Price data at fine resolution, but emits digested data at a different, coarse resolution. Before you suggest sliding windows, the scenario I'm after is more along the lines of:

Use One-Minute price (or log-returns) to calculate intraday one-minute volatility and emit this intraday vol once a day, kinda "a Daily intra-day on-minute volatility". A naive example, but gives an idea; the aggregation period is set by calendar(say, daily or hourly, or weekly), but the input data is intra-period, more fine.

The Indicators/ doesn't seem to have a close enough template for me to get a clear idea how to do this.

Cheers!

 

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 Andy Ng ,

Could you please clarify the goal?
It looks like you want to calculate the indicator every minute and, at the end of the day, get a value based on the last day values (I am guessing the last part, it is not explicitly presented in your question). For example, you would compute the mean of the minute-resolution standard deviation of returns at the end of the day. 

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.


Thank you for the answer.

I tried to follow DataConsolidator examples, but got very confused by the various Consolidator update cycles and gave up for now.

Let me refrase the question:

Suppose calculate and intraday indicator of some sort, but I want it to reset on scheduled time interval, for example every day. So, accumulate and calculate value based on minute bars, but Reset after every market close (or before open). (This isn't fixed number of bars, so indicator didn't quite apply).

I tried hooking up 2 different Consolidators together; manually updating the value from Minute Consolidator, and attempting to Reset from Daily Consolidator; however something went terribly awry and Reset never happens.

I could probably use OnEndOfDay, if I'm to implement as QCAlgorithm; I wanted to make it work as Alpha framework component and that doesn't seem to have OnEndOfDay handler, thus all the Consolidator gymnastics.

Any ideas greatly appreciated.

0

Hi Andy Ng ,

Could you please attach the backtest of the latest attempt?

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