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
-6.935
Tracking Error
0.136
Treynor Ratio
0
Total Fees
$0.00
Estimated Strategy Capacity
$0
Lowest Capacity Asset
#region imports
from AlgorithmImports import *
#endregion
# https://quantpedia.com/Screener/Details/1
# Use 5 ETFs (SPY - US stocks, EFA - foreign stocks, BND - bonds, VNQ - REITs, 
# GSG - commodities), equal weight the portfolio. Hold asset class ETF only when 
# it is over its 10 month Simple Moving Average, otherwise stay in cash.

import numpy as np
from datetime import datetime

class BasicTemplateAlgorithm(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2023, 1, 1)  
        self.SetEndDate(datetime.now())    
        self.SetCash(100000)           
        self.data = {}
        period = 20
        self.SetWarmUp(period)
        self.symbols = ["TWTR","NFLX","GOOGL","AAPL","F","AET","CATTWTR","NFLX","GOOGL","AAPL","F","AET","CAT","TSLA","IBM","BA","SBUX","GE","MMM","C","BAC","CVX","PHM","LUV","SLB","PFE","WMT","AXP","XOM","TSLA","IBM","BA","SBUX","GE","MMM","C","BAC","CVX","PHM","LUV","SLB","PFE","WMT","AXP","XOM"]
        for symbol in self.symbols:
            self.AddEquity(symbol, Resolution.Daily)
            self.data[symbol] = self.KER(symbol, period, Resolution.Daily)
            

    def OnData(self, data):
        if self.IsWarmingUp: return
        noises = {}
        for symbol, ker in self.data.items():
                noises[symbol]= ker.Current.Value
            
        
        for symbol in noises:
            self.Log("value of noise of "+str(symbol)+ "is:"+str(noises[symbol]))