Hi, I saw the previous question about RVI and that was solved using C#. Is there anything in the works for putting RVI either as an indicator straight on QuantConnect or on Github? Struggling to try and transfer from C# to Python. Thanks
QUANTCONNECT COMMUNITY
Hi, I saw the previous question about RVI and that was solved using C#. Is there anything in the works for putting RVI either as an indicator straight on QuantConnect or on Github? Struggling to try and transfer from C# to Python. Thanks
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.
Shile Wen
Hi Erik,
The Relative Vigor Index has been merged. I've shown an example of RVI in the attached backtest.
Best,
Shile Wen
Erik schuh
Thanks for the help. Is it possible to add the RVI Signal line as well? I tried to add one with a crossover as the buy/sell and unable to get it to work. Doesn't like the RVISignal Function.
class TransdimensionalVerticalAntennaArray(QCAlgorithm): def Initialize(self): self.SetStartDate(2020, 1, 19) # Set Start Date self.SetEndDate(2020, 1, 30) self.SetCash(100000) # Set Strategy Cash self.AddEquity("SPY", Resolution.Hour).Symbol self.rvi = self.RVI('SPY', 14, Resolution.Hour) self.rvi.Updated += self.RviUpdated self.rviWin = RollingWindow[IndicatorDataPoint](3) self.AutomaticIndicatorWarmUp = True def RviUpdated(self, sender, updated): '''Adds updated values to rolling window''' self.rviWin.Add(updated) def OnData(self, data): # Wait for windows to be ready. if not self.rviWin.IsReady: return currRVI = self.rviWin[0] i = self.rviWin[self.rviWin.Count-1] j = self.rviWin[self.rviWin.Count-2] k = self.rviWin[self.rviWin.Count-3] RVISignal = (currRVI + (2*i.Value) + (2*j.Value) + k.Value)/6 if currRVI.Value > RVISignal: self.SetHoldings("SPY", 1) elif currRVI.Value < RVISignal: self.Liquidate("SPY") else: return
Â
Aaron Janeiro Stone
The RVI signal should be accessible by accessing self.rvi.Signal. It is automatically created when creating a new RVI indicator
https://github.com/QuantConnect/Lean/blob/31d101253c27e935beb7b48c8349aad903bb4e23/Indicators/RelativeVigorIndex.csÂ
Vladimir
Erik schuh,
Here is the one with the crossover
Erik schuh
Thanks Aaron. Seems to be working until around July 2020 and then the rvi and signal gert all screwed up. Any idea why that is?
Also anyone know if the source code be put up on GitHub? I want to see the equations behind the indicators and make some adjustments.
Derek Melchin
Hi Erik,
The custom plots look strange at the end of the backtest because custom charts are limited to 4000 data points. See these docs for reference.
The source code for the indicators are available on our GitHub repo.
Best,
Derek Melchin
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.
Erik schuh
Thanks Derek MelchinÂ
Erik schuh
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!