User:Alexkachanov/Finance/Trading

Характер торговли

edit
  • Обычная торговля - неспеша, по телефону/через веб-сайт, редкая, медленная, мелкие инвесторы, на основе бесплатных или задержанных рыночных данных
  • Прямой доступ к рынку - быстро, крупные инвесторы, быстрые рыночные данные
  • Автоматизированная торговля - поручается исполнение ордера алгоритму брокера, решения же о продаже и купле принимает сам инвестор
  • Алгоритмическая торговля, High-frequency trading - решение о продаже или купле принимает алгоритм на основе быстрых рыночных данных. Цель - заработать на арбитраже

Life Cycle of a Trade

edit
  • Trading:
    • Pre-trade analysis
    • Pre-trade risk management
    • Execution
  • Clearing
    • Novation
    • Margin
    • Netting
  • Settlement
    • Fund or Instrument transfer
    • Reporting
    • Collateral management

In this section, we will show how an order flows from an investor to an exchange, how it gets converted into a trade, and how it gets settled. Each order that is initiated by an investor follows a defined life cycle from initiation to settlement (see Figure 1-6). This life cycle is defined worldwide by the existing operational practices of most institutions, and the processes are more or less similar. The emphasis is on getting the orders transacted at the best possible price and on getting trades settled with the least possible risk and at manageable costs. Designated employees in the member’s office ensure that each trade that takes place through them or in their house account gets settled properly. Unsettled trades lead to liability, risk, and unnecessary costs.

The following steps are involved in a trade’s life cycle:

  1. Order initiation and delivery
  2. Risk management and order routing
  3. Order matching and conversion into trade
  4. Affirmation and confirmation (this step is relevant for institutional trades only)
  5. Clearing and settlement

Steps 1 and 3 are generally called front-office functions, and steps 4–5 are called back-office functions. The risk management part in step 2 is a middle-office function, and the routing part is again a front-office function. In the trading and settlement value chain, steps that take place before the order gets executed are called pre-trade. These include order initiation, order delivery, order management and routing, order-level risk management, and so on. Similarly, steps that take place after the order is matched and converted into a trade are called post-trade. The entire gamut of clearing and settlement is known as post-trade activity.

We will cover each of these steps in detail in the following sections. Though the underlying philosophies of executing orders at the lowest costs and performing risk-free settlements remain the same, the operational steps differ from member to member and also from country to country. Also, given an institution, the steps followed differ from client to client. This is actually more linked to the client type rather than to the client. An individual person trading is classified as a retail customer and is hence considered risky. Corporate customers, funds, banks, and financial institutions are called institutional investors. For example, risk management before order routing may be a step that takes place compulsorily for a retail client but could be waived for an institutional client, especially if the institution has a sound financial standing in the market. Additional steps are involved in settling an institutional trade in comparison to a retail trade. This difference is because institutions normally outsource their settlement function, and members have to talk to this additional agency. Institutions also have a number of checks and balances that each member has to follow.

Order Initiation and Delivery

edit

This is the first step, and it involves accepting orders from a client and forwarding them to the exchange after doing risk management checks.

Clients keep a close eye on the markets and keep scouting for investment opportunities. They form a view about the market. View alone, however, is not enough to produce profits. Profits come from maintaining a position in the market. Positions are the results of trades that investors execute in the markets. Clients place orders with their brokers through multiple delivery channels. Some popular channels for placing orders include phones, faxes, the Internet, and interactive voice response systems (IVRSs). The majority of brokers have built-in capabilities to allow clients to submit their orders through personal digital assistants (PDAs) and other handheld devices. Institutions usually place a large number of orders. Most institutions submit their orders in soft-copy format through a floppy disk or any other bulk-upload medium.

Those who trade a lot in a particular market may even demand that the broker gives them a dedicated trading terminal. They may also set up their own trading terminal that connects to the broker’s trading terminal/server through a proprietary protocol or industry-standard protocol such as Financial Information Exchange (FIX), which is a technical specification prepared in collaboration with brokers, exchanges, banks, and institutional investors to enable the seamless exchange of trading information between their systems.

Systems with broker and trading institutions generate orders automatically depending upon the market conditions. Trading on such automatically generated orders is called program trading and is not allowed in some markets because it is perceived to cause volatility.

Regardless of the methodology used for order delivery, the broker carefully records the orders so that there is no ambiguity or mistakes in processing. Almost all brokers record the conversation between clients and brokers, which can be used later for dispute resolution in case any ambiguity exists over what was communicated and what was interpreted and executed.

Institutions normally speak to a sales desk of the broker and get a feel for the market. An institution or the fund manager who places the order may be managing multiple funds. At the time of placing the order, however, the fund manager may not know to which fund he will allocate the securities bought/sold. At the point of placing the order, the fund manager just instructs the sales desk of the broker to execute the order.

An individual order received from a client is tagged with some special conditions such as good till cancelled (GTC), good till date (GTD), limit order, market order, and so on. These conditions dictate the rate and condition at which the customer expects the orders to be executed. The member on a best-effort basis accepts the order. Unless an institution specifically demands it, there is no standard practice of giving back-order confirmation details. This essentially means that the clients work with brokers on good faith that the broker has understood their order terms clearly and will get it executed at the best possible price. It is important that brokers preserve the sanctity of the conditions specified and get the orders executed within the boundaries of specification. Failure to do so will result in the client moving to a different brokerage house.

