Tutorials

main

See Our Software in Action

Investing in the Banking Industry During a Bank Crisis

Beta Screening Criteria

Beta is a measure of a stock's volatility in relation to the industry. If we assume that the banking industry is affected by an economic event (such as a bank crisis), stocks with the highest beta will, on average, be more volatile within that industry. This means that if the industry experiences positive or negative effects during the economic event, our stocks will exhibit higher or lower returns compared to the industry average.


Trading Strategy

If we assume a downtrend, we can short the stocks, the industry, or certain niches within the industry. Conversely, if we assume an uptrend, we can take long positions in the stocks or the industry.

How to Backtest a Basic Screening Analysis

Creating a Backtest Project

Create a new backtest for each analysis to minimize the risk of overfitting and to combine strategies in an optimized portfolio using modern portfolio theory.


Selecting Large Cap Sample

Choose a sample of large-cap stocks to analyze. Large-cap stocks have a market cap of $10 billion or more. Stocks are selected at each time unit based on the market cap to avoid survivorship bias and look-ahead bias.


Adding Screening Criteria

Add screening methods by selecting financial ratios and thresholds. You can also add relative thresholds, meaning that for each time unit, stocks are compared to each other, and stocks with the highest or lowest values for the ratio are selected.


Running the Backtest

Easily run the backtest and analyze the results.

Gold and Silver Cointegration Strategy

Selecting Time Series from the Library

Select gold futures and silver futures to apply a simple cointegration method for analyzing the return of gold. The strategy assumes a cointegration relationship between gold and silver, meaning that the spread between the two prices is stationary.


Normalizing the Time Series

Typically, cointegration techniques involve regression methods. However, we assume a cointegration relationship between silver and gold. For each time unit, we normalize the time series to account for the relative relationship between the two assets, which we assume will converge over time. This normalization is done n steps back for each time unit. We then divide the time series, gold by silver, and compare the last value (at the current step) of this ratio to a user-defined threshold. If the last value exceeds the threshold, a buy signal is generated.


Running the Backtest

Easily run the backtest and analyze the results. The user can visualize the buy signals on the graph and add this method to backtest the return on gold to see how well the method performs over time.


Pair-Trading

You can simulate pair trading by creating another backtest with the same method but using silver as the sample (the asset you buy in) and evaluate the return on silver. If you want to see them in a portfolio at the same time, you can navigate to modern portfolio allocation to add them in a portfolio and see the return of both strategies over time.