This Visual Studio plugin allows running QuantConnect backtests either localy using local installation of the QuantConnect Lean engine or remotely by utilizing the QuantConnect REST API.
Specify QuantConnect Lean configuration options and installation folders. The QuantConnect Lean libraries will be loaded from folder defined in "Path to Lean binaries".
To run backtest locally go to the selected C# file context menu
To run backtest remotely go to the Visual Studio menu: VIEW -> Other Windows -> QuantConnect Client
The Administrative window pane opens with sections for managing projects and backtests
Menu item name | Menu item description |
---|---|
Refresh | Reload the backtests list after selecting active project |
Load Backtest results | Load backtest results and show them in a chart window |
Delete Backtest | Delete active backtest |
Save Locally | Save loaded from Rest API backtest results to a local file |
Menu item name | Menu item description |
---|---|
Refresh | Reload the projects list. This is first action in workflow, if user is not authenticated the dialog with email and password pops-up. |
Create Project | Create new empty project in QuantConnect cloud |
Delete Project | Delete project from cloud (local project remain untached) |
Upload Project | Updates cloud project with files from local project connected to it |
Download Project | Download files from cloud and overwrite local connected project |
Build Project | Build cloud project and create new backtest |
Connect Project ID | Connect local project to cloud project. If local or cloud projects are already connected they should be disconnected first When local project is connected it is added new property QCProjectID with cloud project ID. |
Disconnect Project ID | Disconnect local project from cloud project |
Login | Authenticate user |
Logout | Remove user authentication |
After the main window pane is open you can proceed with the choosen scenario:
- Login the the system (optional)
Authentication occures automatically when user sends server request. - Get projects list with Resfresh.
- If no projects exist in the cloud:
- Do Create Project to create new empty project in cloud.
- Create new local project in Visual Studio or open solution with existing projects.
It can be actually project of any type. The plugin simply adds to it files from QuantConnect cloud. - Connect local project to cloud project.
- Add to the project algorithm files, as described here:
https://www.quantconnect.com/docs/REST#Developing-in-the-IDE
All files uploaded to cloud must inherit from QCAlgorithm base type:public partial class BasicTemplateAlgorithm : QCAlgorithm, IAlgorithm {...}
The sample algorithm templates are available here: https://github.com/QuantConnect/Lean/tree/master/Algorithm.CSharp - Create backtest by Building Project.
- Double click on some project or select a project and do Refresh backtests.
- Select backtest and do Load Backtest.
- Do Backtest Results to see chart, statistics and trades.
The QCStudioPlugin Options dialog allows setting extension classes for showing backtest results.
The default charting option uses QuantConnect terminal web site:
Path to UI library: C:\...\QCTerminalControl.dll
Full class name for UI: QCTerminalControl.JSChartControl
The alternative option uses opensource ZedGraph library and is provided only as example:
Path to UI library: C:\...\ZedGraphUIControl.dll
Full class name for UI: ZedGraphUIControl.QCClientControl