Overall Statistics |
Total Trades 3 Average Win 0% Average Loss 0% Compounding Annual Return -12.180% Drawdown 0.600% Expectancy 0 Net Profit -0.179% Sharpe Ratio -1.358 Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0 Beta -6.446 Annual Standard Deviation 0.055 Annual Variance 0.003 Information Ratio -1.569 Tracking Error 0.055 Treynor Ratio 0.011 Total Fees $0.00 |
class fxUniverseExample(QCAlgorithm): def Initialize(self): self.SetStartDate(2013,10, 7) # Set Start Date self.SetEndDate(2013,10,11) # Set End Date self.SetCash(100000) # Set Strategy Cash self.fxPairs = ["EURUSD","GBPUSD","AUDUSD"] # Set Universe self.UniverseSettings.Resolution = Resolution.Daily self.AddUniverse(self.fxPairsUniverse) def fxPairsUniverse(self, coarse): return [Symbol.Create(ticker, SecurityType.Forex, Market.FXCM) for ticker in self.fxPairs] def OnData(self, data): # Buy the fx pairs, use equal weights activeSec = [x.Key for x in self.ActiveSecurities] for symbol in activeSec: self.SetHoldings(symbol,1/len(self.fxPairs)) # Ignites when security is added to universe def OnSecuritiesChanged(self, changes): self._changes = changes