| Overall Statistics |
|
Total Trades 447 Average Win 0.14% Average Loss -0.14% Compounding Annual Return 4.239% Drawdown 26.500% Expectancy 0.693 Net Profit 42.713% Sharpe Ratio 0.447 Probabilistic Sharpe Ratio 5.397% Loss Rate 15% Win Rate 85% Profit-Loss Ratio 0.99 Alpha -0.035 Beta 0.591 Annual Standard Deviation 0.109 Annual Variance 0.012 Information Ratio -1.119 Tracking Error 0.083 Treynor Ratio 0.083 Total Fees $454.27 |
'''An implementation of Meb Faber's base model: Global Tactical Asset Allocation model (GTAA)(5)
Buy&Hold portfolio (monthly rebalance), as found in the paper:
"A Quantitative Approach to Tactical Asset Allocation" published May 2006.
'''
class GlobalTacticalAssetAllocationBase(QCAlgorithm):
def Initialize(self):
backtestDuration = 365*10
self.SetStartDate(2011, 10, 29) # (datetime.now() - timedelta(backtestDuration))
self.SetEndDate(2020, 5, 20) # (datetime.now())
self.SetCash(100000)
self.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Margin)
self.UniverseSettings.Resolution = Resolution.Minute
symbols = [Symbol.Create(ticker, SecurityType.Equity, Market.USA)
for ticker in [ "SPY", # US Large Cap ETF
"VEA", # Developed Foreign Stocks (TradedSince: 2007/8)ETF
"IEF", # US 10Y Gov.Bonds ETF
"DBC", # GSCI Commodities ETF (TradedSince: 2006/3)
"VNQ" # US RealEstate ETF
]]
self.AddUniverseSelection(ManualUniverseSelectionModel(symbols))
self.AddAlpha(ConstantAlphaModel(InsightType.Price, InsightDirection.Up, timedelta(days = backtestDuration), None, None))
self.Settings.RebalancePortfolioOnInsightChanges = False
self.Settings.RebalancePortfolioOnSecurityChanges = False
self.SetPortfolioConstruction( EqualWeightingPortfolioConstructionModel(self.DateRules.MonthStart("SPY")) )
self.SetExecution( ImmediateExecutionModel() )
self.AddRiskManagement( NullRiskManagementModel() )