| Overall Statistics |
|
Total Orders 1950 Average Win 0.03% Average Loss -0.03% Compounding Annual Return -99.994% Drawdown 11.900% Expectancy -0.463 Start Equity 100000 End Equity 88221.01 Net Profit -11.779% Sharpe Ratio -7.031 Sortino Ratio -7.031 Probabilistic Sharpe Ratio 1.356% Loss Rate 72% Win Rate 28% Profit-Loss Ratio 0.95 Alpha -2.263 Beta 0.637 Annual Standard Deviation 0.143 Annual Variance 0.02 Information Ratio -35.875 Tracking Error 0.083 Treynor Ratio -1.579 Total Fees $6695.75 Estimated Strategy Capacity $1900000.00 Lowest Capacity Asset SPY R735QTJ8XC9X Portfolio Turnover 39409.99% Drawdown Recovery 0 |
# region imports
from AlgorithmImports import *
# endregion
class EmotionalYellowGreenDog(QCAlgorithm):
def initialize(self):
# Locally Lean installs free sample data, to download more data please visit https://www.quantconnect.com/docs/v2/lean-cli/datasets/downloading-data
self.set_start_date(2013, 10, 7) # Set Start Date
self.set_end_date(2013, 10, 11) # Set End Date
self.set_cash(100000) # Set Strategy Cash
self.add_equity("SPY", Resolution.MINUTE)
def on_data(self, data: Slice):
"""on_data 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.set_holdings("SPY", 1)
else:
self.liquidate("SPY")