8. Creating and Editing Algorithmic Trading Strategies With Composer

For many Composer users, creating your own algorithmic trading strategies represents the most advanced use of the platform, with by far the greatest level of control over your trades.

Virtually every symphony you’ll find in Discover was created and/or refined by an investor who probably started in a similar position to yours, with similar levels of understanding around algorithmic trading and investment automation.

Over time, these users learned how symphonies worked, examined the inner workings of symphonies they found in Discover or through friends, and eventually decided they could do better — or if not “do better,” then at least create a portfolio more in line with their own needs than other folks’ custom symphonies.

Since the last article in this series covered all the major functions and components of the Composer symphony editor in detail, this part of the guide will focus on helping you understand the “how” behind Composer’s algorithms. Even if you choose to never develop an algorithm of your own, understanding how everything works can give you the confidence to choose symphonies that work for your goals, and the confidence to know whether or not those symphonies are performing as expected based on their internal logic.

First, let’s take a look at how you can use the Composer symphony editor to modify an existing symphony.


How to Edit a Composer Symphony

Once you’ve found an interesting symphony on the Discover page (or if someone has shared a direct link to one of their favorites) you’ll see several options for further interaction.

Every symphony includes Invest and Watch options, which allow you to either allocate funds to the strategy or track its performance without investing. These options appear beneath the symphony’s name on the Discover page or to the right of the name in the detailed Factsheet view.

For example, let’s examine the popular “TQQQ For the Long Term” symphony, which gained widespread attention on Reddit in 2023.

Viewing “TQQQ For the Long Term” on the Discover page.
Viewing “TQQQ For the Long Term” expanded factsheet.

The Watch button allows you to add a symphony to your watchlist, enabling you to track its performance without committing real funds. There are no restrictions on how many symphonies you can watch, making it easy to monitor multiple strategies simultaneously.

The Invest button lets you allocate real money to a symphony, allowing it to execute trades on your behalf.

However, if you want to edit a symphony, you won’t be able to do so directly from the Discover page. First, you need to open its factsheet by clicking on its name or selecting the “expand” arrows to the right of the Watch button. Once inside the factsheet view, you’ll find an Edit button, which allows you to modify the symphony’s logic and parameters.

Clicking the Edit button opens the symphony in Composer’s editor, allowing you to modify its logic and parameters. Let’s take “TQQQ For the Long Term” as an example.

When you edit a symphony created by someone else, Composer will first clone the symphony and save a copy to your Drafts folder. This ensures that the original remains unchanged while you experiment with modifications. The copied version will automatically have “Copy of” added to the beginning of its title, distinguishing it from the original.

When you first click Edit on a symphony like “TQQQ For the Long Term”, Composer will create a copy of the original, replicating every condition, trigger, setting, and ticker exactly. This means your copied symphony will be functionally identical to the original until you make modifications.

However, keep in mind that some older symphonies may contain delisted tickers, which are no longer tradable. If a copied symphony includes a delisted ticker, it will generate errors when attempting to run. Since the copy retains all original settings, these issues will persist until you manually remove or replace the delisted tickers. We’ll discuss how to fix these errors later, but until adjustments are made, the symphony may not function properly.

Now that we’ve copied the symphony to our Drafts folder, let’s start experimenting with its structure to better understand how it works.

If you ever need to find your draft symphonies, you can access them by selecting the Drafts view from the dropdown menu under the Create button in the top navigation bar.

Now that we’ve got a copy of a functional symphony in our Composer editor, let’s poke around to figure out how everything works.


Blocks in the Composer Editor - Basic Functions Explained

Composer’s symphonies are built using blocks, which serve as the core elements controlling trading behavior. These blocks define how a symphony executes trades based on triggers, tickers, or conditions.

To create or add a new block in the Composer symphony editor, simply click on one of the plus sign (+) icons.

When you first load a symphony in the editor, you’ll notice dark green plus icons at the ends of empty logic branches. These indicate unfinished branches and allow you to add new blocks where necessary. If a branch doesn’t yet have an endpoint, clicking the plus icon will let you extend its logic by inserting additional conditions, triggers, or asset selections.

To add a new block in between existing blocks, you’ll need to hover your mouse over the space between them. If you’re able to add something, an orange plus sign icon will appear in the middle of a long orange bar:

Clicking any visible plus sign in the editor will either bring up the “Add Block” dropdown or add an empty block, which appears in gray until you’ve put something in it:

The block types you can insert and modify into any Composer symphony include:

