Skip to content

Instantly share code, notes, and snippets.

@ahmedengu
Last active September 13, 2024 14:31
Show Gist options
  • Save ahmedengu/dcad96e8aa541fafedf178ff528d3af1 to your computer and use it in GitHub Desktop.
Save ahmedengu/dcad96e8aa541fafedf178ff528d3af1 to your computer and use it in GitHub Desktop.
Installing and running quantconnect lean on google colab ubuntu 18 python version
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "QuantConnect_Lean.ipynb",
"version": "0.3.2",
"provenance": [],
"collapsed_sections": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/ahmedengu/dcad96e8aa541fafedf178ff528d3af1/quantconnect_lean.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"metadata": {
"id": "J9qMAugFW_3y",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 6343
},
"outputId": "43d7c96d-26f0-43f3-8681-b0fadadffc48"
},
"cell_type": "code",
"source": [
"# Install QuantConnect Lean\n",
"from IPython.display import clear_output\n",
"\n",
"!pip install cython pandas jstyleson\n",
"clear_output(wait=True)\n",
"!sudo apt install gnupg ca-certificates\n",
"clear_output(wait=True)\n",
"!sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF\n",
"clear_output(wait=True)\n",
"!echo \"deb https://download.mono-project.com/repo/ubuntu stable-bionic main\" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list\n",
"clear_output(wait=True)\n",
"!sudo apt update\n",
"clear_output(wait=True)\n",
"!sudo apt install -y mono-devel binutils mono-complete ca-certificates-mono mono-vbnc nuget referenceassemblies-pcl fsharp\n",
"clear_output(wait=True)\n",
"!git clone https://github.com/QuantConnect/Lean.git tmp && mv tmp/* . && rm -rf tmp\n",
"clear_output(wait=True)\n",
"!nuget restore QuantConnect.Lean.sln"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[?1h\u001b=\u001b[6n\u001b[H\u001b[2JMSBuild auto-detection: using msbuild version '15.0' from '/usr/lib/mono/msbuild/15.0/bin'.\n",
"Restoring NuGet package R.NET.Community.1.6.5.\n",
"Restoring NuGet package DynamicInterop.0.7.4.\n",
"Restoring NuGet package DotNetZip.1.10.1.\n",
"Restoring NuGet package Baseclass.Contrib.Nuget.Output.2.2.0-xbuild02.\n",
"Restoring NuGet package fasterflect.2.1.3.\n",
"Restoring NuGet package FSharp.Core.4.2.1.\n",
"Restoring NuGet package MathNet.Numerics.3.19.0.\n",
"Restoring NuGet package NodaTime.1.3.4.\n",
"Restoring NuGet package Newtonsoft.Json.10.0.3.\n",
"Restoring NuGet package QuantConnect.pythonnet.1.0.5.17.\n",
"Restoring NuGet package CloneExtensions.1.3.0.\n",
"Restoring NuGet package RestSharp.105.2.3.\n",
"Restoring NuGet package QLNet.1.9.2.\n",
"Restoring NuGet package SharpZipLib.0.86.0.\n",
"Restoring NuGet package MathNet.Filtering.0.4.0.\n",
"Restoring NuGet package NLog.4.4.11.\n",
" GET https://api.nuget.org/v3-flatcontainer/mathnet.numerics/3.19.0/mathnet.numerics.3.19.0.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/dynamicinterop/0.7.4/dynamicinterop.0.7.4.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/fsharp.core/4.2.1/fsharp.core.4.2.1.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/dotnetzip/1.10.1/dotnetzip.1.10.1.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/fasterflect/2.1.3/fasterflect.2.1.3.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/nodatime/1.3.4/nodatime.1.3.4.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/10.0.3/newtonsoft.json.10.0.3.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/baseclass.contrib.nuget.output/2.2.0-xbuild02/baseclass.contrib.nuget.output.2.2.0-xbuild02.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/r.net.community/1.6.5/r.net.community.1.6.5.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/cloneextensions/1.3.0/cloneextensions.1.3.0.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/sharpziplib/0.86.0/sharpziplib.0.86.0.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/nlog/4.4.11/nlog.4.4.11.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/restsharp/105.2.3/restsharp.105.2.3.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/quantconnect.pythonnet/1.0.5.17/quantconnect.pythonnet.1.0.5.17.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/qlnet/1.9.2/qlnet.1.9.2.nupkg\n",
" GET https://api.nuget.org/v3-flatcontainer/mathnet.filtering/0.4.0/mathnet.filtering.0.4.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/dynamicinterop/0.7.4/dynamicinterop.0.7.4.nupkg 3372ms\n",
"Installing DynamicInterop 0.7.4.\n",
"Adding package 'DynamicInterop.0.7.4' to folder '/content/packages'\n",
"Added package 'DynamicInterop.0.7.4' to folder '/content/packages'\n",
"Restoring NuGet package NLog.Config.4.4.11.\n",
" GET https://api.nuget.org/v3-flatcontainer/nlog.config/4.4.11/nlog.config.4.4.11.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/mathnet.numerics/3.19.0/mathnet.numerics.3.19.0.nupkg 3518ms\n",
"Installing MathNet.Numerics 3.19.0.\n",
"Adding package 'MathNet.Numerics.3.19.0' to folder '/content/packages'\n",
"Added package 'MathNet.Numerics.3.19.0' to folder '/content/packages'\n",
"Restoring NuGet package NLog.Schema.4.4.11.\n",
" GET https://api.nuget.org/v3-flatcontainer/nlog.schema/4.4.11/nlog.schema.4.4.11.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/fsharp.core/4.2.1/fsharp.core.4.2.1.nupkg 4248ms\n",
"Installing FSharp.Core 4.2.1.\n",
"Adding package 'FSharp.Core.4.2.1' to folder '/content/packages'\n",
"Added package 'FSharp.Core.4.2.1' to folder '/content/packages'\n",
"Restoring NuGet package Accord.3.6.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/accord/3.6.0/accord.3.6.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/fasterflect/2.1.3/fasterflect.2.1.3.nupkg 4881ms\n",
"Installing fasterflect 2.1.3.\n",
"Adding package 'fasterflect.2.1.3' to folder '/content/packages'\n",
"Added package 'fasterflect.2.1.3' to folder '/content/packages'\n",
"Restoring NuGet package Accord.Math.3.6.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/accord.math/3.6.0/accord.math.3.6.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/dotnetzip/1.10.1/dotnetzip.1.10.1.nupkg 5440ms\n",
"Installing DotNetZip 1.10.1.\n",
"Adding package 'DotNetZip.1.10.1' to folder '/content/packages'\n",
"Added package 'DotNetZip.1.10.1' to folder '/content/packages'\n",
"Restoring NuGet package AsyncIO.0.1.26.\n",
" GET https://api.nuget.org/v3-flatcontainer/asyncio/0.1.26/asyncio.0.1.26.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nodatime/1.3.4/nodatime.1.3.4.nupkg 3138ms\n",
"Installing NodaTime 1.3.4.\n",
"Adding package 'NodaTime.1.3.4' to folder '/content/packages'\n",
"Added package 'NodaTime.1.3.4' to folder '/content/packages'\n",
"Restoring NuGet package Castle.Core.4.1.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/castle.core/4.1.0/castle.core.4.1.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/10.0.3/newtonsoft.json.10.0.3.nupkg 3284ms\n",
"Installing Newtonsoft.Json 10.0.3.\n",
"Adding package 'Newtonsoft.Json.10.0.3' to folder '/content/packages'\n",
"Added package 'Newtonsoft.Json.10.0.3' to folder '/content/packages'\n",
"Restoring NuGet package IKVM-WithExes.7.3.4830.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/ikvm-withexes/7.3.4830.1/ikvm-withexes.7.3.4830.1.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/baseclass.contrib.nuget.output/2.2.0-xbuild02/baseclass.contrib.nuget.output.2.2.0-xbuild02.nupkg 3869ms\n",
"Installing Baseclass.Contrib.Nuget.Output 2.2.0-xbuild02.\n",
"Adding package 'Baseclass.Contrib.Nuget.Output.2.2.0-xbuild02' to folder '/content/packages'\n",
"Added package 'Baseclass.Contrib.Nuget.Output.2.2.0-xbuild02' to folder '/content/packages'\n",
"Restoring NuGet package Moq.4.7.63.\n",
" GET https://api.nuget.org/v3-flatcontainer/moq/4.7.63/moq.4.7.63.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/r.net.community/1.6.5/r.net.community.1.6.5.nupkg 4011ms\n",
"Installing R.NET.Community 1.6.5.\n",
"Adding package 'R.NET.Community.1.6.5' to folder '/content/packages'\n",
"Added package 'R.NET.Community.1.6.5' to folder '/content/packages'\n",
"Restoring NuGet package NetMQ.4.0.0.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/netmq/4.0.0.1/netmq.4.0.0.1.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/cloneextensions/1.3.0/cloneextensions.1.3.0.nupkg 4160ms\n",
"Installing CloneExtensions 1.3.0.\n",
"Adding package 'CloneExtensions.1.3.0' to folder '/content/packages'\n",
"Added package 'CloneExtensions.1.3.0' to folder '/content/packages'\n",
"Restoring NuGet package NUnit.2.6.4.\n",
" GET https://api.nuget.org/v3-flatcontainer/nunit/2.6.4/nunit.2.6.4.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/sharpziplib/0.86.0/sharpziplib.0.86.0.nupkg 4729ms\n",
"Installing SharpZipLib 0.86.0.\n",
"Adding package 'SharpZipLib.0.86.0' to folder '/content/packages'\n",
"Added package 'SharpZipLib.0.86.0' to folder '/content/packages'\n",
"Restoring NuGet package NUnitTestAdapter.2.1.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/nunittestadapter/2.1.1/nunittestadapter.2.1.1.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nlog/4.4.11/nlog.4.4.11.nupkg 5264ms\n",
"Installing NLog 4.4.11.\n",
"Adding package 'NLog.4.4.11' to folder '/content/packages'\n",
"Added package 'NLog.4.4.11' to folder '/content/packages'\n",
"Restoring NuGet package WebSocketSharpFork.1.0.4.\n",
" GET https://api.nuget.org/v3-flatcontainer/websocketsharpfork/1.0.4/websocketsharpfork.1.0.4.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/restsharp/105.2.3/restsharp.105.2.3.nupkg 5857ms\n",
"Installing RestSharp 105.2.3.\n",
"Adding package 'RestSharp.105.2.3' to folder '/content/packages'\n",
"Added package 'RestSharp.105.2.3' to folder '/content/packages'\n",
"Restoring NuGet package NATS.Client.0.8.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/nats.client/0.8.1/nats.client.0.8.1.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/quantconnect.pythonnet/1.0.5.17/quantconnect.pythonnet.1.0.5.17.nupkg 6410ms\n",
"Installing QuantConnect.pythonnet 1.0.5.17.\n",
"Adding package 'QuantConnect.pythonnet.1.0.5.17' to folder '/content/packages'\n",
"Added package 'QuantConnect.pythonnet.1.0.5.17' to folder '/content/packages'\n",
"Restoring NuGet package System.Net.Http.4.3.3.\n",
" GET https://api.nuget.org/v3-flatcontainer/system.net.http/4.3.3/system.net.http.4.3.3.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/qlnet/1.9.2/qlnet.1.9.2.nupkg 6557ms\n",
"Installing QLNet 1.9.2.\n",
" OK https://api.nuget.org/v3-flatcontainer/mathnet.filtering/0.4.0/mathnet.filtering.0.4.0.nupkg 7487ms\n",
"Installing MathNet.Filtering 0.4.0.\n",
"Adding package 'MathNet.Filtering.0.4.0' to folder '/content/packages'\n",
"Added package 'MathNet.Filtering.0.4.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.Extensions.CommandLineUtils.1.1.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.commandlineutils/1.1.1/microsoft.extensions.commandlineutils.1.1.1.nupkg\n",
"Adding package 'QLNet.1.9.2' to folder '/content/packages'\n",
"Added package 'QLNet.1.9.2' to folder '/content/packages'\n",
"Restoring NuGet package ICSharpCode.SharpZipLib.dll.0.85.4.369.\n",
" GET https://api.nuget.org/v3-flatcontainer/icsharpcode.sharpziplib.dll/0.85.4.369/icsharpcode.sharpziplib.dll.0.85.4.369.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nlog.config/4.4.11/nlog.config.4.4.11.nupkg 7393ms\n",
"Installing NLog.Config 4.4.11.\n",
"Adding package 'NLog.Config.4.4.11' to folder '/content/packages'\n",
"Added package 'NLog.Config.4.4.11' to folder '/content/packages'\n",
"Restoring NuGet package GeckoFX.1.0.5.\n",
" GET https://api.nuget.org/v3-flatcontainer/geckofx/1.0.5/geckofx.1.0.5.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nlog.schema/4.4.11/nlog.schema.4.4.11.nupkg 7206ms\n",
"Installing NLog.Schema 4.4.11.\n",
"Adding package 'NLog.Schema.4.4.11' to folder '/content/packages'\n",
"Added package 'NLog.Schema.4.4.11' to folder '/content/packages'\n",
"Restoring NuGet package Accord.Fuzzy.3.6.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/accord.fuzzy/3.6.0/accord.fuzzy.3.6.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/accord/3.6.0/accord.3.6.0.nupkg 7372ms\n",
"Installing Accord 3.6.0.\n",
"Adding package 'Accord.3.6.0' to folder '/content/packages'\n",
"Added package 'Accord.3.6.0' to folder '/content/packages'\n",
"Restoring NuGet package Accord.Statistics.3.6.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/accord.statistics/3.6.0/accord.statistics.3.6.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/accord.math/3.6.0/accord.math.3.6.0.nupkg 7537ms\n",
"Installing Accord.Math 3.6.0.\n",
" OK https://api.nuget.org/v3-flatcontainer/asyncio/0.1.26/asyncio.0.1.26.nupkg 7878ms\n",
"Installing AsyncIO 0.1.26.0.\n",
"Adding package 'AsyncIO.0.1.26' to folder '/content/packages'\n",
"Added package 'AsyncIO.0.1.26' to folder '/content/packages'\n",
"Restoring NuGet package EngineIoClientDotNet.1.0.7.\n",
" GET https://api.nuget.org/v3-flatcontainer/engineioclientdotnet/1.0.7/engineioclientdotnet.1.0.7.nupkg\n",
"Adding package 'Accord.Math.3.6.0' to folder '/content/packages'\n",
"Added package 'Accord.Math.3.6.0' to folder '/content/packages'\n",
"Restoring NuGet package SevenZipSharp.0.64.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/sevenzipsharp/0.64.0/sevenzipsharp.0.64.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/castle.core/4.1.0/castle.core.4.1.0.nupkg 7831ms\n",
"Installing Castle.Core 4.1.0.\n",
"Adding package 'Castle.Core.4.1.0' to folder '/content/packages'\n",
"Added package 'Castle.Core.4.1.0' to folder '/content/packages'\n",
"Restoring NuGet package SocketIoClientDotNet.1.0.7.1.\n",
" GET https://api.nuget.org/v3-flatcontainer/socketioclientdotnet/1.0.7.1/socketioclientdotnet.1.0.7.1.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/ikvm-withexes/7.3.4830.1/ikvm-withexes.7.3.4830.1.nupkg 7972ms\n",
"Installing IKVM-WithExes 7.3.4830.1.\n",
" OK https://api.nuget.org/v3-flatcontainer/moq/4.7.63/moq.4.7.63.nupkg 9039ms\n",
"Installing Moq 4.7.63.\n",
"Adding package 'Moq.4.7.63' to folder '/content/packages'\n",
"Added package 'Moq.4.7.63' to folder '/content/packages'\n",
"Restoring NuGet package SuperSocket.ClientEngine.Core.0.10.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/supersocket.clientengine.core/0.10.0/supersocket.clientengine.core.0.10.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/netmq/4.0.0.1/netmq.4.0.0.1.nupkg 9426ms\n",
"Installing NetMQ 4.0.0.1.\n",
"Adding package 'NetMQ.4.0.0.1' to folder '/content/packages'\n",
"Added package 'NetMQ.4.0.0.1' to folder '/content/packages'\n",
"Restoring NuGet package System.Collections.Immutable.1.4.0.\n",
" GET https://api.nuget.org/v3-flatcontainer/system.collections.immutable/1.4.0/system.collections.immutable.1.4.0.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nunit/2.6.4/nunit.2.6.4.nupkg 9278ms\n",
"Installing NUnit 2.6.4.\n",
"Adding package 'NUnit.2.6.4' to folder '/content/packages'\n",
"Added package 'NUnit.2.6.4' to folder '/content/packages'\n",
"Restoring NuGet package WebSocket4Net.0.15.2.\n",
" GET https://api.nuget.org/v3-flatcontainer/websocket4net/0.15.2/websocket4net.0.15.2.nupkg\n",
"Adding package 'IKVM-WithExes.7.3.4830.1' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/nunittestadapter/2.1.1/nunittestadapter.2.1.1.nupkg 9312ms\n",
"Installing NUnitTestAdapter 2.1.1.\n",
"Added package 'IKVM-WithExes.7.3.4830.1' to folder '/content/packages'\n",
"Restoring NuGet package CredentialManagement.1.0.2.\n",
" GET https://api.nuget.org/v3-flatcontainer/credentialmanagement/1.0.2/credentialmanagement.1.0.2.nupkg\n",
"Adding package 'NUnitTestAdapter.2.1.1' to folder '/content/packages'\n",
"Added package 'NUnitTestAdapter.2.1.1' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Imaging.14.3.25407.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.imaging/14.3.25407/microsoft.visualstudio.imaging.14.3.25407.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/websocketsharpfork/1.0.4/websocketsharpfork.1.0.4.nupkg 9029ms\n",
"Installing WebSocketSharpFork 1.0.4.0.\n",
"Adding package 'WebSocketSharpFork.1.0.4' to folder '/content/packages'\n",
"Added package 'WebSocketSharpFork.1.0.4' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.OLE.Interop.7.10.6070.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.ole.interop/7.10.6070/microsoft.visualstudio.ole.interop.7.10.6070.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/nats.client/0.8.1/nats.client.0.8.1.nupkg 9087ms\n",
"Installing NATS.Client 0.8.1.\n",
"Adding package 'NATS.Client.0.8.1' to folder '/content/packages'\n",
"Added package 'NATS.Client.0.8.1' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.14.0.14.3.25407.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.14.0/14.3.25407/microsoft.visualstudio.shell.14.0.14.3.25407.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/system.net.http/4.3.3/system.net.http.4.3.3.nupkg 9195ms\n",
"Installing System.Net.Http 4.3.3.\n",
"Adding package 'System.Net.Http.4.3.3' to folder '/content/packages'\n",
"Added package 'System.Net.Http.4.3.3' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.10.0/10.0.30319/microsoft.visualstudio.shell.immutable.10.0.10.0.30319.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.extensions.commandlineutils/1.1.1/microsoft.extensions.commandlineutils.1.1.1.nupkg 8644ms\n",
"Installing Microsoft.Extensions.CommandLineUtils 1.1.1.\n",
"Adding package 'Microsoft.Extensions.CommandLineUtils.1.1.1' to folder '/content/packages'\n",
"Added package 'Microsoft.Extensions.CommandLineUtils.1.1.1' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.11.0/11.0.50727/microsoft.visualstudio.shell.immutable.11.0.11.0.50727.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/icsharpcode.sharpziplib.dll/0.85.4.369/icsharpcode.sharpziplib.dll.0.85.4.369.nupkg 9119ms\n",
"Installing ICSharpCode.SharpZipLib.dll 0.85.4.369.\n",
"Adding package 'ICSharpCode.SharpZipLib.dll.0.85.4.369' to folder '/content/packages'\n",
"Added package 'ICSharpCode.SharpZipLib.dll.0.85.4.369' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.12.0/12.0.21003/microsoft.visualstudio.shell.immutable.12.0.12.0.21003.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/geckofx/1.0.5/geckofx.1.0.5.nupkg 9269ms\n",
"Installing GeckoFX 1.0.5.\n",
" OK https://api.nuget.org/v3-flatcontainer/accord.fuzzy/3.6.0/accord.fuzzy.3.6.0.nupkg 11897ms\n",
"Installing Accord.Fuzzy 3.6.0.\n",
"Adding package 'Accord.Fuzzy.3.6.0' to folder '/content/packages'\n",
"Added package 'Accord.Fuzzy.3.6.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.14.0/14.3.25407/microsoft.visualstudio.shell.immutable.14.0.14.3.25407.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/accord.statistics/3.6.0/accord.statistics.3.6.0.nupkg 11808ms\n",
"Installing Accord.Statistics 3.6.0.\n",
"Adding package 'Accord.Statistics.3.6.0' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/engineioclientdotnet/1.0.7/engineioclientdotnet.1.0.7.nupkg 11202ms\n",
"Installing EngineIoClientDotNet 1.0.7.\n",
"Adding package 'EngineIoClientDotNet.1.0.7' to folder '/content/packages'\n",
"Added package 'EngineIoClientDotNet.1.0.7' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.7.10.6071.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop/7.10.6071/microsoft.visualstudio.shell.interop.7.10.6071.nupkg\n",
"Added package 'Accord.Statistics.3.6.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.10.0/10.0.30319/microsoft.visualstudio.shell.interop.10.0.10.0.30319.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/sevenzipsharp/0.64.0/sevenzipsharp.0.64.0.nupkg 11516ms\n",
"Installing SevenZipSharp 0.64.\n",
"Adding package 'SevenZipSharp.0.64.0' to folder '/content/packages'\n",
"Added package 'SevenZipSharp.0.64.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.11.0/11.0.61030/microsoft.visualstudio.shell.interop.11.0.11.0.61030.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/socketioclientdotnet/1.0.7.1/socketioclientdotnet.1.0.7.1.nupkg 11629ms\n",
"Installing SocketIoClientDotNet 1.0.7.1.\n",
"Adding package 'SocketIoClientDotNet.1.0.7.1' to folder '/content/packages'\n",
"Added package 'SocketIoClientDotNet.1.0.7.1' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.12.0/12.0.30110/microsoft.visualstudio.shell.interop.12.0.12.0.30110.nupkg\n",
"Adding package 'GeckoFX.1.0.5' to folder '/content/packages'\n",
"Added package 'GeckoFX.1.0.5' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.8.0/8.0.50727/microsoft.visualstudio.shell.interop.8.0.8.0.50727.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/supersocket.clientengine.core/0.10.0/supersocket.clientengine.core.0.10.0.nupkg 10308ms\n",
"Installing SuperSocket.ClientEngine.Core 0.10.0.\n",
"Adding package 'SuperSocket.ClientEngine.Core.0.10.0' to folder '/content/packages'\n",
"Added package 'SuperSocket.ClientEngine.Core.0.10.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.9.0/9.0.30729/microsoft.visualstudio.shell.interop.9.0.9.0.30729.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/system.collections.immutable/1.4.0/system.collections.immutable.1.4.0.nupkg 10251ms\n",
"Installing System.Collections.Immutable 1.4.0.\n",
"Adding package 'System.Collections.Immutable.1.4.0' to folder '/content/packages'\n",
"Added package 'System.Collections.Immutable.1.4.0' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.TextManager.Interop.7.10.6070.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.textmanager.interop/7.10.6070/microsoft.visualstudio.textmanager.interop.7.10.6070.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/websocket4net/0.15.2/websocket4net.0.15.2.nupkg 10651ms\n",
"Installing WebSocket4Net 0.15.2.\n",
"Adding package 'WebSocket4Net.0.15.2' to folder '/content/packages'\n",
"Added package 'WebSocket4Net.0.15.2' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.textmanager.interop.8.0/8.0.50727/microsoft.visualstudio.textmanager.interop.8.0.8.0.50727.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/credentialmanagement/1.0.2/credentialmanagement.1.0.2.nupkg 10623ms\n",
"Installing CredentialManagement 1.0.2.\n",
"Adding package 'CredentialManagement.1.0.2' to folder '/content/packages'\n",
"Added package 'CredentialManagement.1.0.2' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Threading.14.1.111.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.threading/14.1.111/microsoft.visualstudio.threading.14.1.111.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.imaging/14.3.25407/microsoft.visualstudio.imaging.14.3.25407.nupkg 11109ms\n",
"Installing Microsoft.VisualStudio.Imaging 14.3.25407.\n",
"Adding package 'Microsoft.VisualStudio.Imaging.14.3.25407' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Imaging.14.3.25407' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Utilities.14.3.25407.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.utilities/14.3.25407/microsoft.visualstudio.utilities.14.3.25407.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.ole.interop/7.10.6070/microsoft.visualstudio.ole.interop.7.10.6070.nupkg 11205ms\n",
"Installing Microsoft.VisualStudio.OLE.Interop 7.10.6070.\n",
"Adding package 'Microsoft.VisualStudio.OLE.Interop.7.10.6070' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.OLE.Interop.7.10.6070' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VisualStudio.Validation.14.1.111.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.validation/14.1.111/microsoft.visualstudio.validation.14.1.111.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.14.0/14.3.25407/microsoft.visualstudio.shell.14.0.14.3.25407.nupkg 11183ms\n",
"Installing Microsoft.VisualStudio.Shell.14.0 14.3.25407.\n",
"Adding package 'Microsoft.VisualStudio.Shell.14.0.14.3.25407' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.14.0.14.3.25407' to folder '/content/packages'\n",
"Restoring NuGet package Microsoft.VSSDK.BuildTools.15.1.192.\n",
" GET https://api.nuget.org/v3-flatcontainer/microsoft.vssdk.buildtools/15.1.192/microsoft.vssdk.buildtools.15.1.192.nupkg\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.10.0/10.0.30319/microsoft.visualstudio.shell.immutable.10.0.10.0.30319.nupkg 11131ms\n",
"Installing Microsoft.VisualStudio.Shell.Immutable.10.0 10.0.30319.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Immutable.10.0.10.0.30319' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.11.0/11.0.50727/microsoft.visualstudio.shell.immutable.11.0.11.0.50727.nupkg 11238ms\n",
"Installing Microsoft.VisualStudio.Shell.Immutable.11.0 11.0.50727.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Immutable.11.0.11.0.50727' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.12.0/12.0.21003/microsoft.visualstudio.shell.immutable.12.0.12.0.21003.nupkg 11171ms\n",
"Installing Microsoft.VisualStudio.Shell.Immutable.12.0 12.0.21003.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Immutable.12.0.12.0.21003' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.immutable.14.0/14.3.25407/microsoft.visualstudio.shell.immutable.14.0.14.3.25407.nupkg 7968ms\n",
"Installing Microsoft.VisualStudio.Shell.Immutable.14.0 14.3.25407.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Immutable.14.0.14.3.25407' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop/7.10.6071/microsoft.visualstudio.shell.interop.7.10.6071.nupkg 7180ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop 7.10.6071.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.7.10.6071' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.7.10.6071' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.10.0/10.0.30319/microsoft.visualstudio.shell.interop.10.0.10.0.30319.nupkg 7666ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop.10.0 10.0.30319.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.10.0.10.0.30319' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.11.0/11.0.61030/microsoft.visualstudio.shell.interop.11.0.11.0.61030.nupkg 7344ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop.11.0 11.0.61030.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.11.0.11.0.61030' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.12.0/12.0.30110/microsoft.visualstudio.shell.interop.12.0.12.0.30110.nupkg 7357ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop.12.0 12.0.30110.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.12.0.12.0.30110' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.8.0/8.0.50727/microsoft.visualstudio.shell.interop.8.0.8.0.50727.nupkg 7526ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop.8.0 8.0.50727.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.8.0.8.0.50727' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.shell.interop.9.0/9.0.30729/microsoft.visualstudio.shell.interop.9.0.9.0.30729.nupkg 7474ms\n",
"Installing Microsoft.VisualStudio.Shell.Interop.9.0 9.0.30729.\n",
"Adding package 'Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Shell.Interop.9.0.9.0.30729' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.textmanager.interop/7.10.6070/microsoft.visualstudio.textmanager.interop.7.10.6070.nupkg 7448ms\n",
"Installing Microsoft.VisualStudio.TextManager.Interop 7.10.6070.\n",
"Adding package 'Microsoft.VisualStudio.TextManager.Interop.7.10.6070' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.TextManager.Interop.7.10.6070' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.textmanager.interop.8.0/8.0.50727/microsoft.visualstudio.textmanager.interop.8.0.8.0.50727.nupkg 7112ms\n",
"Installing Microsoft.VisualStudio.TextManager.Interop.8.0 8.0.50727.\n",
"Adding package 'Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.threading/14.1.111/microsoft.visualstudio.threading.14.1.111.nupkg 7156ms\n",
"Installing Microsoft.VisualStudio.Threading 14.1.111.\n",
"Adding package 'Microsoft.VisualStudio.Threading.14.1.111' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Threading.14.1.111' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.utilities/14.3.25407/microsoft.visualstudio.utilities.14.3.25407.nupkg 7133ms\n",
"Installing Microsoft.VisualStudio.Utilities 14.3.25407.\n",
"Adding package 'Microsoft.VisualStudio.Utilities.14.3.25407' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Utilities.14.3.25407' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.validation/14.1.111/microsoft.visualstudio.validation.14.1.111.nupkg 7149ms\n",
"Installing Microsoft.VisualStudio.Validation 14.1.111.\n",
"Adding package 'Microsoft.VisualStudio.Validation.14.1.111' to folder '/content/packages'\n",
"Added package 'Microsoft.VisualStudio.Validation.14.1.111' to folder '/content/packages'\n",
" OK https://api.nuget.org/v3-flatcontainer/microsoft.vssdk.buildtools/15.1.192/microsoft.vssdk.buildtools.15.1.192.nupkg 7055ms\n",
"Installing Microsoft.VSSDK.BuildTools 15.1.192.\n",
"Adding package 'Microsoft.VSSDK.BuildTools.15.1.192' to folder '/content/packages'\n",
"Added package 'Microsoft.VSSDK.BuildTools.15.1.192' to folder '/content/packages'\n",
"\n",
"NuGet Config files used:\n",
" /root/.config/NuGet/NuGet.Config\n",
"\n",
"Feeds used:\n",
" https://api.nuget.org/v3/index.json\n",
"\n",
"Installed:\n",
" 61 package(s) to packages.config projects\n",
"\u001b[?1l\u001b>\u001b[m"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "Z0JIqfSTXJn4",
"colab_type": "code",
"colab": {}
},
"cell_type": "code",
"source": [
"# Update lean config to use python\n",
"import jstyleson\n",
"import json\n",
"\n",
"with open('Launcher/config.json') as f:\n",
" result_dict = jstyleson.loads(f.read())\n",
"\n",
"result_dict[\"algorithm-type-name\"] = \"BasicTemplateAlgorithm\"\n",
"result_dict[\"algorithm-language\"] = \"Python\"\n",
"result_dict[\"algorithm-location\"] = \"../../../BasicAlgorithm.py\"\n",
"\n",
"with open('Launcher/config.json', 'w') as f:\n",
" json.dump(result_dict, f)"
],
"execution_count": 0,
"outputs": []
},
{
"metadata": {
"id": "xNUWFcPuXLU1",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 33
},
"outputId": "af8056ba-036f-441f-a2c6-54b88bf1e6c4"
},
"cell_type": "code",
"source": [
"# Save the cell to the file set in the config\n",
"%%writefile BasicAlgorithm.py \n",
"# Write your algo below\n",
"\n",
"from clr import AddReference\n",
"AddReference(\"System\")\n",
"AddReference(\"QuantConnect.Algorithm\")\n",
"AddReference(\"QuantConnect.Common\")\n",
"\n",
"from System import *\n",
"from QuantConnect import *\n",
"from QuantConnect.Algorithm import *\n",
"import numpy as np\n",
"\n",
"### <summary>\n",
"### Basic template algorithm simply initializes the date range and cash. This is a skeleton\n",
"### framework you can use for designing an algorithm.\n",
"### </summary>\n",
"### <meta name=\"tag\" content=\"using data\" />\n",
"### <meta name=\"tag\" content=\"using quantconnect\" />\n",
"### <meta name=\"tag\" content=\"trading and orders\" />\n",
"class BasicTemplateAlgorithm(QCAlgorithm):\n",
" '''Basic template algorithm simply initializes the date range and cash'''\n",
"\n",
" def Initialize(self):\n",
" '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''\n",
"\n",
" self.SetStartDate(2013,10, 7) #Set Start Date\n",
" self.SetEndDate(2013,10,11) #Set End Date\n",
" self.SetCash(100000) #Set Strategy Cash\n",
" # Find more symbols here: http://quantconnect.com/data\n",
" self.AddEquity(\"SPY\", Resolution.Second)\n",
" self.Debug(\"numpy test >>> print numpy.pi: \" + str(np.pi))\n",
"\n",
" def OnData(self, data):\n",
" '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.\n",
" Arguments:\n",
" data: Slice object keyed by symbol containing the stock data\n",
" '''\n",
" if not self.Portfolio.Invested:\n",
" self.SetHoldings(\"SPY\", 1)\n"
],
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"text": [
"Writing BasicAlgorithm.py\n"
],
"name": "stdout"
}
]
},
{
"metadata": {
"id": "FyyFtbmKXN7C",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1325
},
"outputId": "74da780a-7a2e-4c36-d107-5d1626a9cc17"
},
"cell_type": "code",
"source": [
"# Build & Run Lean\n",
"from IPython.display import clear_output\n",
"\n",
"!msbuild QuantConnect.Lean.sln\n",
"clear_output(wait=True)\n",
"!cd Launcher/bin/Debug && mono ./QuantConnect.Lean.Launcher.exe"
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"text": [
"20190302 07:55:48.198 Trace:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value: \n",
"20190302 07:55:48.210 Trace:: Config.Get(): Configuration key not found. Key: composer-dll-directory - Using default value: /content/Launcher/bin/Debug/\n",
"20190302 07:55:48.259 Trace:: Config.GetValue(): debug-mode - Using default value: False\n",
"20190302 07:55:50.825 Trace:: Config.Get(): Configuration key not found. Key: data-directory - Using default value: ../../../Data/\n",
"20190302 07:55:50.826 Trace:: Config.Get(): Configuration key not found. Key: version-id - Using default value: \n",
"20190302 07:55:50.827 Trace:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: ../../../Data/\n",
"20190302 07:55:50.827 Trace:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.4.0.0 Mode: DEBUG (64bit)\n",
"20190302 07:55:50.827 Trace:: Engine.Main(): Started 7:55 AM\n",
"20190302 07:55:50.831 Trace:: Config.GetValue(): job-project-id - Using default value: 0\n",
"20190302 07:55:50.831 Trace:: Config.Get(): Configuration key not found. Key: algorithm-path-python - Using default value: ../../../Algorithm.Python/\n",
"20190302 07:55:50.836 Trace:: Config.GetValue(): regression-update-statistics - Using default value: False\n",
"20190302 07:55:50.837 Trace:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value: LocalLeanManager\n",
"20190302 07:55:50.841 Trace:: Config.Get(): Configuration key not found. Key: cloud-api-url - Using default value: https://www.quantconnect.com/api/v2/\n",
"20190302 07:55:50.896 Trace:: JobQueue.NextJob(): Selected ../../../BasicAlgorithm.py\n",
"20190302 07:55:50.971 Trace:: Config.GetValue(): ignore-version-checks - Using default value: False\n",
"20190302 07:55:50.973 Trace:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20\n",
"20190302 07:55:52.046 Trace:: AlgorithmPythonWrapper(): Python version 3.6.7 (default, Oct 22 2018, 11:32:17) \n",
"[GCC 8.2.0]: Importing python module BasicAlgorithm\n",
"20190302 07:55:52.743 Trace:: AlgorithmPythonWrapper(): Creating IAlgorithm instance.\n",
"20190302 07:55:53.548 Trace:: Config.Get(): Configuration key not found. Key: security-data-feeds - Using default value: \n",
"20190302 07:55:53.673 Trace:: BaseSetupHandler.SetupCurrencyConversions():\n",
"Symbol Quantity Conversion = Value in USD\n",
"USD: $ 100000.00 @ 1.00 = $100000.0\n",
"-------------------------------------------------\n",
"CashBook Total Value: $100000.0\n",
"\n",
"20190302 07:55:53.675 Trace:: BacktestingResultHandler(): Sample Period Set: 04.00\n",
"20190302 07:55:53.678 Trace:: Time.TradeableDates(): Security Count: 1\n",
"20190302 07:55:53.680 Trace:: Config.GetValue(): forward-console-messages - Using default value: True\n",
"20190302 07:55:53.680 Trace:: JOB HANDLERS: \n",
"20190302 07:55:53.680 Trace:: DataFeed: QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed\n",
"20190302 07:55:53.680 Trace:: Setup: QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler\n",
"20190302 07:55:53.680 Trace:: RealTime: QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler\n",
"20190302 07:55:53.680 Trace:: Results: QuantConnect.Lean.Engine.Results.BacktestingResultHandler\n",
"20190302 07:55:53.680 Trace:: Transactions: QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler\n",
"20190302 07:55:53.680 Trace:: Alpha: QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler\n",
"20190302 07:55:53.681 Trace:: History Provider: QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider\n",
"20190302 07:55:53.706 Trace:: Config.GetValue(): send-via-api - Using default value: False\n",
"20190302 07:55:53.730 Trace:: AlgorithmManager.Run(): Begin DataStream - Start: 10/7/2013 12:00:00 AM Stop: 10/11/2013 11:59:59 PM\n",
"20190302 07:55:53.757 Trace:: Debug: Launching analysis for BasicTemplateAlgorithm with LEAN Engine v2.4.0.0\n",
"20190302 07:55:54.058 Trace:: Debug: numpy test >>> print numpy.pi: 3.141592653589793\n",
"20190302 07:55:58.830 Trace:: Synchronizer.GetEnumerator(): Exited thread.\n",
"20190302 07:55:58.831 Trace:: AlgorithmManager.Run(): Firing On End Of Algorithm...\n",
"20190302 07:55:58.833 Trace:: Engine.Run(): Exiting Algorithm Manager\n",
"20190302 07:55:58.987 Trace:: Debug: Algorithm Id:(BasicTemplateAlgorithm) completed in 5.28 seconds at 22k data points per second. Processing total of 117,001 data points.\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Total Trades 1\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Average Win 0%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Average Loss 0%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Compounding Annual Return 263.153%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Drawdown 2.200%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Expectancy 0\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Net Profit 1.663%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Sharpe Ratio 4.41\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Loss Rate 0%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Win Rate 0%\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Profit-Loss Ratio 0\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Alpha 0.007\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Beta 76.118\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Annual Standard Deviation 0.192\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Annual Variance 0.037\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Information Ratio 4.354\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Tracking Error 0.192\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Treynor Ratio 0.011\n",
"20190302 07:55:59.039 Trace:: STATISTICS:: Total Fees $3.26\n",
"20190302 07:55:59.040 Trace:: BacktestingResultHandler.SendAnalysisResult(): Processed final packet\n",
"20190302 07:55:59.040 Trace:: BrokerageTransactionHandler.Run(): Ending Thread...\n",
"20190302 07:55:59.040 Trace:: FileSystemDataFeed.Exit(): Start. Setting cancellation token...\n",
"20190302 07:55:59.040 Trace:: FileSystemDataFeed.Exit(): Ending Thread...\n",
"20190302 07:55:59.042 Trace:: FileSystemDataFeed.Exit(): Exit Finished.\n",
"20190302 07:55:59.087 Trace:: Debug: Your log was successfully created and can be retrieved from: /content/Launcher/bin/Debug/BasicTemplateAlgorithm-log.txt\n",
"20190302 07:55:59.087 Trace:: BacktestingResultHandler.Run(): Ending Thread...\n",
"20190302 07:55:59.144 Trace:: Waiting for threads to exit...\n",
"20190302 07:55:59.144 Trace:: Engine.Run(): Disconnecting from brokerage...\n",
"20190302 07:55:59.144 Trace:: Engine.Run(): Disposing of setup handler...\n",
"20190302 07:55:59.144 Trace:: Engine.Main(): Analysis Completed and Results Posted.\n",
"Engine.Main(): Analysis Complete. Press any key to continue.\n",
"\u001b[?1h\u001b=\u001b[6n\u001b[H\u001b[2J\u001b[?1l\u001b>\u001b[m"
],
"name": "stdout"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment