Overall Statistics |
Total Orders 2 Average Win 0% Average Loss -22.29% Compounding Annual Return 2.055% Drawdown 37.800% Expectancy -1 Start Equity 100000 End Equity 108845.35 Net Profit 8.845% Sharpe Ratio -0.038 Sortino Ratio -0.045 Probabilistic Sharpe Ratio 2.077% Loss Rate 100% Win Rate 0% Profit-Loss Ratio 0 Alpha -0.056 Beta 0.55 Annual Standard Deviation 0.143 Annual Variance 0.02 Information Ratio -0.713 Tracking Error 0.136 Treynor Ratio -0.01 Total Fees $3.74 Estimated Strategy Capacity $2400000000.00 Lowest Capacity Asset SPY R735QTJ8XC9X Portfolio Turnover 0.24% |
from AlgorithmImports import * class EODHDMacroIndicatorsAlgorithm(QCAlgorithm): def Initialize(self): self.set_start_date(2020, 10, 7) self.equity_symbol = self.add_equity("SPY", Resolution.Daily).symbol ticker = EODHD.MacroIndicators.UnitedStates.GDP_GROWTH_ANNUAL self.dataset_symbol = self.add_data(EODHDMacroIndicators, ticker).Symbol def OnData(self, slice): indicators = slice.get(EODHDMacroIndicators).get(self.dataset_symbol) if indicators: gdp = indicators.data[0].value self.SetHoldings(self.equity_symbol, 1 if gdp > 0 else -1)