We are pioneering the radical future for open-source quant finance. QuantConnect is the world's largest quant community, empowering 220,000 quants with a framework, data, and infrastructure for their investments.
43.419Net Profit
9.285PSR
0.254Sharpe Ratio
-0.021Alpha
0.84Beta
8.337CAR
22.8Drawdown
0Loss Rate
6Parameters
1Security Types
0.302Sortino Ratio
1129Tradeable Dates
3Trades
0.041Treynor Ratio
0Win Rate
1.344Net Profit
38.742PSR
-6.068Sharpe Ratio
-0.053Alpha
0.053Beta
0.931CAR
1.2Drawdown
0Loss Rate
4Parameters
1Security Types
-6.225Sortino Ratio
360Tradeable Dates
1Trades
-0.912Treynor Ratio
0Win Rate
6.546Net Profit
15.74PSR
-0.191Sharpe Ratio
-0.08Alpha
0.635Beta
4.309CAR
17Drawdown
0Loss Rate
7Parameters
1Security Types
-0.187Sortino Ratio
375Tradeable Dates
3Trades
-0.031Treynor Ratio
0Win Rate
15.702Net Profit
27.574PSR
0.182Sharpe Ratio
-0.048Alpha
0.739Beta
10.19CAR
17.7Drawdown
0Loss Rate
6Parameters
1Security Types
0.197Sortino Ratio
375Tradeable Dates
3Trades
0.03Treynor Ratio
0Win Rate
43.092Net Profit
37.298PSR
0.646Sharpe Ratio
0.014Alpha
1.54Beta
26.902CAR
31.4Drawdown
25Loss Rate
5Parameters
1Security Types
0.747Sortino Ratio
0Tradeable Dates
21Trades
0.104Treynor Ratio
75Win Rate
Derek left a comment in the discussion Research book not saved
CTRL + S
Derek left a comment in the discussion BTCUSD, Minute The issue starts from Jun 16th, 2024 12:00 AM; and continues until Sep 5th, 2024 12:00 AM
Same issue with ETH, LINK, and DOGE
Derek left a comment in the discussion How to get quantconnect data inside a custom data class?
https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/globals-and-statics#03-API-Acce...
Derek left a comment in the discussion Reimagining the 60-40 Portfolio in an Era of AI and Falling Rates
To check the asset classes that each brokerage supports, see this page:...
43.419Net Profit
9.285PSR
0.254Sharpe Ratio
-0.021Alpha
0.84Beta
8.337CAR
22.8Drawdown
0Loss Rate
6Parameters
1Security Types
0.302Sortino Ratio
1129Tradeable Dates
3Trades
0.041Treynor Ratio
0Win Rate
1.344Net Profit
38.742PSR
-6.068Sharpe Ratio
-0.053Alpha
0.053Beta
0.931CAR
1.2Drawdown
0Loss Rate
4Parameters
1Security Types
-6.225Sortino Ratio
360Tradeable Dates
1Trades
-0.912Treynor Ratio
0Win Rate
6.546Net Profit
15.74PSR
-0.191Sharpe Ratio
-0.08Alpha
0.635Beta
4.309CAR
17Drawdown
0Loss Rate
7Parameters
1Security Types
-0.187Sortino Ratio
375Tradeable Dates
3Trades
-0.031Treynor Ratio
0Win Rate
15.702Net Profit
27.574PSR
0.182Sharpe Ratio
-0.048Alpha
0.739Beta
10.19CAR
17.7Drawdown
0Loss Rate
6Parameters
1Security Types
0.197Sortino Ratio
375Tradeable Dates
3Trades
0.03Treynor Ratio
0Win Rate
43.092Net Profit
37.298PSR
0.646Sharpe Ratio
0.014Alpha
1.54Beta
26.902CAR
31.4Drawdown
25Loss Rate
5Parameters
1Security Types
0.747Sortino Ratio
0Tradeable Dates
21Trades
0.104Treynor Ratio
75Win Rate
28.533Net Profit
27.586PSR
0.417Sharpe Ratio
-0.04Alpha
1.458Beta
18.164CAR
31.6Drawdown
34Loss Rate
5Parameters
1Security Types
0.48Sortino Ratio
0Tradeable Dates
147Trades
0.068Treynor Ratio
66Win Rate
35.191Net Profit
33.118PSR
0.535Sharpe Ratio
-0.008Alpha
1.4Beta
22.199CAR
32Drawdown
33Loss Rate
5Parameters
1Security Types
0.64Sortino Ratio
0Tradeable Dates
574Trades
0.09Treynor Ratio
67Win Rate
17.104Net Profit
19.876PSR
0.215Sharpe Ratio
-0.078Alpha
1.361Beta
11.069CAR
31.2Drawdown
38Loss Rate
5Parameters
1Security Types
0.245Sortino Ratio
0Tradeable Dates
1819Trades
0.038Treynor Ratio
62Win Rate
-7.51Net Profit
0PSR
-1.243Sharpe Ratio
-0.034Alpha
0.066Beta
-0.799CAR
14.3Drawdown
-0.07Loss Rate
12Parameters
0Security Types
2446Tradeable Dates
10686Trades
-0.437Treynor Ratio
0.07Win Rate
-32.248Net Profit
0.808PSR
-0.867Sharpe Ratio
-0.086Alpha
-1.538Beta
-24.088CAR
37.7Drawdown
100Loss Rate
4Parameters
1Security Types
-1.06Sortino Ratio
354Tradeable Dates
3Trades
0.133Treynor Ratio
0Win Rate
1.241Net Profit
35.991PSR
-6.07Sharpe Ratio
-0.053Alpha
0.053Beta
0.877CAR
1.2Drawdown
0Loss Rate
4Parameters
1Security Types
-6.247Sortino Ratio
354Tradeable Dates
1Trades
-0.92Treynor Ratio
0Win Rate
4368.38Net Profit
38.76PSR
1.228Sharpe Ratio
0.699Alpha
1.5Beta
80.85CAR
84.3Drawdown
49Loss Rate
55Parameters
2Security Types
1.877Sortino Ratio
1996Tradeable Dates
478Trades
0.561Treynor Ratio
51Win Rate
3464.14Net Profit
33.947PSR
1.164Sharpe Ratio
0.666Alpha
1.514Beta
74.615CAR
84.9Drawdown
51Loss Rate
59Parameters
2Security Types
1.76Sortino Ratio
1996Tradeable Dates
476Trades
0.536Treynor Ratio
49Win Rate
0.618Net Profit
44.235PSR
0.326Sharpe Ratio
1.445Alpha
-2.461Beta
13.298CAR
7Drawdown
0Loss Rate
9Parameters
0Security Types
12Tradeable Dates
2Trades
-0.043Treynor Ratio
0Win Rate
6.489Net Profit
98.67PSR
11.695Sharpe Ratio
0.994Alpha
0.956Beta
257.866CAR
3Drawdown
0Loss Rate
6Parameters
0Security Types
12Tradeable Dates
2Trades
1.584Treynor Ratio
0Win Rate
4.27Net Profit
100PSR
14.698Sharpe Ratio
0.868Alpha
-0.095Beta
133.461CAR
0.7Drawdown
0Loss Rate
8Parameters
0Security Types
12Tradeable Dates
2Trades
-8.626Treynor Ratio
0Win Rate
-7.51Net Profit
0PSR
-1.243Sharpe Ratio
-0.034Alpha
0.066Beta
-0.799CAR
14.3Drawdown
-0.07Loss Rate
12Parameters
0Security Types
2446Tradeable Dates
10686Trades
-0.437Treynor Ratio
0.07Win Rate
-7.51Net Profit
0PSR
-1.243Sharpe Ratio
-0.034Alpha
0.066Beta
-0.799CAR
14.3Drawdown
-0.07Loss Rate
12Parameters
0Security Types
2446Tradeable Dates
10686Trades
-0.437Treynor Ratio
0.07Win Rate
8.419Net Profit
0.637PSR
-1.033Sharpe Ratio
-0.021Alpha
0.049Beta
0.834CAR
3.5Drawdown
-0.08Loss Rate
19Parameters
0Security Types
3552Tradeable Dates
3936Trades
-0.363Treynor Ratio
0.08Win Rate
-0.461Net Profit
0.008PSR
-1.015Sharpe Ratio
-0.029Alpha
0.078Beta
-0.047CAR
7.1Drawdown
-0.07Loss Rate
16Parameters
0Security Types
2446Tradeable Dates
10540Trades
-0.302Treynor Ratio
0.06Win Rate
-0.461Net Profit
0.008PSR
-1.015Sharpe Ratio
-0.029Alpha
0.078Beta
-0.047CAR
7.1Drawdown
-0.07Loss Rate
16Parameters
0Security Types
2446Tradeable Dates
10540Trades
-0.302Treynor Ratio
0.06Win Rate
2.113Net Profit
0.036PSR
-1.32Sharpe Ratio
-0.025Alpha
0.038Beta
0.215CAR
5.9Drawdown
-0.09Loss Rate
17Parameters
0Security Types
3552Tradeable Dates
4060Trades
-0.575Treynor Ratio
0.08Win Rate
-7.51Net Profit
0PSR
-1.244Sharpe Ratio
-0.034Alpha
0.066Beta
-0.799CAR
14.3Drawdown
-0.07Loss Rate
17Parameters
0Security Types
3552Tradeable Dates
10686Trades
-0.437Treynor Ratio
0.07Win Rate
80.541Net Profit
4.266PSR
0.27Sharpe Ratio
-0.001Alpha
0.326Beta
6.257CAR
18.8Drawdown
-2.86Loss Rate
14Parameters
0Security Types
3552Tradeable Dates
58Trades
0.071Treynor Ratio
5.3Win Rate
757.079Net Profit
67.463PSR
1.179Sharpe Ratio
0.279Alpha
-0.064Beta
42.985CAR
25.2Drawdown
-0.32Loss Rate
45Parameters
0Security Types
1549Tradeable Dates
9128Trades
-4.292Treynor Ratio
0.61Win Rate
10879.371Net Profit
64.409PSR
1.582Sharpe Ratio
1.031Alpha
-0.192Beta
118.587CAR
59Drawdown
-0.81Loss Rate
28Parameters
0Security Types
1550Tradeable Dates
11198Trades
-5.294Treynor Ratio
1.62Win Rate
51.754Net Profit
1.639PSR
0.244Sharpe Ratio
0.116Alpha
-0.155Beta
7.189CAR
43.5Drawdown
-0.94Loss Rate
25Parameters
0Security Types
1549Tradeable Dates
5765Trades
-0.676Treynor Ratio
1.81Win Rate
3633.461Net Profit
43.031PSR
1.225Sharpe Ratio
0.767Alpha
-0.329Beta
82.667CAR
58.7Drawdown
-2.2Loss Rate
24Parameters
0Security Types
1549Tradeable Dates
3050Trades
-2.254Treynor Ratio
4.29Win Rate
212.837Net Profit
70.75PSR
1.015Sharpe Ratio
0.123Alpha
-0.043Beta
20.907CAR
14.5Drawdown
-0.47Loss Rate
21Parameters
0Security Types
1510Tradeable Dates
2679Trades
-2.755Treynor Ratio
0.91Win Rate
3633.461Net Profit
43.031PSR
1.225Sharpe Ratio
0.767Alpha
-0.329Beta
82.667CAR
58.7Drawdown
-2.2Loss Rate
25Parameters
0Security Types
1549Tradeable Dates
3050Trades
-2.254Treynor Ratio
4.29Win Rate
Derek left a comment in the discussion How to pull equity curve/portfolio equity value from backtest
We updated the tutorial here to fix the code:...
Derek left a comment in the discussion Research book not saved
CTRL + S
Derek left a comment in the discussion BTCUSD, Minute The issue starts from Jun 16th, 2024 12:00 AM; and continues until Sep 5th, 2024 12:00 AM
Same issue with ETH, LINK, and DOGE
Derek left a comment in the discussion How to get quantconnect data inside a custom data class?
https://www.quantconnect.com/docs/v2/writing-algorithms/key-concepts/globals-and-statics#03-API-Acce...
Derek left a comment in the discussion Reimagining the 60-40 Portfolio in an Era of AI and Falling Rates
To check the asset classes that each brokerage supports, see this page:...
Derek left a comment in the discussion Opening Range Breakout for Stocks in Play
... and to increase the execution speed.
Derek submitted the research Reimagining the 60-40 Portfolio in an Era of AI and Falling Rates
During the initial outbreak of the COVID March 2020 the safety that the 60-40 stock-bonds portfolio offered seemed to break down, leading investors to seek new uncorrelated assets to hedge portfolios in times of crisis. This micro-study aims to determine the new 60-40 portfolio, as the interest from idle cash starts to diminish. It uses machine learning to select and weight portfolio assets based on the magnitude of the predicted returns. The strategy uses machine learning and economic factors to manage a portfolio of risk-on and risk-off assets. The algorithm rebalances the portfolio at the start of every month. During each rebalance, it allocates a portion of the portfolio to each asset the regression model predicts will have a positive return over the following month, scaling the positions based on the magnitude of the predicted returns.
Derek submitted the research Bitcoin as a Leading Indicator
This research explores Bitcoin's role as a leading indicator for US Equity market turbulence. Bitcoin, classically a risk-on asset that trades 24/7, can signal crises in other markets due to its liquidity and volatility. The study demonstrates a trading strategy using the LEAN engine, rotating capital between US Equities and cash based on Bitcoin's price action. When Bitcoin drops two standard deviations below its two-year moving average, the strategy shifts to cash, enhancing risk-adjusted returns for long-term investors.
Derek submitted the research Copying Congress Trades
This research explores a trading algorithm that mimics trades made by U.S. Congress members, leveraging their privileged access to market-moving information. The Stop Trading on Congressional Knowledge (STOCK) Act mandates disclosure of such trades, enabling public access. Using the Quiver Quantitative dataset, the algorithm employs an inverse-volatility weighting scheme to balance risk across assets, limiting individual asset exposure to 10% to mitigate concentration risk. By forming a portfolio based on these disclosures, the strategy aims to capitalize on the informational advantage indirectly.
Derek submitted the research Automating the Wheel Strategy
The Wheel strategy is a popular options trading approach that generates steady income from equities intended for long-term holding. It involves selling cash-secured puts and covered calls. Initially, out-of-the-money (OTM) puts are sold until shares are assigned. Once shares are held, OTM covered calls are sold until exercised. This strategy generates income through premiums from option sales. The underlying equity should be one the trader is comfortable owning. For implementation, SPY was used as the underlying asset, chosen for its stability and long-term hold potential. The strategy offers built-in risk management and downside protection by effectively managing option assignments and sales.
Derek submitted the research Probabilistic Sharpe Ratio
The Probabilistic Sharpe Ratio (PSR) is a method for evaluating investment performance that takes into account the non-normality of returns. The traditional Sharpe ratio assumes that returns are normally distributed, which can lead to misleading results for strategies with non-normal returns. The PSR addresses this limitation by considering the distribution of returns and estimating the probability that a given Sharpe ratio is a result of skill rather than luck. This provides a more accurate measure of a strategy's performance and allows for better comparisons between different strategies. The PSR is particularly useful for strategies with non-normal returns, as it takes into account the impact of skewness and kurtosis on the statistical significance of the observed Sharpe ratio.
Derek submitted the research Head & Shoulders TA Pattern Detection
This discussion focuses on the detection of the head and shoulders pattern in technical analysis. While technical analysis traders commonly use graphical patterns to identify trading opportunities, quant traders tend to overlook them due to subjectivity and difficulty in accurate detection. However, this tutorial presents a method to programmatically detect the head and shoulders pattern in an event-driven trading algorithm. The algorithm achieves greater risk-adjusted returns than the benchmarks during the backtesting period. The head and shoulders pattern consists of two shoulders, a tall head, and a neckline. It is believed to signal a bullish-to-bearish trend reversal. Further research can include testing other technical patterns, adjusting algorithm parameters, exploring new position sizing techniques, implementing different exit strategies, and incorporating risk management for corporate actions.
Derek submitted the research Futures Fast Trend Following, with Trend Strength
This research focuses on Futures Fast Trend Following strategies that can be applied to both long and short positions, taking into account the strength of the trend. The purpose of the research is to explore the effectiveness of these strategies and their potential implications for trading in the futures market. The research utilizes various methods to analyze historical data and identify trends, and the key findings highlight the profitability and consistency of the trend following strategies. The implications of the research suggest that these strategies can be valuable tools for traders seeking to capitalize on trends in the futures market.
Derek submitted the research Combined Carry and Trend
This research is a re-creation of strategy #11 from Advanced Futures Trading Strategies (Carver, 2023) that combines carry and trend strategies in futures trading. The algorithm incorporates exponential moving average crossover (EMAC) trend forecasts and carry forecasts to form a diversified portfolio. The results show that using both styles of strategies can improve risk-adjusted returns. Additionally, the research provides a background on how carry returns are calculated for different asset classes and how the strategy calculates and smooths carry from different future contracts.
Derek submitted the research Sector Rotation Based On News Sentiment
Abstract: This tutorial explores a sector rotation strategy based on news sentiment using the LEAN algorithmic trading engine and datasets from the QuantConnect Dataset Market. The strategy involves monitoring the news sentiment for 25 different sector Exchange Traded Funds (ETFs) and periodically rebalancing the portfolio to maximize exposure to sectors with the highest public sentiment. Backtesting results demonstrate that the strategy consistently outperforms benchmark approaches. The tutorial provides details on universe selection, implementation, and presents equity curves and Sharpe ratios for different versions of the strategy and benchmarks. To replicate the results, users are encouraged to clone and backtest each algorithm.
Derek submitted the research Country Rotation Based On Regulatory Alerts Sentiment
Abstract: This tutorial explores four alternative data strategies that utilize the US Regulatory Alerts dataset to make trading decisions. The strategies include capitalizing on movement in the healthcare sector in response to FDA announcements, capturing momentum in the Bitcoin-USD trading pair based on new Crypto regulations, exploiting trading patterns in the SPY based on specific regulatory alerts, and a country rotation strategy using NLP to detect sentiment in country ETFs. The results show that all four strategies outperform their respective benchmarks. The tutorial also discusses NLP and its role in trading strategies, as well as the implementation of the four strategies using the LEAN algorithmic trading engine.
Derek submitted the research Detecting Impactful News In ETF Constituents
Abstract: This tutorial focuses on utilizing natural language processing (NLP) to detect impactful news in ETF constituents. Building upon a previous NLP strategy, we monitor the Tiingo News Feed to determine intraday news sentiment of the largest constituents in the Nasdaq-100 index, while avoiding look-ahead bias. The results indicate that this strategy has experienced lower risk-adjusted returns compared to the QQQ ETF over the past two years. The tutorial discusses the implementation of this strategy as a framework algorithm using the LEAN trading engine, including universe selection and portfolio construction. Backtesting results show a Sharpe ratio of -0.659, with comparisons to other benchmarks provided.
Derek started the discussion Plot Backtest Trade Fills in the Research Environment
Hi everyone!
Derek started the discussion New Insight Manager and Updates for Risk Management Models
Hi everyone,
Derek submitted the research Momentum In Mutual Fund Returns
This discussion focuses on the momentum in mutual fund returns and the use of net asset value (NAV) as a predictor of future returns. The study suggests that historical returns and the proximity of NAV to a previous high can provide predictive power. The tutorial uses asset management firms' share prices as a proxy for fund performance and NAV. The performance of this trading strategy is compared to buying-and-holding the S&P 500 index ETF. The strategy generally has a lower Sharpe ratio than the benchmark, except during the 2020 stock market crash where it significantly outperformed with a Sharpe ratio of 9.3. The strategy also demonstrates more consistent returns compared to the benchmark across different testing periods.
Derek submitted the research Intraday ETF Momentum
This tutorial implements an intraday momentum strategy for trading actively traded ETFs. The strategy predicts the sign of the last half-hour return based on the return generated in the first half-hour of the trading day. The algorithm is a recreation of the research conducted by Gao, Han, Li, and Zhou (2017), which found that this momentum pattern is statistically and economically significant. The tutorial provides background information on the characteristics of the opening and closing periods of trading, as well as the selection of ETFs for the strategy. The conclusion states that the momentum pattern produces lower returns compared to the S&P 500 benchmark, but outperforms the benchmark during the downfall of the 2020 crash.
Derek submitted the research Ichimoku Clouds In The Energy Sector
Derek submitted the research Intraday Arbitrage Between Index ETFs
Derek submitted the research Gradient Boosting Model
This tutorial focuses on training a Gradient Boosting Model (GBM) to forecast intraday price movements of the SPY ETF using technical indicators. The implementation is based on research by Zhou et al (2013), who found that a GBM produced a high annualized Sharpe ratio. However, the tutorial's research shows that the model underperforms the SPY with its current parameter set during a 5-year backtest. The tutorial concludes by suggesting potential areas of further research to improve the model's performance. The GBM is trained by iteratively building regression trees to predict pseudo-residuals and making predictions based on the learning rate and regression tree outputs. Technical indicator values are used as inputs, and the mean squared error loss function is used to assess the model's performance.
Derek submitted the research Using News Sentiment To Predict Price Direction Of Drug Manufacturers
Abstract: This tutorial explores the use of news sentiment to predict the price direction of drug manufacturers. By implementing an intraday strategy, we aim to capitalize on the upward drift in stock prices following positive news releases. Our findings show that combining this effect with the day-of-the-week anomaly can lead to profitable trading during the 2020 stock market crash. However, our algorithm underperforms the S&P 500 market index ETF, SPY, during the same period. The algorithm is inspired by the work of Isah, Shah, & Zulkernine (2018). We conclude that while the sentiment analysis strategy may not provide accurate results in the US drug manufacturing industry, profitability can be achieved by restricting trading to the most profitable day of the week. The strategy produces a negative Sharpe ratio of -1.
Derek submitted the research Gaussian Naive Bayes Model
Abstract: This discussion focuses on the Gaussian Naïve Bayes (GNB) model and its application in forecasting the daily returns of stocks in the technology sector. The GNB model is trained using historical returns of the sector and compared to the performance of the SPY ETF over a 5-year backtest and during the 2020 stock market crash. The implementation of the GNB model shows a higher Sharpe ratio and lower variance compared to the SPY ETF. The algorithm used in this discussion is based on previous research and follows the principles of Naïve Bayes models. The GNB model assumes independence and normal distribution of feature vectors.
Derek submitted the research Sortino Portfolio Optimization with Alpha Streams Algorithms
QuantConnect provides trading infrastructure and data for quants to develop and deploy algorithmic trading strategies. They offer the Alpha Streams platform for quants to license their proprietary signals to investors. To assist investors in analyzing the performance of these signals, QuantConnect has released a new notebook that determines the optimal portfolio weights for each alpha, maximizing the portfolio's Sortino ratio. The Sortino ratio measures the strategy's average daily return in excess of a risk-free rate, divided by the standard deviation of negative daily returns. The notebook uses a walk-forward approach to avoid bias and overfitting, and the optimization is done on a rolling monthly basis.
Derek started the discussion Strategy Library Addition: Intraday ETF Momentum
Hi everyone,
Derek started the discussion Strategy Library Addition: Momentum in Mutual Fund Returns
Hi everyone,
Derek started the discussion Strategy Library Addition: Gaussian Naive Bayes Model
Hi everyone,
Derek submitted the research Residual Momentum
Residual momentum is a strategy where stocks with higher monthly residual returns outperform those with lower returns. It has been found to have less exposure to Fama-French factors, higher Sharpe ratios, and better out-of-sample performance compared to total return momentum strategies. Residual momentum is also more stable throughout the business cycle and tends to underperform during trending periods but outperform during reverting periods. This strategy is less concentrated in small-cap stocks, leading to lower trading costs and minimizing the impact of tax-loss selling. The algorithm imports custom data, selects a universe of stocks based on fundamental data and market cap, and rebalances the portfolio monthly by longing the top 10% and shorting the bottom 10% of stocks based on their scores.
QuantConnect Boot Camp is a comprehensive educational program designed to help individuals learn algorithmic trading and quantitative finance using the QuantConnect platform.
Get this certificate by completing QuantConnect Boot Camp Courses
Derek left a comment in the discussion How to pull equity curve/portfolio equity value from backtest
We updated the tutorial here to fix the code:...
20 days ago