Note: Reputation is far more important than any other attribute in this business. Institutions like brokers who get their orders executed at the best possible prices and save them money. Standard methodologies are available for institutions to measure the performance of brokers.

Risk Management and Order Routing

edit

Regardless of how an order gets generated or delivered, it passes through a risk management matrix. This matrix is a series of risk management checks that an order undergoes before it is forwarded to the exchange. We discussed earlier that the onus of getting the trades settled resides with the broker. Any client default will have to be made good to the clearing corporation by the broker. Credit defaults are thus undesirable from the point of view of the broker who puts money and credibility on the line on behalf of the customer. Hence, these credit and risk management checks are deemed necessary.

Institutions are normally considered less risky than retail customers. That is because they have a large balance sheet compared to the size of orders they want to place. They also maintain a lot of collateral with the members they push their trades through. Their trades are hence subjected to fewer risk management checks than retail clients.

The mechanisms followed when orders are accepted and sent to exchanges for matching are the same for both institutions and retail clients. However, for retail customers the orders are subjected to tighter risk management checks and scrutiny. The underlying assumption in all such risk management checks is that retail clients are less credit worthy and hence more susceptible to defaulting than institutions. A recent extension of retail trading has been trading through the Internet. This exposes brokers to even more risk because the clients become faceless. In the good old days of “call and trade” (receiving orders by phone), most brokers executed transactions of clients they knew. With the advancement in trading channels, the process of account opening became more institutionalized, and the numbers came at the expense of client scrutiny. Most brokers who operate on behalf of retail clients these days operate on the full-covered concept. This means that while accepting orders from retail clients, they cover their risks as much as possible by demanding an equal value of cash or near cash securities.

We’ll briefly cover how a retail transaction is conducted so you can understand the benefit provided by risk management. The method utilized is more or less the same in call and trade as in Internet trading. The order delivery mechanism changes, but the basic risk management principle implemented remains the same. Here are the steps:

  1. The client calls the broker to give the orders for a transaction (in Internet trading the client logs on to the Internet trading site, provides credentials, and enters orders).
  2. The broker validates that the order is coming from a correct and reliable source.
  3. In case the client gives a buy order, the broker’s system makes a query to ascertain whether the client has enough balance in a bank account or in the account the client maintains with the broker. In case the client does not have enough balance, the order is rejected even before forwarding to the exchange. If the client has the balance, the order is accepted, but the value of the order is deducted from the client’s balance to ensure that he does not send a series of orders for which he cannot make an upfront payment. Many brokers still do not have direct interfaces to a banking system. In such cases, they ask the client to maintain a deposit and collateral in the form of cash and other securities; they keep the ledger balances of a client’s cash and collateral account in their back-office system and query this system while placing the order to ensure that the client has enough money in his account (see Figure 1-7).
  4. In case a client gives a sell order, the broker checks the client’s custody/demat account to ensure that he has a sufficient balance of securities to honor the sale transaction. Short selling is prohibited in most countries, and brokers need to ensure that the client is not short of securities at the time of settlement, especially in markets that do not have an adequate stock-lending mechanism in place. Most markets have an auction mechanism in place for bailing out people with short positions, but such bailouts could be very expensive. Once the sale transaction is executed, the broker keeps a record and updates the custody balance’s system if it is in-house or keeps reducing the figures from the figures returned by the depository to reflect the client’s true stock account position. In many countries, brokers have a direct interface with the depository system that lets them query the amount of shares of a particular company in which the client has balances. Wherever a direct interface is absent, the broker maintains the figures in parallel; the broker then does a periodic refresh of this data by uploading the figures provided by the depository and maintains a proper intraday position by debiting figures in his system when the clients give sale orders that are executed on the exchange (see Figure 1-8).
  5. Once the risk management check passes, the client’s order is forwarded to the exchange.
  6. On receipt of the order, the exchange immediately sends an order confirmation to the broker’s trading system.
  7. Depending upon the order terms and the actual prices prevailing in the market, the order could get executed immediately or remain pending in the order book of the exchange.

You can appreciate the role technology plays when you consider that the entire process of receiving the order, doing risk management checks, forwarding the order to the exchange, and getting back the confirmation is expected to take a few hundredths of a second. Any performance not conforming to this standard is considered unacceptable and could be a serious reason for clients to look for other brokers who can transact faster and get them more aggressive prices.

One of the ways of implementing risk management is through margining. A margin is an amount that clearing corporations levy on the brokers for maintaining positions on the exchange. The amount of margin levied is proportional to the exposure and risk the broker is carrying. Since positions may belong to a broker’s clients, it is the broker’s responsibility to recover margins from clients. Margins make the client stand by trades in case the market goes against the client by the time the trades get settled.

