100% found this document useful (1 vote)
166 views

Quant Process Notes

Build Alpha is a software platform that helps users build and test quantitative trading strategies. It comes with over 5,000 signals that can be used to create strategies and test them on different market data. Strategies developed using Build Alpha can be exported and used on other platforms. The software aids in the identification, backtesting, validation and risk management of trading strategies through features like automated strategy mining that searches for profitable combinations of entry and exit criteria.

Uploaded by

Danie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
166 views

Quant Process Notes

Build Alpha is a software platform that helps users build and test quantitative trading strategies. It comes with over 5,000 signals that can be used to create strategies and test them on different market data. Strategies developed using Build Alpha can be exported and used on other platforms. The software aids in the identification, backtesting, validation and risk management of trading strategies through features like automated strategy mining that searches for profitable combinations of entry and exit criteria.

Uploaded by

Danie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

What

is Build Alpha?

• Software/Platform to build quantitative strategies on
• Helps back test and validate strategies
• Build Alpha comes with over 5000 different signals which can be run against any
dataset in the financial market, Includes intraday strategies that can be used built
using build alpha.
• Build Alpha can take multiple signals and combine them to produce a strategy.
• Through Python it is possible to add our own signals (data sets) into build Alpha.
• Once the strategy is validated, we can export the code and use it on our platform
(MT4).

What is validation?

• Validation confirms if the back-testing results are validated under rigorous testing
which should improve the probability of a valid edge. This should help the strategy
work forward in time.

Quantitative trading overview with Build Alpha

Strategy Identification: Finding a strategy, exploiting an edge, and deciding on trading frequency.

Strategy Backtesting/Validating: Obtaining data, analysing strategy performance, and removing


biases by using validation techniques.

Execution System: Linking to a brokerage, automating the trading and minimising transaction costs.

Risk Management: Optimal capital allocation, and trading psychology.


Strategy Identification
All quantitative trading processes begin with an initial period of research. This research process
encompasses finding a strategy, seeing whether the strategy fits into a portfolio of other strategies you
may be running, obtaining any data necessary to test the strategy and trying to optimise the strategy for
higher returns and/or lower risk. You will need to factor in your own capital requirements if running the
strategy as a "retail" trader and how any transaction costs will affect the strategy.

Contrary to popular belief it is actually quite straightforward to find profitable strategies through various
public sources. Academics regularly publish theoretical trading results (albeit mostly gross of transaction
costs). Quantitative finance blogs will discuss strategies in detail. Trade journals will outline some of the
strategies employed by funds.

You might question why individuals and firms are keen to discuss their profitable strategies, especially
when they know that others "crowding the trade" may stop the strategy from working in the long term.
The reason lies in the fact that they will not often discuss the exact parameters and tuning methods that
they have carried out. These optimisations are the key to turning a relatively mediocre strategy into a
highly profitable one. In fact, one of the best ways to create your own unique strategies is to find similar
methods and then carry out your own optimisation procedure.

Here is a small list of places to begin looking for strategy ideas:

Social Science Research Network - www.ssrn.com
arXiv Quantitative Finance - arxiv.org/archive/q-fin
Seeking Alpha - www.seekingalpha.com
Elite Trader - www.elitetrader.com
Nuclear Phynance - www.nuclearphynance.com
Quantivity - quantivity.wordpress.com

Many of the strategies you will look at will fall into the categories of mean-reversion and trend-
following/momentum. A mean-reverting strategy is one that attempts to exploit the fact that a long-term
mean on a "price series" (such as the spread between two correlated assets) exists and that short term
deviations from this mean will eventually revert. A momentum strategy attempts to exploit both investor
psychology and big fund structure by "hitching a ride" on a market trend, which can gather momentum in
one direction, and follow the trend until it reverses.

Another hugely important aspect of quantitative trading is the frequency of the trading strategy. Low
frequency trading (LFT) generally refers to any strategy which holds assets longer than a trading day.
Correspondingly, high frequency trading (HFT) generally refers to a strategy which holds assets intraday.
Ultra-high frequency trading (UHFT) refers to strategies that hold assets on the order of seconds and
milliseconds. As a retail practitioner HFT and UHFT are certainly possible, but only with detailed knowledge
of the trading "technology stack" and order book dynamics.

Once a strategy, or set of strategies, has been identified it now needs to be tested for profitability on
historical data. That is the domain of back-testing and validation.


Mean reversion Trend following

A mean-reverting strategy is one that attempts Trend following seeks only to identify a significant
to exploit the fact that a long-term mean on a market movement as it starts and ride it until it ends. It
"price series" (such as the spread between two attempts to exploit both investor psychology and big
correlated assets) exists and that short term fund structure by "hitching a ride" on a market trend,
deviations from this mean will eventually revert which can gather momentum in one direction, and
follow the trend until it reverses.

Statistical arbitrage Algorithmic pattern recognition

Statistical arbitrage builds on the theory of This strategy involves building a model that can identify
mean reversion. It works on the basis that a when a large institutional firm is going to make a large
group of similar financial instruments should trade.
perform similarly on the markets. If any in that
group outperform or underperform the
average, they represent an opportunity for
profit.

Behavioural bias recognition EFT rule trading

Behavioural bias recognition seeks to exploit This strategy seeks to profit from the relationship
market inefficiency in return for profit. But between an index and the exchange traded funds (ETFs)
unlike mean reversion, which works off the that track it.
theory that inefficiencies will eventually rectify
themselves, behavioural finance involves
predicting when they might arise and trading
accordingly.

Another hugely important aspect of quantitative trading is the frequency of the trading strategy

Low frequency trading (LFT) - Any strategy which holds assets longer than a trading day.

High frequency trading (HFT) - Any strategy which holds assets intraday.


Build Alpha: Strategy Mining

Build Alpha allows traders the ability to create systematic trading strategies by searching hundreds of
thousands of possible entry signal combinations and exit criteria to form the best systematic trading
strategies based on user selected fitness functions (Sharpe Ratio, Net Profit, etc.) and test criteria.

Step 1: Define Your Strategy Criteria

Type of Strategy • Low frequency trading | High frequency trading
• Mean reversion
• Define the type of strategy you would like to • Trend following
find. • Statistical arbitrage
• Algorithmic pattern recognition
• Behavioural bias recognition
• EFT rule trading

Entry Signals/ Exit Criteria • Build Alpha currently has over 5000+ entry/exit signals
• Custom signals can be imported through python
• Full Signal Glossary Provided with License • Exit strategies can be mined or fixed exits can be used

Long or Short Contract Type: Long OR Short

• Choose which type of strategy you would like • In Build Alpha you want to test for long strategies and then
to test. short strategies as stop and reverse strategies tend not to
work that well.
• This allows us to check for each strategy’s performance
individually.

Market of Choice • Indexes | Interest Rates
• Agriculture | Commodities
• Build Alpha currently offer over 30 futures • Crypto |Forex |ETFs
markets, over 30 ETFs, and over 30 Forex
pairs. Symbols: Symbols can be used to create baskets you want build
alpha to build different strategies across.

Markets: Trades intra-markets

Test Dates • Test over min 10 years [ 01-2007 to 01-2017]
• Leave at least 3 years of data untouched [01-2017 to 12-
• Choose dates you would like build alpha to 2020
test on. • Allows the strategy to be forward tested on data that was
untouched

Money Management • Define your Profit Target/TP and SL either by ATR or
Highest High/Lowest low
• Trailing Stops
• Max holding time
• Profitable closes/openings

Fitness Function • When data mining for strategies on a market, we mine for
certain fitness functions.
Select the fitness function you would like build • Fitness function is the main characteristic BA will look for
alpha to mine for. when strategy mining.


In/Out of sample | Min Trades | Min Percentages • Decide which part of data should be In sample (build alpha
will create strategies against this %)
• BA will find the best strategies against the fitness function
we selected.
• BA will then test these strategies against the out of sample
data.
• By selecting ‘beginning’ in settings we can have in sample
data on the most recent data against past data.
• The % chosen in and out of sample depends on the
strategies we find. (30% is common)
• Minimum trades: BA will only return strategies that take x
amount of trades





Back testing/Validating
The goal of back-testing is to provide evidence that the strategy identified via the above
process is profitable when applied to both historical and out-of-sample data. This sets the
expectation of how the strategy will perform in the "real world". However, back-testing is NOT
a guarantee of success, for various reasons. It is perhaps the most subtle area of quantitative
trading since it entails numerous biases, which must be carefully considered and eliminated as
much as possible. The common types of bias including look-ahead bias, survivorship bias and
optimisation bias (also known as "data-snooping" bias). Other areas of importance within
back-testing include availability and cleanliness of historical data, factoring in realistic
transaction costs and deciding upon a robust back-testing platform.

Once a strategy has been identified, it is necessary to obtain the historical data through which
to carry out testing and, perhaps, refinement. There are a significant number of data vendors
across all asset classes. Their costs generally scale with the quality, depth, and timeliness of the
data. The traditional starting point for beginning quant traders (at least at the retail level) is to
use the free data set from Yahoo Finance/Dukascopy.

The main concerns with historical data include accuracy/cleanliness, survivorship bias and
adjustment for corporate actions such as dividends and stock splits:

Accuracy pertains to the overall quality of the data - whether it contains any errors. Errors can
sometimes be easy to identify, such as with a spike filter, which will pick out incorrect "spikes"
in time series data and correct for them. At other times they can be very difficult to spot. It is
often necessary to have two or more providers and then check all of their data against each
other.

Survivorship bias is often a "feature" of free or cheap datasets. A dataset with survivorship
bias means that it does not contain assets which are no longer trading. In the case of equities
this means delisted/bankrupt stocks. This bias means that any stock trading strategy tested on
such a dataset will likely perform better than in the "real world" as the historical "winners"
have already been preselected.

Corporate actions include "logistical" activities carried out by the company that usually cause a
step-function change in the raw price, that should not be included in the calculation of returns
of the price. Adjustments for dividends and stock splits are the common culprits. A process
known as back adjustment is necessary to be carried out at each one of these actions. One
must be very careful not to confuse a stock split with a true return’s adjustment. Many a
trader has been caught out by a corporate action.

In order to carry out a back-test procedure it is necessary to use a software platform. You have
the choice between dedicated back-test software, such as Tradestation, a numerical platform
such as Excel or MATLAB or a full custom implementation in a programming language such as
Python or C++.
One of the benefits of doing so is that the back-test software and execution system can be
tightly integrated, even with extremely advanced statistical strategies. For HFT strategies in
particular it is essential to use a custom implementation.

When back-testing a system one must be able to quantify how well it is performing. The
"industry standard" metrics for quantitative strategies are the maximum drawdown and the
Sharpe Ratio. The maximum drawdown characterises the largest peak-to-trough drop in the
account equity curve over a particular time period (usually annual). This is most often quoted
as a percentage. LFT strategies will tend to have larger drawdowns than HFT strategies, due to
a number of statistical factors. A historical back-test will show the past maximum drawdown,
which is a good guide for the future drawdown performance of the strategy. The second
measurement is the Sharpe Ratio, which is heuristically defined as the average of the excess
returns divided by the standard deviation of those excess returns.

Here, excess returns refers to the return of the strategy above a pre-determined benchmark,
such as the S&P500 or a 3-month Treasury Bill. Note that annualised return is not a measure
usually utilised, as it does not take into account the volatility of the strategy (unlike the Sharpe
Ratio).

Once a strategy has been back-tested and is deemed to be free of biases (in as much as that is
possible), with a good Sharpe and minimised drawdowns, it is time to build an execution
system.


https://www.buildalpha.com/eratio/






Execution System
An execution system is the means by which the list of trades generated by the strategy are sent and
executed by the broker. Despite the fact that the trade generation can be semi- or even fully-automated,
the execution mechanism can be manual, semi-manual (i.e. "one click") or fully automated. For LFT
strategies, manual and semi-manual techniques are common. For HFT strategies it is necessary to create
a fully automated execution mechanism, which will often be tightly coupled with the trade generator
(due to the interdependence of strategy and technology).

The key considerations when creating an execution system are the interface to the brokerage,
minimisation of transaction costs (including commission, slippage and the spread) and divergence of
performance of the live system from backtested performance.

There are many ways to interface to a brokerage. Ideally you want to automate the execution of your
trades as much as possible. This frees you up to concentrate on further research, as well as allow you to
run multiple strategies or even strategies of higher frequency (in fact, HFT is essentially impossible
without automated execution). The common backtesting software, such as MATLAB, Excel and
Tradestation are good for lower frequency, simpler strategies. However it will be necessary to construct
an in-house execution system written in a high performance language such as C++ in order to do any real
HFT.

In a larger fund it is often not the domain of the quant trader to optimise execution. However in smaller
shops or HFT firms, the traders ARE the executors and so a much wider skillset is often desirable. Bear
that in mind if you wish to be employed by a fund. Your programming skills will be as important, if not
more so, than your statistics and econometrics talents!

Another major issue which falls under the banner of execution is that of transaction cost minimisation.
There are generally three components to transaction costs: Commissions (or tax), which are the fees
charged by the brokerage, the exchange and the SEC (or similar governmental regulatory body); slippage,
which is the difference between what you intended your order to be filled at versus what it was actually
filled at; spread, which is the difference between the bid/ask price of the security being traded. Note that
the spread is NOT constant and is dependent upon the current liquidity (i.e. availability of buy/sell
orders) in the market.

Transaction costs can make the difference between an extremely profitable strategy with a good Sharpe
ratio and an extremely unprofitable strategy with a terrible Sharpe ratio. It can be a challenge to
correctly predict transaction costs from a backtest. Depending upon the frequency of the strategy, you
will need access to historical exchange data, which will include tick data for bid/ask prices. Entire teams
of quants are dedicated to optimisation of execution in the larger funds, for these reasons.

The final major issue for execution systems concerns divergence of strategy performance from
backtested performance. This can happen for a number of reasons. Some strategies do not make it easy
to test for these biases prior to deployment. This occurs in HFT most predominantly. There may be bugs
in the execution system as well as the trading strategy itself that do not show up on a backtest but DO
show up in live trading. The market may have been subject to a regime change subsequent to the
deployment of your strategy. New regulatory environments, changing investor sentiment and
macroeconomic phenomena can all lead to divergences in how the market behaves and thus the
profitability of your strategy.

Risk management
The final piece to the quantitative trading puzzle is the process of risk management. Risk management
encompasses what is known as optimal capital allocation, which is a branch of portfolio theory. This is
the means by which capital is allocated to a set of different strategies and to the trades within those
strategies. It is a complex area and relies on some non-trivial mathematics. The industry standard by
which optimal capital allocation and leverage of the strategies are related is called the Kelly criterion. The
Kelly criterion makes some assumptions about the statistical nature of returns, which do not often hold
true in financial markets, so traders are often conservative when it comes to the implementation.

Another key component of risk management is in dealing with one's own psychological profile. There are
many cognitive biases that can creep in to trading. Although this is admittedly less problematic with
algorithmic trading if the strategy is left alone. A common bias is that of loss aversion where a losing
position will not be closed out due to the pain of having to realise a loss. Similarly, profits can be taken
too early because the fear of losing an already gained profit can be too great. Another common bias is
known as recency bias. This manifests itself when traders put too much emphasis on recent events and
not on the longer term. Then of course there are the classic pair of emotional biases - fear and greed.
These can often lead to under- or over-leveraging, which can cause the account equity heading to zero or
worse!) or reduced profits.


References

https://www.buildalpha.com/how-to-use/

https://www.buildalpha.com/blog/
https://www.buildalpha.com/feature/

https://buildalpha.wordpress.com/

https://www.quantstart.com/articles/Beginners-Guide-to-Quantitative-Trading/

https://www.ig.com/uk/trading-strategies/a-traders-guide-to-quantitative-trading-200420

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy