July 21, 2015
|
|
Setting up NeuroShell Trader for Forex Trading
by Denham Ward
|
Forex trading is like living in the wild west of the USA in the 19th century. There are not many standards as we know them in stocks, options, and futures. There is no central exchange, and trades take place largely with banks, who set their own spreads and price data. If you choose to trade forex, you should really make sure you understand what is going on, because forex education is beyond the scope of our technical support. The best place to learn may be from the broker you are planning to use, because every broker seems to have a different deal. They usually hype that there is no commission, but the spreads they use to take profits from you are not usually cheap. Don’t be fooled when brokers say there is no commission. FXCM Cliff Note Version: If you are using the FXCM integrated trading interface to trade EUR/USD, the following is how NeuroShell Trader can be setup to accurately incorporate trading costs into your backtest statistics: Size Tab
Costs Tab
Note that the above trading costs assume a fixed spread. However since spreads widen and narrow based upon market conditions, the most accurate way of incorporating FXCM trading costs and dynamic spreads is described later in this article. Forex Price Quotes:
Because there is no central exchange and the trades take place largely with banks, that also means there is no standard pricing across data feeds. Each different data feed can have different pricing depending upon the banks that it surveys for its price data. Some survey one bank, while others survey multiple banks. While the data coming from your brokerage (FXCM, Interactive Brokers, etc.) may best represent the prices at which your trades will actually fill, a non-brokerage data feed that surveys multiple banks (for instance eSignal) may in some instances actually provide quicker price reactions that lead your brokerages price streams. Additionally, without a record of executed trades, there is no volume in Forex. If a data feed does provide a volume value, it is generally the number of trades that have occurred and not the actual units or lots of currency traded. Trading Size: In the old days, forex brokers offered a contract/lot size of only 100,000 units of currency. However, with decreasing costs and increase in competition for individual traders, forex brokers have begun offering lot sizes in smaller increments. Depending upon your forex broker, you can now trade micro lots of 1,000 units of currency (FXCM), mini lots of 10,000 units of currency or a standard lot of 100,000 units of currency. To maintain the broadest compatibility with different brokerage trading interfaces, many of which take unit sizes for trades and also in part to maintain compatibility with non-lot size markets like equities, NeuroShell Trader defaults to sizing in units and NOT lots. As you will read about below, this is an important distinction and can have a bearing on how costs and other NeuroShell Trader parameters are setup. When trading forex, you will generally want NeuroShell trader to keep trade sizes in units to maintain compatibility with the Interactive Brokers and FXCM integrated trading interfaces. However if you manually trade and want to see NST orders in lot sizes on the charts or you are using an integrated trading interface that requires orders be placed in lots (i.e. NOT the Interactive Brokers or FXCM interfaces included with NST), then you may want NeuroShell trader to process trade sizes as lots. Depending upon your use of NST, the following is how each would be setup:
Trading Spread: In general, Forex Brokerages have always made their money by charging a spread between the bid and ask price quotes. This spread not only varies based upon market conditions (larger spreads during volatile markets), but also varies between brokerages based upon how much profit each brokerage wants to extract from each trade a client makes. [*** Undocumented/Insiders Tip ***] While some data providers include a bid/ask value for Second, Range or Volume bars, FXCM is the only data provider that we know of that provides bid/ask values for minute, hourly and daily bars. To see if your data stream has Bid/Ask values available, simply choose the Insert Existing Data/Calculations menu item, insert the bid and ask values if they are available and verify that they contain a valid bid or ask price stream (i.e. not all zeros or missing data). If your data contains bid/ask data, you can actually setup NeuroShell Trader to trade at the last bid and ask value, which essentially allows you to trade the actual spread at the time of each trade instead of the fixed spread as described above. To setup NeuroShell Trader to trade at the bid/ask, you must edit the nstparam.ini file while NeuroShell Trader is not running and change the “BidAskBacktestFill=False” line to “BidAskBacktestFill=True”, save the nstparam.ini file and then restart NeuroShell Trader. When you rebacktest your trading strategies, you will now notice that the fill X’s on the chart are no longer always on the next bars open, but instead will be at the bid or ask value of the last bar depending upon whether you are selling or buying. This is especially useful for accurately backtesting with the actual spread across large amounts of historical data that can be obtained with FXCM’s minute, hour or daily bars. Please note that this technique is an undocumented and unsupported feature of NeuroShell Trader, so although it may work great for you if you try it, we cannot be held responsible if it doesn’t work as desired in all scenarios.
Trading Commission: Recently, FXCM introduced what it is calling a spread plus commission forex pricing. They are essentially now charging a much smaller “non-markup” spread in addition to a small commission fee to open and close each trade. At the time of this writing they were quoting the trading costs for EUR/USD being an average of 0.3 spread plus a commission of $0.04 per 1000 units. In order to take into account FXCM’s pricing model, not only do you need to enter in the spread as described above (or use the undocumented tip above), but you now also need to enter the commission. Since the commission varies depending upon the number of units/lots being bought, the commission would be entered into the “Per Units $____” section of BOTH the entry commission AND exit commission sections of the “Costs” tab. However, the value you enter would depend upon the NST trading size you setup in the Trading Size section above:
Margin Margin is considered a good faith deposit with your brokerage that allows you to trade larger amounts of forex currency with a given amount of money. As an example, FXCM offers a maximum of approximately 50:1 (i.e. 2%) margin. Although this means that you can buy 50 times more currency with margin and gain profits 50 times faster, it also means that a losing strategy can lose money 50 times faster as well. Be careful when using margin. It is generally not in your best interest to use the maximum margin available to you and instead it is wise to use 10:1, 5:1 or even 2:1 margin in the event that your trading system does not behave as expected or hoped. Alternatively if Margin is quoted in a dollars per lot, then you could use the “Margin $ per unit” option under the costs tab. However, the value you enter would depend upon the NST trading size you setup in the Trading Size section above:
Exchange Rates: To understand setting of Exchange Rates in NeuroShell Trader, it is important to first understand forex currency pairs. Forex currency pairs are generally in the format of xxx/yyy where xxx is the base currency and yyy is the quote currency. We like to think of xxx as the currency you are buying and selling, and yyy as the currency you are paying in. When learning Forex currency pair notation, don’t get confused by terms such as the Euro rate, which usually refers to EUR/USD and the Yen rate which usually refers to USD/JPY. Also note that some data providers do not declare a home currency in their major pairs. For example, eSignal’s symbol for EUR/USD is simply EUR A0-FX, while their symbol for USD/JPY is JPY A0-FX. The following examples will better illustrate how to setup exchange rates in NeuroShell Trader: Example 1: Suppose your home currency is USD, and you are trading EUR/USD. Since EUR/USD is already quoted in your home currency, you do not need to specify any exchange rate. Example 2: Suppose your home currency is USD and you are trading USD/JPY. Since your home currency is the base currency, you would simply select the same USD/JPY symbol as the exchange rate. You would also specify that your home currency is not the quote currency in USD/JPY. Example 3: Suppose your home currency is USD, and you are trading AUD/GBP. Since most data providers only offer GBP/USD, you would choose the symbol GBP/USD as the exchange rate. You would also specify that your home currency is the quote currency in GBP/USD. Example 4: Suppose your home currency is USD, and you are trading AUD/CAD. Since most data providers only offer USD/CAD, you would choose the symbol USD/CAD as the exchange rate and specify that your home currency is not the quote currency in USD/CAD. Example 5. Suppose your home currency is CHF and you are trading GBP/NZD. Your exchange rate would be NZD/CHF. Simply choose the symbol for NZD/CHF as the exchange rate and specify that your home currency is the quote currency in NZD/CHF. NeuroShell Trader displays all profits, drawdowns, etc. with a $ sign. However it should be noted that if you do not specify any exchange rates, the currency displayed is actually the quote currency (i.e. yyy) even though NeuroShell Trader is displaying a $ sign. If you do specify an exchange rate and your home currency is not the U.S. Dollar, NeuroShell Trader will still display a dollar sign next to the profit statistics even though the actual numeric profit values will have been converted into your home currency. Only if you setup all the appropriate exchange rates with a home currency of U.S. Dollar will the profit statistics be in U.S. dollars and match the $ sign. Carry Trade Interest: NeuroShell does not include carry trade interest in its calculations. Note that most brokers will calculate positive or negative interest based on the position in trades held overnight. For example, if you are long on EUR/USD and the interest rate for the EUR remains higher than the USD, then positive interest will be added to your profit. The converse is true if you are short, that is, negative interest will be deducted from your profit. This interest is called rollover or carry trade interest. For FXCM, 5 p.m. in New York is considered the beginning and end of the forex trading day. Any positions that are open at 5 p.m. are considered to be held overnight, and are subject to rollover/carry trade interest. Calculation of this interest is not currently included in NeuroShell Trader and will not be incorporated in any backtest results. |