Overall Statistics Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 3.535% Drawdown 81.200% Expectancy 0 Net Profit 0% Sharpe Ratio 0.231 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.057 Beta 0.402 Annual Standard Deviation 0.304 Annual Variance 0.093 Information Ratio 0.12 Tracking Error 0.313 Treynor Ratio 0.175 Total Fees \$0.00
```from clr import AddReference

from System import *
from QuantConnect import *
from QuantConnect.Algorithm import *
from QuantConnect.Python import PythonQuandl
from datetime import datetime, timedelta

class QCUQuandlFutures(QCAlgorithm):
'''QuantConnect University: Futures Example
QuantConnect allows importing generic data sources! This example demonstrates
importing a futures data from the popular open data source Quandl.

def Initialize(self):
''' Initialize the data and resolution you require for your strategy '''
self.SetStartDate(2000, 1, 1)
self.SetEndDate(datetime.now().date() - timedelta(1))
self.SetCash(25000);

# Symbol corresponding to the quandl code
self.crude = "SCF/CME_CL1_ON"

def OnData(self, data):
'''Data Event Handler: New data arrives here. "TradeBars" type is a dictionary of strings so you can access it by symbol.'''
if self.Portfolio.HoldStock: return

self.SetHoldings(self.crude, 1);
self.Debug(str(self.Time) + str(" Purchased Crude Oil: ") + self.crude)

class QuandlFuture(PythonQuandl):
'''Custom quandl data type for setting customized value column name. Value column is used for the primary trading calculations and charting.'''
def __init__(self):
# Define ValueColumnName: cannot be None, Empty or non-existant column name
# If ValueColumnName is "Close", do not use PythonQuandl, use Quandl: