Transaction costs occur when you buy or sell securities. These costs include the commissions charged by your broker as well as other costs. As an intermediary, a broker or a bank charges commissions for every transaction you made. This kind of commission could be fixed, dependent on the number of traded shares or as a percentage of the total volume of the transaction. There is also, what is called the liquidity cost. This cost occurs when you buy or sell securities using market orders. In this case, besides the commission paid to the broker, you will also pay the bid-ask spread, which is the difference between the bid price and the ask price of the security. You can avoid this cost by making transactions using limit orders for example, but this will incur another type of cost, which is the opportunity cost. Using limit orders, your transaction may or may not be executed. If you miss a transaction because the security price did not reach your limit price, then you may miss potential profitable trades and this is what is called the cost of opportunity. We are not done yet, there are still other costs. The market impact cost occurs when you trade too aggressively or when you buy and sell large positions. Big transaction orders impact the security price that consequently will increase and you will end up buying a security at a higher price. This often occurs in stocks that are not very liquid. Another important cost is the difference between your transmitted order price and the price execution. This is mainly due to delays on the Internet and it is known as "slippage". Some refer to "Slippage" as this delay cost plus the liquidity cost. Thus, the "Slippage" could be calculated as the difference between the current security price and the execution price. Transaction costs in QuantShare Transaction costs are made of several trading costs. These costs vary widely from a security to another and so the transaction costs. These trading costs are very important and can easily turn a profitable trading strategy into an unprofitable one. Depending on the strategy you are testing, you may need to include and adjust these costs into your trading software. When working with the simulator, under the "Settings" tab, click on "Capital" and there you can update the commissions and slippage values. Under the commissions' fields, you should include the commissions your broker charges you. While under the slippage field, you may specify a percentage value that depends on the type of security you are trading. Generally, you can use half the average of the bid-ask spread as an estimation of the slippage or you can set a low slippage (0.05%) value for liquid stocks and a high slippage value (0.5%) for illiquid stocks. Commissions and slippage can be updated dynamically using money management scripts. You can for example specify a slippage value that depends on the volatility of the security. You can also include transaction costs when analyzing trading rules (Analysis -> Rules Manager). This can be done by updating the output rule you use in your analysis. You should first select "Custom Output" and then update the advanced rule. Example: The formula for "Buy then sell after 50 bars" is: SET _PERF(OPEN) WHERE _DIS(0) > 50 The above formula could also be written as: SET ((OPEN / _REF(OPEN)) - 1) * 100 WHERE _DIS(0) > 50 If you want to include a cost of 0.5%, you should update the formula as follows: SET ((OPEN / (_REF(OPEN) * 1.005)) - 1) * 100 WHERE _DIS(0) > 50
|