CHAPTER II

RESILIENCE OF TRADING SYSTEMS
SECTION I

Testing and deployment of trading algorithms systems and strategies

General methodology(Article 17(1) of Directive 2014/65/EU)
Article 5
1
Prior to the deployment or substantial update of an algorithmic trading system, trading algorithm or algorithmic trading strategy, an investment firm shall establish clearly delineated methodologies to develop and test such systems, algorithms or strategies.
2
A person designated by the senior management of the investment firm shall authorise the deployment or substantial update of an algorithmic trading system, trading algorithm or algorithmic trading strategy.
3
The methodologies referred to in paragraph 1 shall address the design, performance, recordkeeping and approval of the algorithmic trading system, trading algorithm or algorithmic trading strategy. They shall also set out the allocation of responsibilities, the allocation of sufficient resources and the procedures to seek instructions within the investment firm.
4
The methodologies referred to in paragraph 1 shall ensure that the algorithmic trading system, trading algorithm or algorithmic trading strategy:
a
does not behave in an unintended manner;
b
complies with the investment firm's obligations under this Regulation;
c
complies with the rules and systems of the trading venues accessed by the investment firm;
d
does not contribute to disorderly trading conditions, continues to work effectively in stressed market conditions and, where necessary under those conditions, allows for the switching off of the algorithmic trading system or trading algorithm.
5
An investment firm shall adapt its testing methodologies to the trading venues and markets where the trading algorithm will be deployed. An investment firm shall undertake further testing if there are substantial changes to the algorithmic trading system or to the access to the trading venue in which the algorithmic trading system, trading algorithm or algorithmic trading strategy are to be used.
6
Paragraphs 2 to 5 shall only apply to trading algorithms leading to order execution.
7
An investment firm shall keep records of any material change made to the software used for algorithmic trading, allowing it to determine:
a
when a change was made;
b
the person that has made the change;
c
the person that has approved the change;
d
the nature of the change.

Conformance testing(Article 17(1) of Directive 2014/65/EU)
Article 6
1
An investment firm shall test the conformance of its algorithmic trading systems and trading algorithms with:
a
the system of the trading venue in any of the following cases:
1. when accessing that trading venue as a member;
2. when connecting to that trading venue through a sponsored access arrangement for the first time;
3. where there is a material change of the systems of that trading venue;
4. prior to the deployment or material update of the algorithmic trading system, trading algorithm or algorithmic trading strategy of that investment firm.
b
the system of the direct market access provider in any of the following cases:
1. when accessing that trading venue through a direct market access arrangement for the first time;
2. when there is a material change affecting the direct market access functionality of that provider;
3. prior to the deployment or material update of the algorithmic trading system, trading algorithm or algorithmic trading strategy of that investment firm.
2
Conformance testing shall verify whether the basic elements of the algorithmic trading system or the trading algorithm operate correctly and in accordance with the requirements of the trading venue or the direct market access provider. For this purpose the testing shall verify that the algorithmic trading system or trading algorithm:
a
interacts with the trading venue's matching logic as intended;
b
adequately processes the data flows downloaded from the trading venue.

Testing environments(Article 17(1) of Directive 2014/65/EU)
Article 7
1
An investment firm shall ensure that testing of compliance with the criteria laid down in Article 5(4)(a), (b) and (d) is undertaken in an environment that is separated from its production environment and that is used specifically for the testing and development of algorithmic trading systems and trading algorithms.
For the purposes of the first subparagraph, a production environment shall mean an environment where algorithmic trading systems effectively operate, and comprise software and hardware used by traders, order routing to trading venues, market data, dependent databases, risk control systems, data capture, analysis systems and post-trade processing systems.
2
An investment firm may comply with the testing requirements referred to in paragraph 1 by using its own testing environment or a testing environment provided by a trading venue, a DEA provider or a vendor.
3
An investment firm shall retain full responsibility for the testing of its algorithmic trading systems, trading algorithms or algorithmic trading strategies and for making any required changes to them.

Controlled deployment of algorithms(Article 17(1) of Directive 2014/65/EU)
Article 8
Before deployment of a trading algorithm, an investment firm shall set predefined limits on:
1. the number of financial instruments being traded;
2. the price, value and numbers of orders;
3. the strategy positions; and
4. the number of trading venues to which orders are sent.