Overall Statistics
Total Trades
1
Average Win
0%
Average Loss
0%
Compounding Annual Return
2.891%
Drawdown
18.200%
Expectancy
0
Net Profit
1.578%
Sharpe Ratio
0.253
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
-0.21
Beta
13.082
Annual Standard Deviation
0.155
Annual Variance
0.024
Information Ratio
0.13
Tracking Error
0.155
Treynor Ratio
0.003
Total Fees
$0.00
import numpy as np

class BasicTemplateAldgorithm(QCAlgorithm):

    def Initialize(self):
        self.SetCash(100000)
        self.SetStartDate(2018,1,1)
        self.SetEndDate(2018,7,21)
        self.SetBrokerageModel(BrokerageName.OandaBrokerage)
        # Add assets you'd like to see
        self.corn = self.AddCfd("CORNUSD", Resolution.Minute).Symbol

    def OnData(self, slice):
        # Simple buy and hold template
        if not self.Portfolio.Invested:
            self.SetHoldings(self.corn, 1)