Fundamental Algorithmic Trading Concepts

This guide explains the configuration concepts used to express your own automated trading rules. It does not recommend securities, allocations, or strategy settings.

What is an Algorithmic Trading Strategy?

An algorithmic trading strategy is a user-authored set of rules for a selected universe, entry conditions, exit conditions, sizing, and risk controls. Rules can reference supported technical indicators, price data, fundamental data, or mathematical expressions. Investfly provides visual configuration and Python workflows; the user remains responsible for every adopted input and live-use decision.

Core Components of an Algorithmic Trading Strategy

Every effective automated trading strategy includes these essential components:

Core Components of Algorithmic Trading Strategies

Defining Your Algorithmic Trading Universe

A strategy universe defines the instruments evaluated by your rules. You are responsible for choosing that universe and determining whether it is appropriate for your objectives and account constraints.

Investfly offers three methods to define the scope of your algorithmic trading strategy:

  1. Predefined Lists: Utilize our curated collections of securities such as S&P 500, Dow Jones Industrials, or Nasdaq 100 for your automated trading system
  2. Custom List: Create a personalized watchlist of specific stock symbols for your algorithmic trading strategy (e.g., AAPL, AMZN, MSFT, TSLA)
  3. Dynamic Filter: Define advanced filtering criteria using expressions based on fundamental or technical indicators for your automated trading system (e.g., MarketCap > 100B && Volume > 1000000)

Think of your algorithmic trading universe as the critical first instruction that determines which securities your automated trading system will analyze and potentially trade.

Predefined Market Indices

Standard market benchmarks for broad algorithmic trading coverage

Custom Security Lists

Targeted selection of securities for focused algorithmic trading

Dynamic Filtering Rules

A user-selected universe resolved from user-defined criteria

Entry Conditions: When Your Algorithm Opens Trades

Entry conditions determine when the strategy evaluates an order action for securities in the user-selected universe. Available inputs can include price, moving averages, momentum indicators, volume, and fundamental metrics. The user is responsible for deciding which inputs, intervals, and thresholds to adopt.

Entry conditions are logical expressions created with the Expression Builder. You can combine supported data fields, indicators, numeric values, and operators. For syntax details, see the Expression Overview.

Configuration note: Different data fields update at different times and frequencies. Choose inputs and intervals based on your own rules and confirm their timing and availability.

Trade Signal Generation

As described in the expression overview section, a trade signal is generated for any security when the logical expression for that security transitions from a false to a true state. Since the scope may include multiple securities, trade signals will be continuously generated for many of them. There is no guarantee on the order in which the trade signals are generated for different securities, even if they match the criteria at exactly the same time.

It's helpful to imagine trade signals coming in as a random continuous stream in response to the random continuous stream of quotes we receive from the market. This non-deterministic (i.e., random) behavior occurs for two main reasons:

  1. Price quotes received from the market arrive in a random order of securities. Although they are timestamped, multiple quotes with the same timestamp will appear in a random order.
  2. The evaluation of indicators and expressions is performed in a highly parallel manner. This parallel computation introduces a non-deterministic nature to the system. If we were to process these sequentially instead of in parallel, the system would be too slow to handle all market quotes in real time.
Trade Signal Generator

Identical strategy configurations can produce different orders or outcomes across accounts because of data timing, account state, buying power, existing positions, provider rules, execution, and market conditions. Review logs and account activity rather than assuming that a configuration will behave identically or produce any particular return.

Important: Identical configurations can produce different outcomes because of data timing, account state, provider rules, execution, and market conditions. Variation does not validate a strategy or predict future results.

Portfolio Allocation

A configured strategy may generate trade signals as its conditions are evaluated. Data latency, data quality, evaluation timing, account state, broker rules, and software behavior can affect whether a condition is evaluated or an order is accepted. You must decide how the strategy should respond to signals and account constraints.

The decision is not straightforward. Suppose you have a $1000 cash balance and receive a trade signal. Should you invest the entire $1000 in that stock, or allocate only $500 and reserve the remaining $500 for future trade signals? Or perhaps invest just $200? This decision involves balancing the number of unique stocks you wish to hold in your open positions against the amount you want to invest in each stock. Investing too much in one stock reduces the number of open positions, while investing less allows for more open positions.

Allocation Strategies

To simplify this task, Investfly allows you to pick two simple approaches:

Invest Fixed Cash Amount

A fixed-amount configuration applies the amount you specify when an eligible signal is processed, subject to buying power, validation, and broker constraints. The dollar figures shown here are examples only.

Once funds are exhausted, further trade signals will be ignored until cash is replenished. A potential drawback of this method is that as your portfolio's value fluctuates due to profits or losses, the initially set amount may become outdated and require adjustment.

A fixed-dollar allocation does not automatically change with portfolio value. If you use this method, periodically review whether the amount and account-level exposure limits still match the rules you intend to authorize.

Maintain Fixed Number of Open Positions

This approach allows you to specify the number of unique stocks you want in your open positions. The algorithmic trading strategy will automatically adjust the investment amount based on your portfolio value.

For instance, if you start with $10,000 and specify 5 unique stocks, the algorithmic trading software will initially invest $2,000 in each stock ($10,000 / 5). If your portfolio grows to $100,000, the algo trading software will adjust to invest $20,000 in each stock ($100,000 / 5).

This is one available sizing method, not a recommendation. Review how changing portfolio value affects position size and choose the method and limits appropriate for your strategy.

Configuration note: "Maintain Fixed Number of Open Positions" is one available sizing method. It is not a recommendation or default policy. Review its calculations, concentration, buying-power effects, and limits before choosing it.

Exit Conditions

Exit conditions define when your strategy requests that an open position be reduced or closed. Available controls depend on the strategy type, instrument, account, and broker capabilities.

Standard Exit Conditions

  • Target Profit - Close when reaching a specific profit percentage
  • Target Loss - Close when reaching a specific loss percentage
  • Trailing Loss - Dynamic stop-loss that adjusts with price movement

Advanced Exit Conditions

  • Timeout Condition - Close after a specified timeout period (e.g., 3 days, 20 minutes, etc.)
  • Custom Close Condition - Similar to entry conditions, you can specify a logical expression to define a close condition

Review every exit rule and test its behavior before use. Orders may be affected by market conditions, data, system availability, and broker handling, so configured rules do not guarantee execution at a particular time or price.

Important: Review and test user-authored exit conditions before enabling an order action. No exit rule guarantees execution, price, or limitation of loss.

Next Steps

These are the major components of a trading strategy. However, there are more details that we will cover in the Create Trading Strategy guide. Understanding these automation concepts will help you build more effective trading strategies and make better use of Investfly's algorithmic trading platform.

Ready to Get Started?

Start automating your trading strategies today with our free 14-day trial.

Start Free Trial

No credit card required.