Let’s examine this concept using an example: Suppose a client purchased 1,000 Microsoft shares at $45 per share. The total amount needed to be paid to the clearing corporation at the time of settling the transaction is $45,000. But this is payable only after two days of executing the transaction. This is because in most markets there is a lag of two days between executing the transaction and finally settling it. Assume on the next day of transacting—that is, T+1—there is adverse news about Microsoft that causes the stock price to drop 10 percent. The client would see an erosion of $4,500 straight from his account if he has to honor the position. The client would have a strong incentive to default in this transaction merely by not showing up to the broker to make the payment. To protect the market from such defaulters, clearing corporations levy margins on the date of the trade. Margins are computed and applied to a client’s position in many ways, but the underlying philosophy of levying margins is to tie the customer to a position and preserve the integrity of the market even if a large drop in stock prices occurs.

Order Matching and Conversion into Trade

edit

All orders are aggregated and sent to an exchange for execution. Chapter 2 explains the entire process of order matching in detail. Stock exchanges follow defined rules for matching all the orders they receive. While protecting the interests of each client, the exchange tries to execute orders at the best possible rates. The broker’s trading system communicates with the exchange’s trading system on a real-time basis to know the fate of orders it has submitted.

A broker keeps a record of which orders were entered during the day, by whom, and on behalf of which client. A broker also maintains details of how many orders were transacted and how many are still pending to be executed. Using this system, a broker can modify the order and order terms, cancel the order, and also split the order if required depending upon the behavior of the market and instructions from the clients. Once the order is executed, it gets converted to a trade. The exchange passes the trade numbers to the broker’s system. The broker in turn communicates these trade details to the client either during the day or by the end of the day through a contract note or through an account activity statement. The contract note is a legal document that binds the broker and the client. Contract note delivery is a legal requirement in many countries. Apart from the execution details, the contract note contains brokerage fees and other fees that brokers levy for themselves or collect on behalf of other agencies such as the clearing corporation, exchange, or state.

Affirmation and Confirmation

edit

This step is present only when the trading client is an institution. Every institution engages the services of an agency called a custodian to assist them in clearing and settlement activities (see Figure 1-9). As the name suggests, a custodian works in the interest of the institution that has engaged its services. Institutions specialize in taking positions and holding. To outsource the activity of getting their trades settled and to protect themselves and their shareholder’s interests, they hire a local custodian in the country where they trade. When they trade in multiple countries, they also have a global custodian who ensures that settlements are taking place seamlessly in local markets using local custodians.

As discussed earlier, while giving the orders for the purchase/sale of a particular security, the fund manager may just be in a hurry to build a position. He may be managing multiple funds or portfolios. At the time of giving the orders, the fund managers may not really have a fund in mind in which to allocate the shares. To avoid a market turning unfavorable, the fund manager will usually give a large order with the intention of splitting the position into multiple funds. This is to ensure that when he makes profits in a large position, it gets divided into multiple funds, and many funds benefit.

The broker accepts this order for execution. On successful execution, the broker sends the trade confirmations to the institution. The fund manager at the institution during the day makes up his mind about how many shares have to be allocated to which fund and by evening sends the broker these details. These details are also called allocation details in market parlance. Brokers then prepare the contract notes in the names of the funds in which the fund manager has requested allocation.

Along with the broker, the institution also has to liaise with the custodian for the orders it has given to the broker. The institution provides allocation details to the custodian as well. It also provides the name of the securities, the price range, and the quantity of shares ordered. This prepares the custodian, who is updated about the information expected to be received from the broker. The custodian also knows the commission structure the broker is expected to charge the institution and the other fees and statutory levies.

Using the allocation details, the broker prepares the contract note and sends it to the custodian and institution. In many countries, communications between broker, custodian, and institutions are now part of an STP process. This enables the contract to be generated electronically and be sent through the STP network. In countries where STP is still not in place, all this communication is manual through hand delivery, phone, or fax.

On receipt of the trade details, the custodian sends an affirmation to the broker indicating that the trades have been received and are being reviewed. From here onward, the custodian initiates a trade reconciliation process where the custodian examines individual trades that arrive from the broker and the resultant position that gets built for the client. Trades are validated to check the following:

  • The trade happened on the desired security.
  • The trade is on the correct side (that is, it is actually buy and not sell when buy was specified).
  • The price at which the trade happened is within the price range specified by the institution.
  • Brokerage and other fees levied are as per the agreement with the institution and are correct.

The custodian usually runs a software back-office system to do this checking. Once the trade details match, the custodian sends a confirmation to the broker and to the clearing corporation that the trade executed is fine and acceptable. A copy of the confirmation also goes to the institutional client. On generation of this confirmation, obligation of getting the trade settled shifts to the custodian (a custodian is also a clearing member of the clearing corporation).

In case the trade details do not match, the custodian rejects the trade, and the trades shift to the broker’s books. It is then the broker’s decision whether to keep the trade (and face the associated price risk) or square it at the prevailing market prices. The overall risk that the custodian is bearing by accepting the trade is constantly measured against the collateral that the institution submits to the custodian for providing this service.

Clearing and Settlement

edit

With hundreds of thousands of trades being executed every day and thousands of members getting involved in the entire trading process, clearing and settling these trades seamlessly becomes a humungous task. The beauty of this entire trading and settlement process is that it has been taking place on a daily basis without a glitch happening at any major clearing corporation for decades. We discussed earlier that apart from providing a counterguarantee, one of the key roles of a clearing corporation is getting trades settled after being executed. We will now cover in brief how this entire process works.

