Overall Statistics |
Total Trades 9012 Average Win 0.04% Average Loss -0.03% Compounding Annual Return 9.407% Drawdown 29.700% Expectancy 1.338 Net Profit 467.223% Sharpe Ratio 0.826 Probabilistic Sharpe Ratio 14.588% Loss Rate 13% Win Rate 87% Profit-Loss Ratio 1.68 Alpha 0 Beta 0 Annual Standard Deviation 0.082 Annual Variance 0.007 Information Ratio 0.826 Tracking Error 0.082 Treynor Ratio 0 Total Fees $9019.21 Estimated Strategy Capacity $98000000.00 Lowest Capacity Asset TLT SGNKIKYGE9NP |
namespace QuantConnect{ public static class Module { public class YourLife : QCAlgorithm { int INITIAL_AGE; DateTime start; public override void Initialize() { this.start = new DateTime(2002, 9, 1); // Your initial age in 2002: this.INITIAL_AGE = 35; this.SetStartDate(this.start); this.SetCash(100000); this.AddEquity("SPY", Resolution.Daily); this.AddEquity("TLT", Resolution.Daily); this.SetBrokerageModel(BrokerageName.InteractiveBrokersBrokerage, AccountType.Cash); } public virtual void OnData(object data) { // Your age since simulation start, in days and years: var your_age = (this.Time - this.start).TotalDays; var your_years = your_age / 365 + this.INITIAL_AGE; var ratio = (100 - your_years) / 100; this.SetHoldings("SPY", ratio); this.SetHoldings("TLT", 1 - ratio); } } } }