| Overall Statistics |
|
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 0% Drawdown 510.900% Expectancy 0 Net Profit -538.202% Sharpe Ratio -0.037 Probabilistic Sharpe Ratio 1.027% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.62 Beta -0.698 Annual Standard Deviation 27.395 Annual Variance 750.461 Information Ratio -0.056 Tracking Error 27.419 Treynor Ratio 1.433 Total Fees $17.92 Estimated Strategy Capacity $30.00 |
class UncoupledCalibratedAntennaArray(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2018,4,1)
self.SetEndDate(2021,1,1)
self.SetCash(100000)
self.Portfolio.SetCash("USD", 10000, Decimal(1.1))
self.SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Cash)
symb = Symbol.Create('BATUSD', SecurityType.Crypto, Market.Bitfinex)
crypto = self.AddCrypto(symb, Resolution.Hour, Market.Bitfinex)
def OnData(self, data):
symbol = 'BATUSD'
if not self.Portfolio.Invested:
#self.MarketOrder(symbol, 1, False, str(self.Securities[symbol].Price))
#self.stopMarketTicket = self.StopMarketOrder(symbol, -1, -2, str(self.Securities[symbol].Price))
self.SetHoldings(symbol, 0.9)
def OnEndOfAlgorithm(self):
self.Debug("Algorithm finished, Equity: " + str(self.Portfolio.TotalPortfolioValue))
self.Debug("Holdings" + str(self.Portfolio.TotalHoldingsValue))
self.Debug("Remaining:" + str(self.Portfolio.CashBook['USD'].Amount))
self.Debug('Amount:' + str(self.Portfolio['BATUSD'].Quantity) + "Price:" + str(self.Portfolio['BATUSD'].Price) + "Value:" +
str(self.Portfolio['BATUSD'].Quantity * self.Portfolio['BATUSD'].Price ) + "Unrealized:" + str(self.Portfolio['BATUSD'].UnrealizedProfit))