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 |
using QuantConnect.Data.Custom.Fred; namespace QuantConnect.Algorithm.CSharp { public class ParticleHorizontalAntennaArray : QCAlgorithm { private Symbol _vix; private Symbol _aapl; public override void Initialize() { SetStartDate(2019, 4, 23); SetCash(100000); _aapl = AddEquity("AAPL", Resolution.Daily).Symbol; _vix = AddData<Fred>(Fred.CBOE.VIX).Symbol; } /// OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here. /// Slice object keyed by symbol containing the stock data public override void OnData(Slice data) { if (!Portfolio.Invested && data.ContainsKey(_vix)) { SetHoldings(_aapl, 0.5); } } } }