Composer symphonies rely on different blocks to define trading behavior, asset selection, and decision-making logic. Here’s a breakdown of the core block types and how they function:

  • Asset Block – Represents an individual ticker (stocks, ETFs, or cryptocurrencies). When conditions are met, the symphony buys the specified asset.
  • Group Block – Allows multiple tickers or conditions to be grouped into a single logic branch. Group blocks can also be used to copy and paste entire sections of logic between different symphonies.
  • Weight (Allocation) Block – Determines how much of the portfolio is allocated to each ticker or logic branch nested beneath it.
  • If/Else (Conditional) Block – Directs the symphony down one of two logic branches based on the evaluation of a condition.
  • Filter Block – Selects only a certain number of tickers from a list, choosing either the top or bottom performers based on the sorting function.
  • Paste Block – Inserts copied logic or blocks from elsewhere in Composer into the selected space. You can also use CTRL+V (Windows) or CMD+V (Mac) to paste directly into the editor.

These blocks and their basic functionality were covered in detail earlier in this guide. Now, let’s explore why these blocks behave the way they do and how to use them effectively to improve your symphony’s performance.

Asset blocks are straightforward—simply enter a ticker, and if the symphony’s logic allows it, the asset will be purchased.

Group blocks function as containers for complex logic, allowing entire sections of a symphony to be easily duplicated, reorganized, or embedded into larger symphonies. Many builders use Group blocks to nest entire strategies within larger, more intricate frameworks.

The Paste function works as expected—you can paste copied blocks into any empty space in the symphony editor, either by using the Paste block or with standard keyboard shortcuts (CTRL+V / CMD+V). Currently, Composer’s symphony editor is not available on mobile.

Other blocks, such as If/Else conditionals and Filters, offer greater flexibility. Adjusting their parameters can significantly alter a symphony’s behavior and effectiveness.

To understand this better, let’s explore what happens when we modify the conditions of an If/Else block in an existing symphony, such as “TQQQ For the Long Term”.


Using and Editing If/Else Conditional Blocks in the Composer Editor

Before making any modifications, it’s essential to establish a baseline for the symphony we’re about to edit. This ensures that any changes we implement can be accurately assessed in terms of their impact on performance.

To do this, we’ll run a backtest of the TQQQ For the Long Term symphony that we copied from the Discover page. The backtest will provide key performance metrics, such as cumulative return, drawdowns, volatility, and risk-adjusted ratios, giving us a clear understanding of how the symphony has performed under its current conditions.

Here are the results from our initial backtest: 

The preview screen provides a quick overview of your symphony’s key performance statistics. Any change to a symphony’s logic—whether modifying a condition, adding a new block, or adjusting allocations—should generally impact its backtested outcomes. However, in some cases, a change may not have an immediate effect, particularly if the adjusted condition is rarely met and therefore never triggers within the tested period.

Let’s take a practical example using our TQQQ For the Long Term symphony. Previously, one of its If/Else conditionals was set to trigger when TQQQ’s 10-day Relative Strength Index (RSI) exceeded 79%. To observe how modifying a condition affects performance, we’ll adjust the threshold to trigger when TQQQ’s 10-day RSI is above 77% instead.

To do this, we’ll:

  1. Locate the If/Else block in the symphony’s logic tree
  2. Click the pencil (edit) icon to open the condition’s settings
  3. Modify the RSI threshold from 79% to 77%
  4. Save the changes and re-run the backtest to analyze the impact

With this adjustment, we should expect the symphony’s trade execution frequency to change, as the new threshold may allow the condition to trigger more often. Next, we’ll run a backtest to compare the updated performance metrics against our original baseline.

The just-cloned symphony will have these settings:

Let’s adjust the condition from its original 79% setting to 77:


Once the popup closes, the new 77% RSI threshold is automatically saved within the symphony’s logic. Now that we’ve adjusted this condition, it’s time to evaluate its impact on the symphony’s performance.

To do this, we’ll re-run the backtest by clicking the RUN icon in the Backtest Preview panel. This will generate updated performance metrics, allowing us to compare the before and after results.

As we can see from the updated backtest results, the symphony’s Max Drawdown remains unchanged, but its annualized return has slightly decreased. This suggests that lowering the RSI threshold to 77% did not provide a meaningful improvement to the symphony’s performance.

If a modification doesn’t enhance the strategy—or even worsens it—it’s easy to undo your changes. Simply click the Undo button in the upper right corner of the editor.

Each time you undo a change, the Backtest Preview panel will update to reflect the previous settings and corresponding performance metrics. Since we only adjusted one condition, a single Undo click will revert the symphony back to its original post-copy state, restoring its initial RSI threshold of 79%.