After the trades are executed on the exchange, the exchange passes the trade details to the clearing corporation for initiating settlement. Clearing is the activity of determining the answers to who owes the following:

  • What?
  • To whom?
  • When?
  • Where?

The entire process of clearing is directed toward answering these questions unambiguously. Getting these questions answered and moving assets in response to these findings to settle obligations toward each other is settlement (see Figure 1-10). Thus, clearing is the process of determining obligations, after which the obligations are discharged by settlement. It provides a clean slate for members to start a new day and transact with each other.

When members trade with each other, they generate obligations toward each other. These obligations are in the form of the following:

  • Funds (for all buy transactions done and that are not squared by existing sale positions)

Normally, in a T+2 environment, members are expected to settle their transactions after two days of executing them. The terms T+2, T+3, and so on, are the standard market nomenclature used to indicate the number of days after which the transactions will get settled after being executed. A trade done on Monday, for example, has to be settled on Wednesday in a T+2 environment. As a first step toward settlement, the clearing corporation tries to answer the “what?” portion of the clearing problem. It calculates and informs the members of what their obligations are on the funds side (cash) and on the securities side. These obligations are net obligations with respect to the clearing corporation. Since the clearing corporation identifies only the members, the obligations of all the customers of the members are netted across each other, and the final obligation is at the member level. This means if a member sold 5,000 shares of Microsoft for client A and purchased 1,000 shares for client B, the member’s net obligation will be 4,000 shares to be delivered to the clearing corporation. Because most clearing corporations provide novation (splitting of trades, discussed in more detail in Chapter 2), these obligations are broken into obligations from members toward the clearing corporation and from the clearing corporation toward the members. The clearing corporation communicates obligations though its clearing system that members can access. The member will normally reconcile these figures using data available from its own back-office system. This reconciliation is necessary so that both the broker and the clearing corporation are in agreement with what is to be exchanged and when.

In an exchange-traded scenario, answers to “whom?” and “where?” are normally known to all and are a given. “Whom?” in all such settlement obligations is the clearing corporation itself. Of course, the clearing corporation also has to work out its own obligations toward the members. Clearing members are expected to open clearing accounts with certain banks specified by the clearing corporation as clearing banks. They are also expected to open clearing accounts with the depository. They are expected to keep a ready balance for their fund obligations in the bank account and similarly maintain stock balances in their clearing demat account. In the questions on clearing, the answer to “where?” is the funds settlement account and the securities settlement account. The answers to “what?” and “when?” can change dramatically. The answer to “when?” is provided by the pay-in and pay-out dates. Since the clearing corporation takes responsibility for settling all transactions, it first takes all that is due to it from the market (members) and then distributes what it owes to the members. Note that the clearing corporation just acts as a conduit and agent for settling transactions and does not have a position of its own. This means all it gets must normally match all it has to distribute.

Two dates play an important role of determining when the obligation needs to be settled. These are called the pay-in date and the pay-out date. Once the clearing corporation informs all members of their obligations, it is the responsibility of the clearing members to ensure that they make available their obligations (shares and money) in the clearing corporation’s account on the date of pay-in, before the pay-in time. At a designated time, the clearing corporation debits the funds and securities account of the member in order to discharge an obligation toward the clearing corporation. The clearing corporation takes some time in processing the pay-in it has received and then delivers the obligation it has toward clearing members at a designated time on the date of pay-out. It is generally desired that there should be minimal gap between pay-in and pay-out to avoid risk to the market. Earlier this difference used to be as large as three days in some markets. With advancement in technology, the processing time has come down, and now it normally takes a few hours from pay-in to pay-out. Less time means less risk and more effective fund allocation by members and investors. The answer to “when?” is satisfied by the pay-in and pay-out calendar of the clearing corporation, which in turn is calculated depending upon the settlement cycle (T+1, T+2, or T+3).

Answers to “what?” depend on the transactions of each member and their final positions with respect to the exchange. Suppose a member has done a net of buy transactions; he will owe money to the clearing corporation in contrast to members who have done net sell transactions, who will owe securities to the clearing corporation. To effect settlements, the clearing corporation hooks up with banks (which it normally calls clearing banks) and depositories. It has a clearing account with the clearing bank and a clearing account with the depository as well. A clearing bank account is used to settle cash obligations, and a clearing account with a depository is used to settle securities obligations.

Funds Settlement
edit

Funds settlement is relevant for all buy transactions that are not netted off by offsetting the sale transaction. This is required because brokers have to pay for all the securities they have purchased. For funds settlement, every broker is required to open a clearing account with a clearing bank designated by the clearing corporation. The broker then needs to ensure that he parks the required amount, as specified in funds obligation by the clearing corporation, in the clearing account before the pay-in. For obligations arising because of transactions done by the client, the broker has to collect money from the client. Hence, the following takes place:

  1. For a buy transaction, the client issues a check-in favor of his broker or pays money through other acceptable payment channels.
  2. The broker calculates (and also receives as a notice from a clearing corporation) his total monetary obligation and deposits money accordingly in the clearing account. (Since this deposit is a routine activity, he normally keeps a deposit in the clearing account much like a current account, and the clearing corporation keeps debiting and crediting his account depending upon whose obligation is toward whom. The clearing corporation also pays money to the clearing member in case a member is a net seller of securities; in this case, the money is the sale proceeds of the member.)
  3. The clearing corporation debits this clearing account by the amount of money required to meet the settlement obligation at the time of pay-in. As discussed in the previous step, if the obligation is in favor of the broker, the clearing corporation credits the broker’s clearing account during pay-out.

