Build Alpha: Basic video explaining and testing Moving Average Convergence Divergence (MACD) on some popular Exchange Traded Funds (ETFs) such as: SPY, QQQ, TLT, GLD and more.
Basic video explaining and testing Relative Strength Index (RSI) on some popular stocks such as: Apple, Google, Nvidia, Boeing, Alibaba, Tesla, Amazon and more…
This is a simple technique that can increase returns per dollar traded. This blog will show an example of a simple strategy to demonstrate the advantages of Rebalance strategies.
The base strategy is quite simple and uses all built-in signals inside of BuildAlpha:
- RSI2 crosses above 15 and 20
- Vix term structure is positive (front two months, contango)
- RSI2 crosses below 95
- $1,000 stop loss (all positions based on $10,000 at time of entry)
The way the Rebalance strategy/filter works is that we first set the rebalance period. Choices are: daily, weekly, monthly, quarterly, and annually. We will use monthly in this example.
We then set the ranking method. Choices are: Profit Factor, Winning Percentage, Average Return, Volatility, Sharpe Ratio, Range Location, Rate of Change, Momentum, and Fip Score (% return * [neg% days – %pos days]). We will use winning percentage in this example.
Also, we will rank SPY and TLT each month based on their winning percentage in the prior month and then apply our simple base RSI2 strategy to ONLY the higher ranked symbol for the next month.
If the same symbol is ranked higher (i.e., permitted to trade) for consecutive months then we would calculate the new position size for the new month and then rebalance the existing position. Hence, the name Rebalance strategies.
For example, if long 1,237 shares of SPY in May, and at the end of May we determine our June symbol is SPY, and our new size should only be 1,200, it would automatically sell 37 shares.
Comparing the results of applying the base RSI2 strategy on both SPY and TLT to the results of applying the base RSI2 strategy on SPY and TLT with the rebalance filter shows significant positive improvement while decreasing the capital at risk while using the rebalance filter. Kind of a big deal!
On the left, you can see if we ‘blindly’ applied the base RSI2 strategy to both SPY and TLT each month. That is, each would have its own $10,000 position each month. The right shows the same RSI2 strategy but only applied to the top ranked symbol based on the previous month or a single $10,000 position.
You can see the rebalance filter and symbol universe ranking provided equal returns while limiting exposure from 2007 to present day.
Again, this is not meant as a standalone strategy or a free alpha giveaway… but a simple example to demonstrate the need to turn over every stone in our testing to uncover alternative ways to reduce risk and exposure. If you are not checking if rebalance filters and cross-sectional momentum can improve your returns… then why not?
In short, the trader can select a basket of symbols, rebalance period, and ranking method then thousands of entry and exit signals. Build Alpha will automatically find the best base strategy to apply to the top (or bottom) N symbols in the selected basket based upon your input.
Of course, all output, including the symbol ranking and rebalancing, can be automated in TradeStation through the code generated from Build Alpha.
I hope this helps demonstrate the power of rebalance strategies and filtering the symbol universe. It is just another arrow in the quiver for savvy systematic traders. If you have any questions, please contact me at firstname.lastname@example.org. Thanks for reading.
Originally Posted: https://easylanguagemastery.com/rebalance-strategies/
A large consideration of developing trading systems should be how efficient our capital is working for us. The quicker we can realize profits, the more trades we can make thus allowing our capital to compound more quickly. Additionally, sitting in positions for long periods increases our risk to extraneous events.
More importantly, it is typically easier to find daily or higher timeframe edges than intraday edges due to the increased noise in intraday data.
Is there a way to reduce the time in a position which would increase our trade count (via number of strategies) which would then allow us to arrive at the law of large numbers more quickly and therefore allow our capital to compound more quickly?
Yep. One of the new features in Build Alpha, called “Intraday Edge”, is a tool which allows us to do exactly that. It allows us to dig deeper into daily trading strategies to see if we can make them more efficient by reducing their holding times into smaller intraday time windows. Maybe we can capture most of the daily strategy’s edge during only a small portion of the typical holding time. That’s right.. turning daily strategies into intraday strategies.
A simple example can help clarify the power of this new feature…
First, let’s take an original daily trading system. I will use a simple one rule strategy that goes long the SP500 futures contract whenever the trading session closes in the bottom 20% of the day’s range (internal bar strength or internal bar rank – IBR in Build Alpha). We then hold that long position for 1 day. This assumes about a 23 hour risk (i.e., one Globex trading session).
However, what if we could dig into this strategy and realize that most of the gains only come from 1 am EST to 4 am EST? We can then reduce our holding time by about 87% which now only ties up our capital for 3 hours as opposed to 23! This gives us an additional 20 hours to utilize other strategies to continue to grow our capital while still capturing a large portion of the original daily strategy’s edge.
Imagine we only had enough capital for one strategy. This Intraday Edge feature can now make our capital work much harder by finding intraday edge strategies for multiple markets/times of the day. Tying up capital for 23 hours in one daily strategy vs. trading 7 different intraday edge strategies with the same capital.
*Original strategy can be reduced by Intraday Edge which allows other intraday strategies to be traded with the same capital that was orignially tied up by the daily strategy*
In the end, it makes our once daily system much more efficient. Check out the performance metrics of the original daily system compared to the new “Intraday Edge” version.
So how can this be accomplished in Build Alpha? It is simple.
- Highlight any daily strategy
- Click the Test Settings in the bottom right to configure the intraday timeframe you want to use
- Hit the Intraday Edge button
BuildAlpha will then search all possible holding periods within the original strategy’s trading duration to see if there is a more efficient version with reduced holding times. You can include the original strategy’s exit criteria such as stops, etc. or choose to exclude them. Flexibility to test everything is always key in Build Alpha.
Intraday Edge can even be used on different markets at the same time. For example, imagine an original system built on Gold daily bars but then we search for an intraday edge version that trades oil but only during this specific 2 hour window while the original Gold System has an active signal.
This Intraday Edge feature essentially allows us to search for intraday and multi-timeframe strategies in a new way. In this above Gold and Oil example we have a multi-timeframe AND intermarket strategy created from a simple Gold daily strategy.
You can still search for multi-timeframe and intraday strategies in the original/traditional way. That is, just searching the intraday data from the start. However, it is often faster and easier to find daily strategies then work them into intraday ones. At least now with Build Alpha you have the option to search both ways. Something not possible elsewhere.
And of course, all of the adjustments from the Intraday Edge feature are then applied to the code generators so you can automate these Intraday Edge systems with one click as with everything.
As always, I will keep attempting to add flexibility and ways to dig deeper so we can have the best trading strategies possible. Leave no stone unturned and test everything!
Thanks for reading,
Originally Posted: https://www.buildalpha.com/intraday-edge/
In short, this is a new feature that allows us to optimize strategies across noise adjusted data series as opposed to the traditional method of optimization which only optimizes across the single historical price series.
The problem we face is the historical data is merely only one possible path of what *could* have happened. We need to prepare ourselves for the probable future not the certain past. In order to do this, we can generate synthetic price series that have altered amounts of noise/volatility than the actual historical data. This provides us with a rough sample of some alternate realities and potentially what can happen going forward. This is the exact type of data that can help us build more robust strategies that can succeed across whatever the market throws at us – which is our end goal in all of this, right?
Let’s look at a Noise Test Parameter Optimization (NTO) case study to show exactly how it works…
I have built a strategy from 2004 to 2016 that does quite well. The strategy’s performance over this period is shown below…
Now, if we right click on the strategy and select optimize, we can generate a sensitivity graph that shows how our strategy performs as we alter some parameters. This is done on the original historical price data with no noise adjusted data sample added (yet). We simply retrade different variations of parameter settings on the single historical price data and plot the respective performances. This is how most platforms allow you to optimize parameters and I want to show how misleading it can be to traders. The rule I’ve optimized had original parameter values of X = 9 and Y = 4 (black arrow). The sensitivity graph is shown below. Each plot consists of three points: parameter 1, parameter 2 and the resulting profit.
Build Alpha: We can see the original parameters are near a sensitive area on the surface where performance degrades in the surrounding areas. Performance drops pretty hard near our original strategy’s parameters which means slight alterations to the future price data’s characteristics can degrade our strategy’s performance quite a bit. Not what we want at all and, as we all know, there will be alterations to future price’s characteristics! How many times has a backtest not matched live results? Perhaps more robust parameter selection can help…
The more robust selection using the typical simple optimization method on the historical data shows we should probably pick a parameter more near X = 8 and Y = 8 (pictured arrow below). This is the traditional method taught in textbooks, trading blogs, etc. We optimize on the single historical data then find a flat/non-peaked area close to our original parameters and use those new parameters.
However, if we run BuildAlpha’s Noise Test Optimization with up to 50% noise alterations and 50 data samples (green box below), we see a much different picture. What this does is, instead of optimizing on one historical path we now optimize across the one historical path AND 50 noise altered data series. The sensitivity graph shows a much different picture when optimized across the 51 data series. We are less concerned with the total profit and loss but rather the shape of the surface…
The Noise Test Optimization (NTO) shows we should actually pick values of X = 8 and Y = 2 (arrow above). This area actually outperforms the ‘robust’ area from the traditional simple one data set optimization that most other platforms and textbooks show. In other words, I am comfortable picking a peaked area of the surface from the NTO results because the peak is true across noise adjusted values and not just a single price series. Secondly, if we fall off this peak then we are still at (or near) the highest level relative to the rest of the surface.
Looking at how all three of these parameter selections performed from 2016-2020 can be quite telling…
The Noise Test Optimization (NTO) returned about $20,000 more profit per contract than the other two methods in this hypothetical case study or about 33% more profit over the same 2016-2020 period. These small adjustments to commonly misused tests can really make a large difference when spread across a portfolio of strategies. It is time to stop using outdated tools. I am not saying each strategy will show NTO results like this, but failing to check is a compounding mistake few of us can afford to make.
Build Alpha also possesses the ability to optimize parameters across a basket of symbols (and their noise adjusted data as well). For example, build a strategy for SPY but optimize it across SPY, QQQ, IWM and DIA.
As always, thanks for reading.
Originally Posted: https://www.buildalpha.com/noise-test-parameter-optimization/
Investment in stocks in such a volatile market nowadays has become a cause of concern and how to manage one’s finances. Most of the people ask their fund managers to invest in quality stocks at this point in time. Which is the best asset class to invest in and how to manage your portfolio? Some people think that investment is the most straightforward aspect of financial planning, whereas nobody knows the correct answer and is debatable. But now, with the advancement of technology, things have become quite more comfortable and if we look at the broader pictures with investing tools like Build Alpha, it is far easier to invest and trade with the best expertise available with you at every point of time.
Investment in the capital markets can be comparatively easier than other asset classes or yield drivers. One should invest smartly and systematically keeping in view the returns on your investment, but most of the investors do it otherwise, and everything is turned around like not placing the upside-down cake correctly, thus the toppings at the bottom scatters. With a tool like Build Alpha now investing activity has become way easier as it gives proper analysis of the trend of the market.
Especially for the new age investors who have just entered the market, they can quickly get the knowledge in the simplified version through this unique tool. It is very user friendly and an easy to access tool that serves just perfect for solving the queries and dilemmas of new as well the experienced traders and investors. Even if you are dealing in the market for long-term, there ought to be something or the other that may bother you or you may not understand as the market is quite volatile and it is quite difficult to depict the pattern well.
Here is where BuildAlpha comes into play by helping you out with that uncertain motions of the market where you fear to take your next steps. As with unpredicted levels and economic uncertainty of course comes a lot of risks. Build Alpha can help you identify these risks to hopefully sidestep them before they affect your portfolio.
Very well written by Warren Buffet, there are lots of ups and downs in the stock market, and one should be patient. That is why he termed the capital market where investing is a no-called-strike game. So now, with this unique and very useful tool, it has become much simpler to invest in the capital markets and earn money, and the same time the fear of losing will be minimized as now you have experienced moves, tested them and are ready for the next one. Therefore, do the research of the markets with the help of Build Alpha before you are interested in investing and before new risks hit the market.
Originally Posted: http://buildalpha.us/make-task-investing-easy/
The recent volatility, like all volatility events, has brought some traders a fortune and others pain.
The ability to identify volatility regimes is paramount!
Correct identification of volatility shifts gives one the ability to adjust size, turn strategies off, enable hedging strategies, etc.
Ideally, a trader should have strategies for every market regime. If one can identify which regime and price action characteristics are likely (or unlikely) then plenty of stress can be removed and a certain level of robustness is added to the trader’s portfolio.
In this post, I want to discuss four ‘volatility identifiers’ that can hopefully be used to either avoid or capitalize on the next volatility event.
These have been powerful indicators to add to trading systems to help decide when on/off, filtering and of course sizing.
Are they a be all end all? No.
Are they predictive? No.
Are they a holy grail? No.
Should you ignore them? No!
I will only examine these volatility regimes based upon tomorrow’s range and tomorrow’s return. They can of course be expanded to look at 5 days forward, 20 days forward, etc. but this is left up to the reader.
Plotted below is how these volatility identifiers affect the S&P 500’s next day range and return. The X-axis is the volatility identifier and the Y Axis is the S&P 500 range (or return) for the next day.
BuildAlpha: In short, the level of these volatility identifiers has a BIG impact on what you can expect for tomorrow’s session and thus your trading systems can/should take a look to see if these can help improve performance or even alert to when some strategies should be ‘offline’!
1) Treasury Spreads vs. S&P 500 Futures. When the 10-year yield minus the 2-year yield is too flat or too steep things tend to get volatile. The x-axis is the basis points of this spread. This is the only goldilocks identifier in this post where volatility increases at both extremes of this indicator but mellows out in the middle of the range.
2) Whenever the front month VIX futures contract is trading above the second nearest month by more than 5-10% things tend to get volatile. Here is the VIX futures curve in March of 2019 vs. March 2020 as well as the contango percent.
3) Whenever SPX index’s option gamma exposure (GEX) is negative things tend to be more volatile. Gamma exposure is the total sum of gamma (option greek) multiplied by open interest of the calls minus the sum of gamma multiplied by the open interest of the puts. This gives us a sense of where/how option market makers are positioned. When GEX is negative things tend to get volatile.
4) Whenever the S&P 500 components’ gamma exposure is negative things tend to be more volatile as well. Obviously very correlated to #3 but important to note the distinction. This is like above but is the aggregate of the actual options on the ~500 stocks in the index vs. the options on the index itself.
There are other volatility identifiers such as Dark Pool Index (DIX), counting the number of S&P 500 stocks above/below the 50 day moving average, number of new highs vs. new lows, economic data filters, etc.
Also, to be fair, Gamma Exposure and Dark Pool Index were first published here: https://squeezemetrics.com/download/white_paper.pdf and pointed out to me by a bunch of Build Alpha users. I want to give credit to where it is due.
In the latest Build Alpha update all of these volatility identifiers, economic data and market breadth filters will be included and testable at the click of a button. Even possible to automate them as part of your strategies built and/or improved by Build Alpha.
I am looking forward to a post COVID world and what the market will bring us on the other side. Be prepared! Any questions please contact me at email@example.com
Build Alpha: In the latest update it is now easier than ever to modify the built-in signals, optimize parameters across noise adjusted data series and other symbols, create rebalance strategies, search for intraday edges and new signals including Gamma Exposure, Dark Pool Index and more.
Trading and Investing is not an easy job and it is best if you have an expert’s advice or better yet a true quantified edge. To gather expert advice and quantified edge, there is a unique tool on the market which is designed specifically for trading and investing purposes. It will serve the purpose for the new investors, and for the existing ones who are experienced in providing them with expert advice, new methods of testing and validation. Build Alpha is the ideal software that will help you creating a trading or investing plan that experts would be proud of.
With this best investing tool, you inevitably live in the golden age of stock market investing. You will get unlimited information, which everyone can reach who is using the software. Build Alpha provides unparalleled data, signals and testing methods to help you build the best trading or investing strategies. It is such a unique tool which will help you in many ways.
It is very economical and is of great tool which small investors are taking great advantage of. These small investors spend next to nothing for tools, the best investing tools, and knowledge. If you’re someone who is invested in the stock market, you should surely look at BuildAlpha. It can even help you analyze your existing trading or investing strategies as well as help you create new ones.
Features of Build Alpha Investing Tool
1. The first advantage that you get from this tool, Build Alpha is the ability to test thousands of trading and investment signals without having to write any code yourself. You can select from candlestick patterns, technical indicators, volume, market breadth studies, intermarket signals, multi-timeframe signals and much more to test, create and build your perfect investment strategy – all is done point and click with no programming. This gives the trader and investor a significant advantage because of the amount of time saved.
2. Free Portfolio Analysis – Another feature that you should check for is the portfolio analysis or Portfolio Mode. With the help of Build Alpha, all the aspiring investors can analyze their portfolios for prospect and opportunity. This portfolio analysis tool will not cost a lot of money and will give you a lot of investing tools and tests you can use. It will offer you tremendous robust analysis tools. These tools possess a piece of expert advice which actually feels like it contains various experts. The tools also allow you to run simulations, find efficient quantitative test and factor-based financing models.
Individual stock investors can use this software for to find the best portfolio for their risk return desires. Investors can track trades, calculate risk-adjusted revenues, and conduct quantitative research. It will also assist you in maintaining your portfolio as a whole rather than just your individual strategies and positions.
3. Education of Investors
To compete in today’s market, traders and investors need proper tools and education. Build Alpha comes complete with private training video course to assist new and advanced traders and investors on how to properly build strategies, test them and construct proper portfolios for individual risk/reward characteristics. This is an all in one tool that comes complete with training. This gives Build Alpha users significant advantage over their counterparts still attempting to learn and build strategies manually.
Originally Posted: http://buildalpha.us/ideal-investing-tool/
In this week’s Free Friday strategy (#10) I want to talk about one method of using Monte Carlo analysis to properly size a trading system – again, this is just one method!
The strategy itself is one created for the Semiconductor ETF or $SMH. All you Dow theorists – if any remain – can rejoice!
The strategy uses 4 rules for entry:
- 20 Period ATR <= ATR
- High <= Close
- High > Low
- Low <= High
**Remember  means current bar and  means 2 bars ago**
The exits used are a 7 day maximum hold or exit after 3 profitable closes. The stop will be a rolling 5 day minimum low. That is, stop out at the lowest low of the previous 5 days.
Couple quick notes. The chart on the left is from TradeStation and the chart on the right is from Build Alpha.
Notice TradeStation x-axis is trade number and Build Alpha x-axis is by date (both can display either way).
The grey line is buy and hold for SMH. You can see since early 2012 (the beginning of our out of sample period) we have much superior risk-adjusted return.
Also, please note that the test was done using only 100 shares per trade. This is essentially nothing, but this post is for demonstration purposes.
A quick recap of what a simple Monte Carlo test can be… we will reshuffle the order of the trades 1,000 times. Each time we will re-create an equity curve by adding the newly shuffled trades up one by one. Each time we will calculate a max drawdown as if the trades had actually happened in this shuffled order.
For the first test, I assumed an account size of $2,500.00. I ran the Monte Carlo test using BuildAlpha which created 1,000 new drawdowns and the picture below. For example, the first Monte Carlo run (1 of 1000) might have calculated a $275.00 drawdown on the reshuffled trades or an 11% drawdown (275/2500). The second Monte Carlo run (2 of 1000) would reshuffle the trades and might recalculate the drawdown to be $450.00 on this random ordering of the trades; that would be an 18% drawdown (450/2500). After 1000 reshuffles we are left with the image below – all done instantly.
The green bars are just a frequency distribution of the percentage drawdowns. The blue, more important, line is a cumulative distribution which adds the green bars up as you move left to right.
The red “X” shows that 95% (y-axis) of all the drawdowns were less than or equal to 30% (x-axis). So we can say we are 95% confident our drawdown should not exceed 30% of the our $2,500.00 account. In other words, we have a 5% chance of experiencing a 30% or more drawdown trading this system.
Furthermore, the drawdown from the original backtest was 15.6% (391/2500) based on this $2,500.00 account. However, according to our Monte Carlo Drawdown analysis we have over a ~38% chance of realizing a drawdown equal to or greater than our max drawdown from the backtest of 15.6%! That’s too high and already Monte Carlo has helped make us more aware traders of the risk we are assuming. I calculated 38% by locating the blue line’s y-value where the x-axis was equal to our 15.6% drawdown. The blue line’s value was approximately 62. So 62% of our Monte Carlo drawdowns were less than or equal to our max drawdown from the backtest. In other words, a 38% chance to see a greater drawdown like I previously mentioned.
That is too high for me; a 30% drawdown can be unbearable and 30+% chance of exceeding our back test drawdown is too high. Let’s increase our account size to $4,000 and re-run the Build Alpha Monte Carlo Drawdown analysis. Pictured below:
Now you can see that 95% of our drawdowns (red “X”) were 18% or less. In other words, there is only a 5% chance we will experience a drawdown of basically 20% or more using a $4,000 account. That is comfortable levels and chances of drawdown to most.
Now the question becomes… is setting aside $4,000 to COMFORTABLY trade this system worth the return this system can generate? That is a more personal question, but a question we will dive into in later posts.
Cheers and enjoy the 3 day weekend
Originally Posted: https://www.buildalpha.com/properly-funding-a-strategy-with-monte-carlo/