| Overall Statistics |
|
Total Trades 2 Average Win 0% Average Loss -47.40% Compounding Annual Return -93.650% Drawdown 66.400% Expectancy -1 Net Profit -63.642% Sharpe Ratio -1.435 Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha -2.796 Beta 63.811 Annual Standard Deviation 1.083 Annual Variance 1.173 Information Ratio -1.453 Tracking Error 1.083 Treynor Ratio -0.024 Total Fees $2.91 |
class JNKDataError(QCAlgorithm):
def Initialize(self):
self.SetStartDate(2019, 1, 1) # Set Start Date
self.SetCash(100000) # Set Strategy Cash
self.AddEquity("JNK", Resolution.Daily)
def OnData(self, data):
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.
Arguments:
data: Slice object keyed by symbol containing the stock data
'''
if not self.Portfolio.Invested:
self.SetHoldings("JNK", 1)