In case a client has sold securities and needs to be paid, the broker will issue a check after receiving the money from the clearing corporation during pay-out.

All funds obligation is therefore managed by debiting and crediting this clearing account. Moving money from and to this account rarely takes place through checks these days. Standard banking interfaces and electronic funds movement channels move money from one account to another. Also note that the clients can be based in a city that is different from where the broker has a clearing account. Clients are not required to deposit checks directly in the clearing account. They submit their checks locally to the broker’s office, and the broker’s staff can deposit the check in a local branch or forward it to the head office. As discussed earlier, all money required to meet the obligation has to reach the clearing account by T+2 in a T+2 settlement regime. This makes keeping large working capital necessary. In some countries, brokers have special arrangements with their banks to treat money in the local branch accounts as money in the clearing account and will honor the clearing request made by the clearing corporation as long as the sum of all money in such accounts is more than the demand made by the clearing corporation. They also have the facility to move this money swiftly, often on an intraday or next-day basis, so that such obligations can be met.

With funds settlement, settlement is only partially complete. Even the securities side has to be settled for settlement to be complete.

Securities Obligation
edit

All efforts are directed toward ensuring that the clearing corporation receives the shares before the pay-in time. Just like a broker maintains a clearing account for funds with a designated clearing bank, brokers are required to maintain a clearing account for securities with the depository. At the time of pay-in, the clearing corporation just puts its hands in this clearing account and takes whatever has been placed there for meeting the securities obligation.

The clearing account for the securities of a broker can be logically divided into three parts, as shown in Figure 1-11.

Receipt Account
Pool Account
Delivery Account

Whatever securities the broker is required to deliver to meet his pay-in requirements move to the delivery account. Note that the existence of a delivery account is logical only in theory. Hence, there is no movement of shares per se. What actually happens is that brokers give special instructions earmarking securities for pay-in. It is an express statement that authorizes the clearing corporation to pick up these shares and use them toward the discharge of a broker’s obligation. This express statement is necessary because at the time of pay-in, the broker may have a large reserve of securities in his pool account that may not be meant for delivery, and all such securities need to be ignored while picking up the securities.

Just like funds obligation arises from purchase transactions, securities obligation arises from sale transactions of a client. To discharge this obligation, clients need to move securities from their accounts to the clearing corporation accounts. They do this using a three-step process:

  1. The client gives a debit instruction in his account and credits the broker’s securities account with the required number of shares. With completion of this step, the shares move from the client’s securities account to the broker’s pool account.
  2. The broker marks these securities for pay-in and moves them logically from his pool account to the delivery account.
  3. At the time of pay-in, the clearing corporation takes all the securities in the delivery account to discharge the broker’s securities obligation.

This, however, does not complete settlement. Note that the broker could also be a buyer of some securities. He will receive these securities in his receipt account during pay-out. This receipt account is also a logical account. The shares will actually reside in the pool account itself, but they will be properly classified as “received in pay-out for a particular settlement.”

For the settlement of securities that clients have purchased through a broker, the broker gives a debit instruction in his securities account favoring the client. As a result, shares move from the broker’s account to the client’s account. A broker will move shares to the client’s account after the client has paid for the purchase. Figure 1-12 illustrates this process.

Transactions are thus called settled when both the funds part and the securities part are settled. This provides traders with a clean slate to trade afresh without worrying about the consequences of trades they did in the past. Settlements ensure that their transactions have reached finality and that the benefits of executing the transactions will accrue to them.

After understanding the basics of how transactions are executed and settled, you will now explore another important aspect, STP. STP plays an important role in getting all the participants together in a way that good synergy is achieved and that the operational time, risk, and cost of getting this entire cycle from order initiation to settlement is automated.

Understanding the Three I’s (Intelligence) of Performance in Capital Markets

edit

Performance is the mantra for all high-performance or mission-critical applications. This is generally overlooked in small-scale applications where the number of users is limited and the number of transactions conducted is relatively small. Performance goals in such small-scale applications are often sidelined or considered only during the design phase, and no additional thought process is usually invested subsequently. This is in direct contrast to mission-critical applications where performance is given serious thought in every phase, is continuously refined, and is constantly evidenced in the form of significant growth and improvement in the overall functioning of the system. Efficiency of applications revolves around the following main objectives of performance:

  • Responsiveness: Responsiveness is measured by how fast the system reacts to a user request.
  • Latency: Latency is the quantum of time taken to get a response. Latency is usually high in a networked application.
  • Throughput: Throughput is often measured during a peak time and depicts the application’s full potential to handle the maximum load in a given amount of time.
  • Scalability: Scalability is often overstressed, but in reality it relates to the scaling of hardware resources.

