Log in to see Cloud of Tags

Wealth-Lab Wiki

Data | Working with Forex in Wealth-Lab

RSS
Borrows from the original text published by DrKoch in legacy Knowledge Base.

Developing and testing trading systems on Forex involves the two steps:

  • Find the correct "Ticker" of Forex data with your data provider
  • Enter the contract details in the Symbol Info Manager.

Contract Details and the Symbol Info Manager

Point Value, Margin, Decimals

To simulate some of the properties of FOREX contracts, the forex contract specifications should be entered in the Symbol Info Manager. This allows the simulation of leverage and margin requirements.

Definitions

Let's start with some forex terminology:

Pip:Pip is an acronym for Percentage In Point and is the smallest amount a forex price can change. For most major forex pairs (EUR/USD, USD/GBP, etc.) a Pip is 0.0001, but the USD/JPY Pip is 0.01, for example. For other currency crosses, Pips can vary from can vary from 0 to 0.0000001, as for the JPY base currency (JPY/other).
Fractional Pip:Forex pricing shown in tenths of 1 Pip, allowing greater transparency into electronic markets and cost savings on a forex transaction.
Tick:The same as a pip.
Point:Sometimes the same as a pip. Sometimes the same as a change of one percent of price (Big Point).
Big Point:The same as a "point"

The Symbol Info Manager uses its own terminology which stems from futures trading:

Tick:The smallest amount a price can change. This is the pip of a forex symbol.
Point Value:This is the "dollar" amount you would make (or lose) if the issue moved 1 unit, assuming you're holding 1 contract.

The Point Value is calculated from dividing the value of 1 Pip by Pip/Tick size.  Notice that the result is in terms of the base currency. (More on this later.)

    PointValue = PipValue / TickSize
Example:

If 1 pip (or Tick in the FSM) is 0.0001, and that's worth $10, then the value of 1 point is:

    10 / 0.0001 = 100000 ($100,000)
This means that if your currency moves form 3.000 to 4.000, you will make a profit of $100,000.00 on a single contract.

Decimals

Forex quotes move in very small increments, defined as a Pip (or Tick). To be able to see all the moves the prices need to be displayed with a large number of decimals. The required number is directly determined by the Pip size. If the pip is 0.0001, you should enter 4 for "Decimals" in the Symbol Info Manager. If Pip is 0.001 enter 3 for "Decimals" and so on.

Leverage and Margin

The Leverage is calculated from the contract value and the margin. The contract value is defined by the exchange, but the margin is established by your broker. For one lot of 100,000 British Pounds (GBP/USD), your broker may request a margin of 2,500 GBP. Thus the leverage rate is 40:1. 

Usage

Forex Lots

A standard forex lot is a notional 100,000 of the base currency, which is the first currency in the cross. For EUR/USD, a lot is €100,000.  For GBP/USD, a lot is £100,000.  Mini (10,000) and micro (1,000) lots may also be available.  Consequently, if you place a standard 3-lot trade for EUR/USD, you are controlling €300,000.

Sample Forex Trade: EUR/USD

Ignoring leverage and commissions, here's how a trade works:
* Buy 1 lot of EUR/USD at 1.3200. This costs €100,000 * 1.3200 = $132,000
* Sell the lot at 1.3300. The lot is now worth €100,000 * 1.3300 = $133,000
* Profit on this trade = $1,000
* In terms of the base currency (EUR) profit is found by dividing the forex profit by the exchange rate at the close of the trade, i.g., 1,000 USD/ 1.3300 = 751.88 EUR

Sample Forex Trade: USD/CAD

Again, ignoring leverage and commissions:
* Buy 1 lot of USD/CAD at 1.0400. This costs $100,000 * 1.0400 = 104,000 CAD
* Sell the lot at 1.0300. The lot is now worth $100,000 * 1.0300 = 103,000 CAD
* Profit (loss) on this trade = (1,000 CAD)
* In terms of the base currency (USD) profit is found by dividing the forex profit by the exchange rate at the close of the trade, i.g., 1,000 CAD / 1.0300 = 970.87 USD

Important! The takeaway from these examples is that the forex profit without converting and that calculated by Wealth-Lab is expressed in terms of the second currency in the cross, not the base currency. 

Wealth-Lab and Multi-Currency

Wealth-Lab does not support multi-currency backtests.  The purpose of the sample forex trades above was to demonstrate that Profit & Loss for all instruments in the same backtest must be expressed in the same currency.  Consequently, Wealth-Lab will give you proper results in USD for currency pairs like EUR/USD, GBP/USD, [ANY]/USD in the same backtest. For any other cross rates (USD/JPY, USD/CAD, USD/CHF, USD/[ANY], [ANY] [ANY]), Wealth-Lab does not calculate forex profit in USD and therefore these pairs cannot be included in the same backtest with [ANY]/USD pairs. 

That said, there is no problem backtesting USD/JPY, USD/CAD, USD/CHF, AUD/CAD, etc., separately.  Profit/Loss will be with respect to the second currency in the cross. 

Symbol Info Manager Configuration

Generally, a single entry is required for the major crosses with USD as shown. 

Symbol Info Manager settings

[A-Z]{3}.?USD will match any of these symbols:  EUR/USD, EUR.USD, EURUSD, AUD/USD, GBP/USD, etc.   To ignore other USD crosses like JPYUSD, HKDUSD, etc., that have other Pip values, enter this expression: (?!.*(JPY|HKD|KRW|MXN|NOK|SEK|ZAR|CLP|HUF|INR|RUB|TWD|XAU|XAG|CNY|BTC))[A-Z]{3}.?USD

Since leverage is generally 40:1 for the major crosses, you might expect $2,500 to be the value to use for margin.  However, this value should be in terms of the currency cross, i.e., EUR, AUD, or GBP.  Consequently, €2,500 at 1.3500 is $3,375, or, £2,500 at a nominal 1.800 is $4,500.  Over time, margin is moving target, and for this reason it's best to use a conservative value, expressed in USD. 

Refer to the User Guide on Symbol Info Manager for additional details.      

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.