Overall Statistics |
Total Trades 1 Average Win 0% Average Loss 0% Compounding Annual Return 26.479% Drawdown 9.000% Expectancy 0 Net Profit 14.695% Sharpe Ratio 1.85 Probabilistic Sharpe Ratio 73.799% Loss Rate 0% Win Rate 0% Profit-Loss Ratio 0 Alpha 0.138 Beta 0.733 Annual Standard Deviation 0.128 Annual Variance 0.016 Information Ratio 1.107 Tracking Error 0.092 Treynor Ratio 0.323 Total Fees $1.23 |
from QuantConnect.Data.Custom.Fred import * class TachyonQuantumContainmentField(QCAlgorithm): def Initialize(self): self.SetStartDate(2019, 4, 23) self.SetCash(100000) self.aapl = self.AddEquity("AAPL", Resolution.Daily).Symbol self.vix = self.AddData(Fred, Fred.CBOE.VIX).Symbol 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 and data.ContainsKey(self.vix): self.SetHoldings(self.aapl, 0.5)