Several guidelines provide a wealth of information about how to achieve these objectives, and even some best programming practices will elevate the performance of an application to a certain level. However, remember that performance is an art and cannot be achieved by applying some straightforward cookbook rules. You can achieve these goals only by closely evaluating the environment under which the application is sheltered and then applying the appropriate intelligence that best suits the environment. In fact, sometimes techniques applied to boost performance in one environment prove to be ill-suited for another environment.

In the financial world, performance holds center stage, and a lack of good performance is a primary reason for discarding an existing application and then rebuilding it from scratch. It also means that the performance of an application is tightly coupled with its underlying design. It is the application’s design that is not capable of meeting the required quality of service that a typical business demands. Also, such problems do not spring up immediately but become evident as time passes. It also implies a direct relationship between design and time, as shown in Figure 1-18.

In Figure 1-18, the lower rectangular bar represents time, and the upper bar represents design. On the left, notice that until a certain point, design is completely in sync with time; however, design loses track as the height of the design bar increases. This phase reflects a change in design either because of a drastic change in the business requirement that was unwarranted at this stage of time or because of some poor assumption based on which the design was realized and finally failed to meet the required expectations. In the final stage, the design bar returns to its original shape and size, but notice that the inner filling in the bar is shaded, which is different from the original bar. This indicates that the old design has been completely scrapped, resulting in a completely new design. On the right, the design is completely in sync with time and therefore considered to be a good design. So, what makes a good design? Some audiences consider even a badly designed application that has the potential to cater to a business expectation as a good design. Therefore, it is difficult to provide a definition of good design; however, a good design is one that considers the three constellations of time: past, present, and future. A rock-solid design must be designed from the past, designed with the present, and designed for the future. It means a design must fill all the missing gaps in the past, must handle all the current requirements, and must handle any future needs. In a nutshell, a good design is a time traveler.

Although performance is an important aspect of design, you must consider another important aspect: user requirements. At the end of the day, if the application fails to win customer hearts by not meeting their business needs, it would still be considered a bad design even if it is free from any architectural flaws. In the financial world, both performance and user requirements are key sensitive areas. User requirements are expected to change, which is inevitable, but performance-related issues are avoidable. In a broader sense, you can achieve good performance by applying the three levels of intelligence in an application shown in Figure 1-19.

In fact, by mixing these three levels of intelligence in the right proportion, you can develop a rock-solid application.

Machine Intelligence

edit

Machine intelligence is inclined toward the programmatic perspective of an application. The best way to implement this intelligence is by religiously following the best programming practices and applying well-proven architectural standards. The most common practices followed in high-performance applications are applying parallelism, which is achieved using multithreading; devising a highly optimized algorithm; and exploiting platform- or hardware-specific capabilities.

Domain Intelligence

edit

Domain intelligence goes hand in hand with machine intelligence. To apply such intelligence, the team must be cognizant of both domain- and technology-specific details. When domain intelligence is applied at the right place, it gives a multifold increase in the performance of the application. This intelligence is often ignored during the performance-engineering phase of a system where a team’s energy is primarily mobilized toward implementing all sorts of machine-level intelligence.

Let’s take a market data example where introducing domain intelligence along with machine intelligence provides a tremendous performance boost: Market data applications broadcast the latest price of a stock. Several consumers then process this information. These real-time prices are often displayed on most financial Web sites. The price of stocks tends to lose tempo whenever there is a swing in the market behavior. This swing period lasts for a short span of time, and during this period almost every stock price is affected. This period is called a data-quake because the system will notice a huge surge of data, and this sometimes may even lead to a system crash. Even if you assume that the first line of defense is strong and the market data service is able to survive this data-quake, remember that this information needs to further trickle down to the consumers; thus, the consumers of this information could also face the same disaster.

So, how do you escape from such a deluge of data? Although no easy solution exists, you can deal with this by applying domain-level intelligence. Before applying this intelligence, you need to understand the business implication behind this data that will help control the flow of data. Let’s say your investigation disclosed that most stock prices tend to change at least 100 times a second. So, instead of pushing this change immediately to downstream systems, you can throttle it for a second. During this throttling period, data will not be pushed; rather, it will undergo a price-replacement process that will blindly override the old price of a stock with the new price. As data gets published only after the expiry of 1 second, it effectively controls the flow of data from flooding the market data ecosystems. Even though the first line of market data service will receive roughly about 100 messages per second for any given stock, this will not affect downstream systems because they will receive throttled messages at the rate of one message per second.

Human Intelligence

edit

Human intelligence is user-centric. This may come as a surprise; the question that is immediately raised is, what type of contribution will users make toward improving the performance of the application? To be more precise, it is not the performance specification from users but their postures toward the system that will drive the performance of the application. You must follow the important principle What-You-Ask-Is-What-You-Get (WYAIWYG) to provide users with what they demand rather than what is merely provided by the system. For example, it does not make sense to paint the user screen with thousands of orders that are far beyond the range of the human eyeball, even if the system has the capacity to provide this. It is also important to keep a close eye on a user’s behavior toward applications and also spend a fair amount of effort gathering this intelligence by spending time with users and watching their screen interactions and mouse movements.

