Skip to content
All library documents

Converting Account Currency into Forex Trade Units

Article Quant Q&A · Author: Tom Hunter

Summary

The document considers how to size long and short forex trades when an account is denominated in US dollars and the trader wants to allocate the full balance. It works through direct pairs such as USD/JPY and EUR/USD, and cross pairs such as EUR/JPY, GBP/NZD, and CHF/JPY. The central idea in the replies is to convert the account balance into the currency needed for the trade, then express the resulting position in units of the pair’s base currency.

The answer explains quote units with an EUR/USD example and shows how bid and ask prices depend on whether the trader is buying or selling the base currency. One worked GBP/NZD conversion applies the ask price to both purchases in the conversion chain. The original question includes corrected formulas, so its uncorrected attempts should not be taken as a reliable sizing guide. The exchange also does not cover leverage, fees, margin, or risk-based position sizing.

Key ideas

  • Forex pair volume is expressed in units of the base currency.
  • Convert the account balance into the currency needed to establish the desired position before calculating units.
  • Use bid or ask according to whether the conversion or trade buys or sells the base currency.
  • The question’s own updates correct some initial formulas, so each conversion should be checked carefully.
  • Allocating the full account balance does not account for leverage, transaction costs, or risk limits.

Tags

Full text
# Forex trading scenarios - calculating units


# Forex trading scenarios - calculating units












I'm trying to build an automated forex trading system and I'm trying to understand how to calculate the number of units I should specify for each trade in different scenarios. Say for example I have an account with a broker in USD and I've deposited $1000. Ignoring leverage, I'd like to allocate my entire balance in each of the following scenarios. In each scenario I've tried to explain how I think the calculation should be performed..

## Going Long

Long USD/JPY

> Buy USD, sell JPY USD is the base currency so units (USD) = 1000

Long EUR/USD

> Buy EUR, sell USD units (EUR) = 1000 / [EUR/USD].Ask

Long EUR/JPY

> Buy euros, sell yen How many yen can we get with 1000 dollars? Buy yen with dollars Instrument = USD/JPY USD (selling) is the base currency so multiply by the bid So yen = 1000 * [USD/JPY].Bid units (EUR) = yen * [EUR/JPY].Ask

Update:

> units (EUR) = yen / [EUR/JPY].Ask

Long GBP/NZD

> Buy GBP, sell NZD How many NZD can we get with 1000 USD Instrument = NZD/USD USD (selling) is the quote currency so divide by the ask So NZD = 1000 / [NZD/USD].Ask units (GBP) = NZD / [GBP/NZD].Ask

## Going Short

Short USD/JPY

> Sell dollars for yen units (USD) = 1000

Short EUR/USD

> Sell euros, buy dollars units (EUR) = 1000 * [EUR/USD].Ask

Update:

> units (EUR) = 1000 / [EUR/USD].Bid

Short EUR/JPY

> Sell euros, buy yen How many euros can I buy with 1000 dollars? Instrument EUR/USD USD (selling) is the quote currency so divide by the ask units (EUR) = 1000 / [EUR/USD].Ask

Short CHF/JPY

> Sell CHF and hold JPY How much CHF can we buy with 1000 USD? Instrument = USD/CHF USD (selling) is the base currency to multiply by the bid units (CHF) = 1000 * [USD/CHF].Bid

So the question is - have I got the logic right in each scenario?

[ This is a follow up question to my previous question - Calculating units in a cross currency short trade ]

## Answer by rupweb (score 2)

https://quant.stackexchange.com/a/17780

What you're trying to do is express all your positions in terms of a risk currency. Then you can track your PnL in only one currency. You need to express all this in an Excel spread sheet and include some rates, a bit like the screenshot here.

## Answer by Bryan Walker (score 1)

https://quant.stackexchange.com/a/17773

A currency quote (EURUSD 1.1, for example) put into an equation with units is `1 EUR / 1 USD = 1.1` or `1 EUR = 1.1 USD`. Units or volume of a currency pair is expressed in terms of the base currency (EUR in the example), which means bids are buying and asks are selling the base currency.

I glanced a few examples and it looks like you're right, but here's one in equation form:

```
Buy GBP, sell NZD
We need NZD to sell. Must buy some using NZD/USD.
We are buying NZD/USD from people selling it, so we get the "asking" price
NZD/USD = x (the ask price)
1 NZD / x = 1 USD (re-arrange)
1000/x NZD = 1000 USD (multiply by 1000)
GBP/NZD = y (also buying GBP, so use ask)
(1000/x)/y GBP = (1000/x) NZD (multiply both sides by amount of NZD we can sell)
thus you can long (1000/x)/y units of GBP/NZD with 1000 USD.
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.