Hi Everyone!
We're happy to share we've added Backtesting and Research GPU support to our cloud platform! The current servers use a Tesla V100S GPU, shared with a maximum of three other users, and depending on the server load, you may use the full 100% GPU 🚀🎉
In initial tests, we see speed-ups of +100x when used with an awareness of their limitations. GPUs need data loaded into their cores (which incurs an overhead); for best results, you should do batch analysis at regular weekly or monthly intervals.
To test the speed up, we ran a strategy provided by a client on a CPU-only machine, with all training period limitations removed. After more than 24 hours, we stopped it and re-ran the same strategy on a GPU machine in 17 minutes.Â
Please consider this a public beta; we're still testing the edge cases and performing optimizations, so specific behavior is subject to change. If you have specific strategies you'd like us to test, please post them here or to support and we'll run them on the new nodes.Â
If you're interested, check out the new nodes from the pricing page: Backtesting B4-16-GPU and Research R4-16-GPU. These are available for a monthly lease for $400.Â
Happy Coding!
Jared
Lucas
Hi Jared
Thank you for the feature! Think that a lot of people will benefit from his new feature. I have 2 question though. What happens if all 3 people use the GPU at the same time? Will each user have access to â…“ of the ram and process power? Furthermore, can the GPU also be used for live trading?Â
Have a good day
Lucas
Jared Broad
Hi Luca! The RAM and CPU are reserved(dedicated) and there would be â…“ of a GPU minimum. Live trading isn't done yet but it's on the roadmap. For now, models can be trained in research/backtesting and passed to live via the Object Store.
Best,
Jared
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.
Ben Letchford
This is awesome. Great work team.
Anup DebBarma
Hi Jared,
Great feature, since I am trading alone the cost is a bit prohibitive. Would it be possible to have a plan where we pay based on the amount of time used in QCC, so that I only pay when I train it.Â
Jared Broad
Thanks and understood Anup! We're hoping to roll out something like that soon. The full nodes provide a more predictable workload - and provisioning/sourcing them without predictable demand is difficult at the moment. As the supply of GPUs increases, we'll be able to install more for community QCC use.Â
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.
Semurg Enterprises
Thanks Jared Broad it looks like a great feature, Â Are there any guides to writing a GPU back test as opposed to a traditional back test? Â
Â
Semurg Enterprises
Also how can you select this GPU back testing? Â Upgrade back testing node to GPU and then it will be triggered automatically on each back test? Â
Jared Broad
Once added to your account GPU node shows up as a node in your resource list - you can force the backtest to use it by clicking the node in the list.Â
Re: Writing a GPU backtest - many libraries support GPU with no API changes. However, there are things to consider when writing a GPU backtest. The loading time of the model can be several milliseconds, so you want to do this batches. If misused, it can appear slower than a traditional CPU backtest.
I think this justifies a section of docs so we'll draft something up and post it here shortly.
Â
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.
Semurg Enterprises
Hi Jared Broad thank you very much is a very exciting development. Â
Derek Melchin
Hi Semurg Enterprises,
We updated the documentation here.
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.
Semurg Enterprises
Hi Derek Melchin and Jared Broad thank you very much. Â
If running a backtest / training period can the period be split into weekly units and each weekly unit sent sent to a GPU core with results gathered or saved (e.g. to object store) at the end. Â
Something similar to data parallelism as described here:
With structure of Quant Connect script as I understand the def Initialize(self) method gets called first and once which sets the backtest start and end data and then the def OnData(self, data) method is called until the backtest period completes; I am not sure how you could go about splitting up the backtest into weekly units and then running in parallel? Â
Is there a way via for example the CLI? Â Or another method you could recommed?
Thank YouÂ
Â
Â
Semurg Enterprises
Can parameters be passes on command line like this →Â
lean cloud backtest MyProject –start 2022-01-01 --end 2022-01-31
And if so how can they be pulled into the Quant Connect script? Â
Semurg Enterprises
Or is it better to adjust the config file in Lean with start and end dates before each run?
Semurg Enterprises
And iterate with a Python / CLI script something like this:
import subprocess
from dateutil.relativedelta import relativedelta
import datetime
# Starting and ending months for backtests
start_month = datetime.date(2022, 1, 1)
end_month = datetime.date(2022, 12, 31)
current_month = start_month
while current_month <= end_month:
  start_date = current_month
  end_date = current_month + relativedelta(months=1) - relativedelta(days=1) # to get the last day of current_month
  # Construct the lean cloud backtest command
  cmd = f"lean cloud backtest myProject --start {start_date} --end {end_date}"
  # Execute the command
  subprocess.run(cmd, shell=True)
  # Move to the next month
  current_month = current_month + relativedelta(months=1)
Â
With a GPU backtesting node will each call be pushed to a GPU core? Â
Jared Broad
I think you're mixing concepts of optimization and GPU. I'll see if we can post an example that harnesses the GPU fully.Â
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.
Def returns
This is great! Research and training my model was super quick, but now I'm incentivized to wait/do more research for the rest of the pay period before changing my subscription. Is there any chance of being able to switch from a Research to a Backtesting GPU without being charged again?
Def returns
I realized that's effectively what happens, as the billing date just changes and there's a pro-rated adjustment 😅
Jared Broad
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!