Overall Statistics |
Total Orders 3 Average Win 0.78% Average Loss 0% Compounding Annual Return 30.591% Drawdown 43.800% Expectancy 0 Start Equity 100000 End Equity 2167678.29 Net Profit 2067.678% Sharpe Ratio 0.957 Sortino Ratio 1.092 Probabilistic Sharpe Ratio 34.708% Loss Rate 0% Win Rate 100% Profit-Loss Ratio 0 Alpha 0.117 Beta 1.09 Annual Standard Deviation 0.235 Annual Variance 0.055 Information Ratio 0.711 Tracking Error 0.176 Treynor Ratio 0.206 Total Fees $80.48 Estimated Strategy Capacity $48000000.00 Lowest Capacity Asset AAPL R735QTJ8XC9X Portfolio Turnover 0.02% |
from AlgorithmImports import * class BrainCompanyFilingNLPDataAlgorithm(QCAlgorithm): def initialize(self): self.set_start_date(2010, 1, 1) self.set_end_date(2021, 7, 8) self.set_cash(100000) # Requesting data self.aapl = self.add_equity("AAPL", Resolution.DAILY).symbol self.dataset_symbol = self.add_data(BrainCompanyFilingLanguageMetrics10K , self.aapl).symbol # Historical data history = self.history(self.dataset_symbol, 365, Resolution.DAILY) self.debug(f"We got {len(history)} items from our history request for {self.dataset_symbol}") def on_data(self, data): if data.contains_key(self.dataset_symbol): sentiment = data[self.dataset_symbol].report_sentiment.sentiment self.set_holdings(self.aapl, int(sentiment > 0))