You can further optimize the market data service discussed in the earlier “Domain Intelligence” section by infusing elements of human intelligence into it. You already know that any given stock price is updated at least 100 times a second, and if the user has subscribed to 100 stocks, this would result in the system processing 10,000 message per second. But in reality, the user may not view all 100 stocks but keep a watch over only a few volatile stocks. So, if the system temporarily suspends subscribing to a stock that is not viewed by the user, then it would give a fair amount of breathing space to system resources, which would in turn be less taxed and also effectively utilized. This clearly explains the merit of applying human intelligence, which is often overlooked.

Thus, it is important to apply both domain and human intelligence to extract every bit of performance. Furthermore, it is also important to understand that a threshold factor is associated with machine-level intelligence. After a certain level, you will have no room left for any kind of improvement, and once you have exhausted this resource, the only alternative is to leverage the domain and human intelligence in a balanced manner.

Types of Orders

edit

Administrative Limits

edit
  • Cancel former order (CFO): A new order replaces an existing order. The old order is canceled, and the new order is entered in the market. This type of order is used to update limit order prices, for example.
  • Discretionary order: This is an order that you give to a broker along with some discretion as to when or at what price the order is to be entered. The owner of the account must decide which security to trade, whether to buy or sell, and the quantity. The broker can be given discretion as to time (when to execute the order) or price. For example, “If the market trades higher at the open, buy 5 December 45 T calls.” No limited power of attorney is needed. It is also possible

to give someone else discretion to trade your account. This requires executing a limit power of attorney.

Price Limits

edit
  • Market price order: This type of order allows buying or selling securities at the best price, obtainable at the time of entering the order. The price for such orders is left blank and is filled at the time of the trade with the latest running price in the exchange.
  • Price conditions/limit price order: This type of order allows the price to be specified when the order is entered into the system.
  • Stop loss (SL) price/order (Market if touched): SL orders allow the trading member to place an order that gets activated when the market price of the relevant security reaches or crosses a threshold price. Until then, the order does not enter the market. A sell order in the SL book gets triggered when the last traded price in the normal market reaches or falls below the trigger price of the order.
  • Stop limit order: A stop price and a limit price are designated. When the stop price is hit, the stop order becomes a limit order and must be filled at the limit price or better.

Time Limits

edit
  • Immediate or cancel (IOC) order: An IOC order allows a trading member to buy or sell a security as soon as the order is released into the market; failing that, the order will be removed from the market. If a partial match is found for the order, the unmatched portion of the order is cancelled immediately.
  • Good till cancelled (GTC) order: A GTC order is an order that remains in the system until the trading member cancels it. It will therefore be able to span several trading days until the time it gets matched. The exchange specifies the maximum number of days a GTC order can remain in the system from time to time.
  • Good till date (GTD) order: A GTD order allows the trading member to specify the days or a date up to which the order should stay in the system. At the end of this period, the order will automatically get flushed from the system. All calendar days, including the starting day in which the order is placed and holidays, are counted. Once again, the exchange specifies the maximum number of days a GTD order can remain in the system from time to time.
  • Day Only: The order will be cancelled if it is not filled by the end of the day. This is a good ploy because it encourages the floor traders to deal. If they don’t by the end of the day, then they won’t get their commission, so there is an incentive for floor traders to put this type of trade nearer to the top of their list.
  • Week Only: The order will be cancelled if it is not filled by the end of the week.
  • Market on close or market on open: These orders must be filled at the period specified by the exchange as closing or opening, usually 15 minutes before closing or 15 minutes after opening.

Volume Limit

edit
  • Fill or Kill: The order of maximum priority. If it is not filled immediately, the order is cancelled. A fill or kill order is bound to capture the attention of the floor trader, but if it is a limit order, then you need to make it realistic.
  • All or None order: Either the entire order is filled or none of it. This is not generally a good idea given that many trades are not filled all at once anyway because there has to be a buyer or seller on the other side, and most of the time they won’t be specifically dealing in the same lot sizes as your order. So if you want to be sure to get filled, do not go for all or none!

Note that for all of these order types, the behavior of an order is determined by a set of special attributes. Every order entered by a buyer or seller follows the same basic principle of trading, but this special attribute further augments the nature of an order by having a direct (or indirect) effect on the profitability of a business. For example, if an order’s last traded price was $15 and a limit buy order was placed with a limit price of $15.45 with a stop loss at $15.50, this order would be sent to the market only after the last traded price is $15.50, and it would be placed as a limit price order with the limit price of $15.45.


Levels of Touch

edit

There are now two separate worlds in trading: Low Touch Orders, or smaller orders with little, if any, expected market impact; and High Touch Orders, or larger orders with significant expected market impact.

Most importantly, Low Touch Orders are an easily automated commodity. These trades occur in an all electronic world under tight regulatory oversight, in thousandths or millionths of seconds, and at low cost. Traders in a Low Touch world have little, if any, opportunity to add value as they simply hit ENTER or "drag and drop" to execute these trades. High Touch Orders, on the other hand, are challenging, expensive, and time‐consuming. Unlike Low Touch Orders, High Touch trades require the skill of an experienced and talented trader.

