Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
7.993%
Drawdown
32.400%
Expectancy
0
Net Profit
54.619%
Sharpe Ratio
0.489
Probabilistic Sharpe Ratio
8.336%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0.083
Beta
-0.019
Annual Standard Deviation
0.164
Annual Variance
0.027
Information Ratio
-0.324
Tracking Error
0.236
Treynor Ratio
-4.127
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
CHRIS/CME_S1.QuandlCustomColumns 2S
class QuandlImporterAlgorithm(QCAlgorithm):

    def Initialize(self):
        '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''
        self.quandlCode = "CHRIS/CME_S1"
        ## Optional argument - personal token necessary for restricted dataset
        # Quandl.SetAuthCode("your-quandl-token")
        self.SetStartDate(2016,1,1)                                 #Set Start Date
        self.SetCash(40000)                                         #Set Strategy Cash
        self.symbol = self.AddData(QuandlCustomColumns, self.quandlCode, Resolution.Daily, TimeZones.NewYork).Symbol

    def OnData(self, data):
        '''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.'''
        if not self.Portfolio.Invested:
            quantity = self.CalculateOrderQuantity(self.symbol, 1.)
            self.MarketOrder(self.symbol, quantity)
        
# Quandl often doesn't use close columns so need to tell LEAN which is the "value" column.
class QuandlCustomColumns(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
        self.ValueColumnName = "Last"