Hi,
I would like to use custom data in live trading but I am not sure what is the best apprach so I kindly ask for guidelines.
First, I have developed and indicator for selling position in SPY (or other stocks). I have to devlop it locally in R because the package i available in R and is quite comlicated (uses alos C++ for speed up etc). The code takes 5 days to finish for period 2004-2021. Than I saved the indicators to csv file and upload it to Dropbox. I have used it in backtesting succesfully and it was pretty easy.
Now, I would like to try my algorithm in paper trading, but I am not sure how should I apprach to this task. I see several possibilites:
Should I run the algo on web or locally?
If web, should I import custim data (my indicators) to my algo? In backtest I use csv file from drobox, but I suppose that doesn't work for live trading?
Should I create API endpoint and than call my indicators every hour (hour is my frequency)? In general, I am not sure how to proceed in web data.
So in general I have custom data I can save as csv or on databae and I need to retrieve this data every hour an trade upon it.
Sidenote, I have discovered lean CLI few days ago and I can say it makes local development and migration local/web so easy! Why I didn't know before about that
Derek Melchin
Hi Mislav,
The algorithm can run locally or in the cloud. However, to run locally, a live data feed for SPY is needed. Once the indicator values are saved to Dropbox, they can be imported into the algorithm through a custom data source. This is true for both remote and local deployment.
To retrieve data from the custom data source periodically, we can use the SubscriptionTransportMedium.Rest property. This property causes the URL provided to the custom data source to be polled at each timestep in the algorithm. See to the documentation for reference.
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.
Mislav Sagovac
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!