Low Touch Orders

edit

The vast majority of institutional order flow traded today, perhaps as much as 75%, is represented by Low Touch Orders. An order to buy 1,000 shares of Microsoft (MSFT), for example, is considered a Low Touch Order as this trade is immediately executed against thousands of shares available in MSFT at any moment in time. Trading of Low Touch Orders is marked by automation for the trader, high speed of execution, and the potential for low cost. Overall, research suggests that an order of less than 4% of Average Daily Trading Volume (ADV), that is, an order for a number of shares less than 4% of the average daily share volume traded in an issue, is a Low Touch Order best executed electronically without human involvement.

Given today’s sophisticated order management systems (OMS), the trading of Low Touch Orders has been mostly automated, meaning certain order sizes and types are automatically routed to designated executing brokers. Agency‐only executing brokers such as Jones Trading, UNX, BNY ConvergEx, and Instinet execute these orders through electronic order books (such as exchanges and ECNs), at high speed and with the most sophisticated trading technology available. Low execution costs are locked in by contract between the buy side firm and executing broker.

To optimize their value‐add, executing brokers employ internal trading technology known as smart order routers that examine, in real‐time, the liquidity (shares available) across all the trading venues in the market and, to satisfy the requirements of Regulation National Market System or Reg NMS, automatically route an order to those execution venues that offer the best price. This process occurs without any involvement by the firm sending the order to the executing broker.

For example, an order for 1,000 shares is routed to an executing broker. The executing broker’s “smart order router” scans the markets in real‐time and may for example, in milliseconds, buy 500 shares on the NYSE, 300 shares on the ISE (International Securities Exchange), and 200 shares on the Millennium dark pool. The 1,000 share order is filled through executions on three different markets with each piece executed at the best available price. The buyer sees three fill reports totaling 1,000 shares hit their computer screen and the order is quickly — and completely — filled. Sometimes, the automation in executing Low Touch Orders is likened to “watching the dryer run.” Importantly, under Reg NMS, execution venues are delegated responsibility, first and foremost, to ensure that each order receives Best Execution (Best Ex). As a result, execution venues, including market makers, are required to file monthly SEC Rule 605 reports with the SEC to comply with requirements of proper supervision of their Best Ex requirements.

High Touch Orders

edit

High Touch Orders are those orders with significant expected market impact e.g., an order to buy one million shares of an issue that usually trades four million shares per day. Overall, research suggests that an order of more than 4% of Average Daily Trading Volume (ADV), that is, an order for a number of shares greater than 4% of the average daily share volume traded in an issue, is a High Touch Order requiring a customized trading strategy for that order

Not only do traders have to locate the desired number of shares and complete the transaction at the best possible price, they must also strive to minimize adverse market impact of the order on the price of the issue. And they have to do all of this while protecting anonymity (hiding their identity and trading strategy) from other trading firms and money managers. Why? There are two reasons: First, High Frequency Trading (HTF) firms, according to a study by Quantitative Services Group (QSG), use powerful supercomputers and virtually instantaneous communications networks to seek out and exploit trading patterns established by High Touch Orders. High Frequency Trading firms trade ahead of High Touch orders to lock in trading profits that result in less favorable share prices to money managers. Second, competing money managers often utilize leaks in trade information to discern their competitors’ investment strategies.

The trading of High Touch Orders, in other words, remains both complex and individually customized, especially in comparison to the simple, easy, and fast process for executing Low Touch Orders. And therein lies the fundamental difference between High Touch Orders and Low Touch Orders: The execution of High Touch trades cannot be automated.

“Working” an Order

edit

With High Touch Orders, a trader conducts a custom analysis for each order, including the desired number of shares in the order; the current liquidity available and depth of book in the issue on the displayed markets and dark pools; a technical analysis of the historical volume and price trends for the issue; an analysis of how market impact may vary with different trading strategies; the overall tempo, direction and volatility of the market; any recent news in the issue, industry and market; the strengths and weaknesses of their executing broker relationships; the estimated depth of inventory of the market makers in the issue; and the available algorithms and block trading options.

With this analysis (which can take up to 10 minutes for a single order) and a degree of “gut instinct”, a trader will select the combination of tools and resources best suited to that order. “Now that trader really sits in the hot seat,” says Ms. Berke, principal at the Tabb Group, in summarizing the challenges in executing High Touch Orders. “These days there is a heightened responsibility for choosing the correct methodology for executing, for preserving every last ounce of alpha and rebuilding performance.”

The execution strategy for a High Touch Order could include, individually or in combination, any of the following: a single or series of trading algorithms, a dark pool or multiple dark pools, one or more block trading desks, smart order routers, discussion with market makers, requests for commitments of capital, and sending or monitoring indications of interest (IOIs). As these factors change over the course of the trading day or days required to complete the order, traders will monitor the progress of their execution strategy and modify that strategy, in real‐time, as important developments occur.

Once the execution of an order is complete, a trader gathers statistics on the overall performance of the strategy. These statistics regarding the execution of High Touch Orders are critical toward grading the trader’s performance and, ultimately, in determining bonus compensation.