Trading Strategies

Adding a Strategy

To add a strategy, you need to add it in the source code. Strategies are written in Java programming languages.

Alis has a few prebuilt strategies as examples.

Generating Current Signals

To view current trading signals for a strategy:

Navigate to Trading → Strategies → Signals

Menu navigation showing Trading > Strategies > Signals

Select the strategy, specify the start time, and click Show signals.

Signals configuration interface

To replay the strategy for your portfolio, check the Show signals for portfolio option.

Show signals for portfolio option

Backtesting Strategies

To backtest a trading strategy:

Navigate to Trading → Strategies → Backtest.

From the left-hand menu, select the strategy and configure parameters (e.g., time period, commission rate).

Click Start to begin the backtest.

Backtest configuration interface

At the end of the backtest you should see a screen similar to this:

To save the results, click Export trades to CSV for use in further analysis (for example, data mining).

Backtest results screen

Checking Drawdown

Alis calculates the significance of portfolio drawdowns using a power-law distribution. To view drawdown analysis:

Click the button Drawdown check.

Review the results displayed.

Drawdown analysis results

Comparing to Random Trading

To evaluate your strategy against random trading:

Click Compare to random.

Specify the number of iterations (recommended: 10 times the number of iterations used during optimization).

Alis will:

  • Estimate the probability of trades to match the number of trades in your system.
  • Run random trading simulations with the calculated probability.
  • Report how often random trading outperforms your strategy.

Ideal outcome: "RandomStrategy achieved better results 0 times."

• A high number indicates a lack of edge in your strategy.

• A low number (but above zero) may suggest over-optimization.

Random trading comparison results

Optimizing Strategies

To optimize a trading strategy:

Navigate to Trading → Strategies → Optimization.

Select the strategy to optimize and configure parameters (e.g., start/end time, commission rate, initial capital).

Menu navigation for optimization

Choose a Result Verifier to handle variability in backtesting:

None

Runs the strategy once per parameter set (default, but sensitive to historical data and start time).

Remove Orders

Executes only 50% of orders randomly during each backtest iteration, repeating multiple times and taking the median result. This increases robustness but extends computation time.

Remove Markets

Creates variations of the original data by randomly removing markets with 50% probability, then repeats the backtest for each variation and takes the median result. This also improves out-of-sample performance prediction but requires more time.

Select the number of iterations and click Start to begin optimization.

Optimization configuration interface

During the process, results will start to appear:

Optimization results display
× Enlarged view