Now, let’s explore the impact of changing the ticker in our If/Else conditional block. Instead of using TQQQ, we’ll switch to QQQ, which is the non-leveraged version of the same underlying Nasdaq-100 index. Since TQQQ is simply a 3x leveraged version of QQQ, this change should produce similar results, though with potential differences in trade frequency or sensitivity to market movements.

Steps to Change the Ticker in an If/Else Block:

  1. Locate the If/Else block in the symphony’s logic tree.
  2. Click the blue ticker button to open the ticker search box.
  3. Type “QQQ” into the search field.
  4. Click on QQQ in the results list to confirm the selection.
  5. Save the changes and re-run the backtest to analyze the updated performance metrics.

Let’s click the RUN button in the Backtest Preview panel and compare the new results to our original baseline.

Unlike the previous edit, replacing TQQQ with QQQ has had minimal impact on the results but has reduced the annualized return by 0.9%. A slight reduction in return should ideally provide some advantages, such as lower volatility, a smaller max drawdown, or a reduced standard deviation. However, without these benefits, there is no compelling reason to keep this change.

If/Else conditional blocks offer the most control and flexibility in symphony design due to the wide range of available settings.

An effective If/Else conditional should respond consistently to common market conditions. The 10-day RSI example used in this test is a standard approach for identifying overbought or oversold conditions. It can track any ticker, but many symphonies focus on highly liquid, actively traded stocks and ETFs. Over time, less common tickers may provide useful signals for If/Else conditions, but the only way to determine this is through experimentation and testing.


Using and Editing If/Else Conditional Blocks in the Composer Editor

The Weight block offers three allocation settings:

  • Equal Weighting
  • Specified Weighting (percentages or fractional allocations)
  • Inverse Volatility

Most symphonies use Equal Weighting, while some employ Specified Weighting, particularly in more complex symphonies with multiple tickers. Inverse Volatility Weighting is rarely used, as it is more dynamic and can lead to significantly varying allocations over time.


Using and Editing Filter Blocks in the Composer Editor

Filter blocks provide more granular control over a symphony than the less commonly used Weight blocks.

A Filter block allows a symphony to scan a list of tickers and select only the best or worst performers from a larger set of options. These selections can range from as few as two tickers to hundreds of stocks, ETFs, or cryptocurrencies. The only real constraint is the overall size limit of a Composer symphony.

In the TQQQ symphony we copied, there is one Filter block with only two tickers to choose from:   

This setting directs the symphony into bearish tickers when it detects a sharp downturn in TQQQ’s price over short timeframes.

  • SQQQ is the inverse of TQQQ, moving 3x in the opposite direction.
  • TLT is a long-term Treasury bond ETF that typically peaks when TQQQ declines.

The 10-day RSI setting in this Filter block is designed to allocate funds to the better-performing asset when this branch is triggered.

A simple modification would be to select the worse-performing asset instead by changing the selection setting from “Top” to “Bottom.” This adjustment would cause the symphony to allocate to the weaker-performing option at the time the branch activates.

Let’s see how this one change impacts our symphony’s results.



Evaluating the Impact of Changing the Filter Block Section

This single change had a far greater impact on our backtest results than previous modifications.

  • The symphony’s annualized return dropped by 50%.
  • The max drawdown decreased slightly, but not enough to justify the significant loss in returns.

Most investors would not consider a small reduction in drawdown to be worth sacrificing half of the annual growth rate.

A Filter block can contain as few as two choices or hundreds of assets nested within it. To explore further, let’s add a few more tickers to the Filter list in our strategy.

SOXS is generally more volatile than SQQQ, but both tend to move in the same direction.

TMV and TLT are both bullish bond ETFs that have shown similar performance over the past 12 months.

Now that we’ve added these tickers to the Filter block, let’s analyze how they have impacted our backtest results.

As we’ve seen, some modifications have a greater impact than others, and adding more conditions to a symphony does not guarantee better results. It can be tempting to continue tweaking a symphony by introducing additional logic, adjusted conditions, or new blocks, but complexity for its own sake offers no inherent advantage.

The TQQQ For the Long Term symphony is relatively simple and straightforward compared to many others, yet it remains popular because it has consistently outperformed benchmarks long after its creation.

There are many more ways to modify Composer blocks beyond adjusting a single number or dropdown selection, but the three basic changes we explored provide a solid foundation for understanding how Composer works and how to customize symphonies to fit your strategy. Like any skill, mastering Composer requires practice and iteration, but every user starts in the same position, learning how to refine their symphonies over time.

So far, we’ve covered the major functions of the Composer editor and demonstrated how to edit an existing symphony from the Discover page. Now, let’s take the next step and explore how to create your own symphony using AI.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us