Overall Statistics
Total Trades
0
Average Win
0%
Average Loss
0%
Compounding Annual Return
0%
Drawdown
0%
Expectancy
0
Net Profit
0%
Sharpe Ratio
0
Probabilistic Sharpe Ratio
0%
Loss Rate
0%
Win Rate
0%
Profit-Loss Ratio
0
Alpha
0
Beta
0
Annual Standard Deviation
0
Annual Variance
0
Information Ratio
0
Tracking Error
0
Treynor Ratio
0
Total Fees
$0.00
class WeeklyAlphaCompetitionAlgorithm(QCAlgorithm):

    def Initialize(self):
        
        # The blocked section of code below is to remain UNCHANGED for the weekly competitions. 
        # 
        # Insight-weighting portfolio construction model:
        # - You can change the rebalancing date rules or portfolio bias
        # - For more info see https://github.com/QuantConnect/Lean/blob/master/Algorithm.Framework/Portfolio/InsightWeightingPortfolioConstructionModel.py
        # 
        # Use the Alpha Streams Brokerage Model: 
        # - Developed in conjunction with funds to model their actual fees, costs, etc. Please do not modify other models.
        ###############################################################################################################################
        self.SetStartDate(2015, 3, 1)   # 5 years up to the submission date
        self.SetCash(1000000)           # Set $1m Strategy Cash to trade significant AUM
        self.SetBenchmark('SPY')        # SPY Benchmark
        self.SetBrokerageModel(AlphaStreamsBrokerageModel())  
        self.SetExecution(ImmediateExecutionModel()) 
        self.SetPortfolioConstruction(InsightWeightingPortfolioConstructionModel())
        ###############################################################################################################################
        # Do not change the code above 

        # Add the alpha model and anything else you want below
        self.AddAlpha(MyCompetitionAlphaModel())
        
        # Add a universe selection model
        #

class MyCompetitionAlphaModel:
    
    def __init__(self, *args, **kwargs):
        '''Initializes a new default instance of your Alpha Model class.'''
        pass

    def Update(self, algorithm, data):
        '''Updates this alpha model with the latest data from the algorithm.
        This is called each time the algorithm receives data for subscribed securities
        Args:
            algorithm: The algorithm instance
            data: The new data available
        Returns:
            The new insights generated'''
        insights = []

        # This is where insights are returned, which are then passed to the
        # Portfolio Construction, Risk, and Execution models.
        
        # The following Insight properties MUST be set before returning
        #   - Symbol        -- Secuirty Symbol
        #   - Duration      -- Time duration that the Insight is in effect 
        #   - Direction     -- Direction of predicted price movement 
        #   - Weight        -- Proportion of algorithm capital to be allocated to this Insight

        return insights

    def OnSecuritiesChanged(self, algorithm, changes):
        '''Event fired each time the we add/remove securities from the data feed
        Args:
            algorithm: The algorithm instance that experienced the change in securities
            changes: The security additions and removals from the algorithm'''
        pass