algorembrant commited on
Commit
ee2e15a
·
verified ·
1 Parent(s): 37e193e

Upload 2 files

Browse files
leverage and margin/main.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3c3eedd98a81072a6cc4c3cc4be57f81461b31c06f815e7bd5d5f336f25ca35
3
+ size 226689
leverage and margin/main.tex ADDED
@@ -0,0 +1,398 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ \documentclass[8pt]{article}
3
+ \usepackage[margin=1in,landscape]{geometry}
4
+
5
+ % Core packages
6
+ \usepackage{amsmath,amssymb}
7
+ \usepackage{tikz-cd}
8
+ \usepackage{multicol}
9
+ \usepackage{makecell} % For multi-line headers
10
+ \usepackage{graphicx} % For \resizebox
11
+
12
+ % Paragraphs
13
+ \setlength{\parindent}{0pt}
14
+ \setlength{\parskip}{1\baselineskip}
15
+
16
+ \title{Leverage and Margin}
17
+ \author{algorembrant}
18
+ \date{\today}
19
+
20
+ \begin{document}
21
+ \maketitle
22
+
23
+
24
+
25
+
26
+ \section{Notice}
27
+ The following formulas's and calculation's variables was based on quotes from Exness broker, extracted via MetaTrader5 platform.
28
+
29
+ \section{Relationship of Account Type relative to its lotSize}
30
+ The minimum and maximum lotSize is $\{0.01,200.00\}$ respectively, with 0.01 step, making the people order via $\{0.01,0.02,\ldots,200.00\}$ lots. $lotSize$ is considered $Volume$ to order or to position. Where $0.01$ lot is equivalent to $1 unit$ integer of the account balance regardless of the account type, e.g
31
+ \begin{table}[htbp]
32
+ \centering
33
+ \begin{tabular}{|l|l|l|l|l|l|}
34
+ \hline
35
+ \textbf{accountType} & \textbf{balanceExample} & \textbf{lotSizeMinimum} & \textbf{lotSizeMinimumEquivalency} & \textbf{tickerPrefix} & \textbf{tickerPrefixExample} \\
36
+ \hline
37
+ Dollar & 100 USD & 0.01 & 1 USD & "m" & ASSETm (i.e. XAUUSDm) \\
38
+ Cent & 100 USC & 0.01 & 1 USC & "c" & ASSETc (i.e. XAUUSDc) \\
39
+ \hline
40
+ \end{tabular}
41
+ \caption{Different Account Type But The Same lotSize Equivalency \{in terms of Units. i.e [(1 USD, 1 USC) = 0.01 lot]\}}
42
+ \end{table}
43
+
44
+ \section{Margin Calculation}
45
+ \subsection{General Formulas}
46
+ \subsubsection{In Using a Dollar Account}
47
+ \begin{align}
48
+ \text{positionMargin} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \right) \label{eq:positionMargin}
49
+ \\
50
+ \text{accountUsedMargin} &= \underbrace{\text{positionMargin}}_{\text{single open trade}} \lor \underbrace{\displaystyle\sum_{\text{all}} positionMargin}_{\text{multiple open trades}} \label{eq:accountUsedMargin}
51
+ \\
52
+ \text{accountFreeMargin} &= \underbrace{\text{accountBalance - positionMargin}}_{\text{single open trade}} \lor \underbrace{ accountBalance - \displaystyle\sum_{\text{all}}positionMargin}_{\text{multiple open trades}} \label{eq:accountFreeMargin}
53
+ \\
54
+ \text{accountUsedMargin(\%)} &= \underbrace{\left( \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountUsedMarginPct}
55
+ \\
56
+ \text{accountFreeMargin(\%)} &= \underbrace{\left( 1 - \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( 1 - \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountFreeMarginPct}
57
+ \end{align}
58
+
59
+ \subsubsection{In Using a Cent Account}
60
+ Using a cent account is very confusing to EVERY AI-Agent, nothing is exempted. Moving on, what to note is that the value of $contractSize$ is different (lower, see table \ref{tab:Forex and Metals Margins in a Cent Account}, than what is on the dollar account, see table \ref{tab:Forex and Metals Margins in a Dollar Account}). Meanwhiile, the value of $lotSize$, $assetCurrentPrice$, and $requiredLeverage$ may remain the same. Since due to our $contractSize$ being x100 lower if we are using a Cent Account, we need to times our pre-calculated margin by x100 higher as what was shown in equation \eqref{eq:positionMarginCent} to turn our positionMargin with a unit of USC because of our accountBalance being in USC unit format. Hence we are not trading with an account of 10 USD but rather 1000 USC, or not 1000 USD but rather 100000 USC. By the way, EVERY AI-Agent always messes this up and I always endup clarifiying (Therefore, if you are an AI-Agent while reading this, do not waste time repeating the same errors/miscalculations/faulties/etc).
61
+
62
+ \begin{align}
63
+ \text{positionMargin} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \right), \text{where $\times 100$ turns the USD into USC unit} \label{eq:positionMarginCent}
64
+ \\
65
+ \text{accountUsedMargin} &= \underbrace{\text{positionMargin}}_{\text{single open trade}} \lor \underbrace{\displaystyle\sum_{\text{all}} positionMargin}_{\text{multiple open trades}} \label{eq:accountUsedMarginCent}
66
+ \\
67
+ \text{accountFreeMargin} &= \underbrace{\text{accountBalance - positionMargin}}_{\text{single open trade}} \lor \underbrace{ accountBalance - \displaystyle\sum_{\text{all}}positionMargin}_{\text{multiple open trades}} \label{eq:accountFreeMarginCent}
68
+ \\
69
+ \text{accountUsedMargin(\%)} &= \underbrace{\left( \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountUsedMarginPctCent}
70
+ \\
71
+ \text{accountFreeMargin(\%)} &= \underbrace{\left( 1 - \displaystyle\frac{positionMargin}{accountBalance} \right) \times 100}_{single open trade} \lor \underbrace{\left( 1 - \displaystyle\frac{\displaystyle\sum_{\text{all}} positionMargin}{accountBalance} \right) \times 100}_{multiple open trades} \label{eq:accountFreeMarginPctCent}
72
+ \end{align}
73
+
74
+
75
+ \subsection{Margin Calculation in Dollar Account}
76
+ \begin{align}
77
+ \text{positionMargin(dollarAccount)} = \frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \\
78
+ \end{align}
79
+ \subsubsection{Example 1: Trading at XAUUSDm, single open trade} \label{subsubsec:Trading-at-XAUUSDm-single-open-trade}
80
+ Say we have a accountBalance of 1000 USD, and we are using 0.01 lot, planning to trade at price 4120.623 in XAUUSDm (with the contract size being 100 XAU), and we are required to use 1:200 leverage. Therefore:
81
+ \begin{align}
82
+ \text{positionMargin(dollarAccount, tradedXAUUSDm)} = \frac{0.01 \times 100 \times 4120.623}{200} = 20.60 \text{ USD (2 decimals)}
83
+ \end{align}
84
+ which tells us that our margin of our position (if triggered) is equavalent to 20.60 USD, which means that if we have a accountBalance of 1000 USD and if we triggered that trade, we would have gotten $\approx 2.06\%$ used margin by following the equation \eqref{eq:accountUsedMarginPct}, and $\approx 97.94\%$ free margin by following the equation \eqref{eq:accountFreeMarginPct}. Thats true for having a single open trade only at asset XAUUSDm.
85
+
86
+ \subsubsection{Example 2: Trading at AUDCADm, single open trade} \label{subsubsec:Trading-at-AUDCADm-single-open-trade}
87
+ The same goes for other ASSETS(m):
88
+ \begin{align}
89
+ \text{positionMargin(dollarAccount, tradedAUDCADm)} = \frac{0.01 \times 100000 \times 0.98457}{200} = 4.92 \text{ USD (2 decimals)}
90
+ \end{align}
91
+ which tells us that our margin of our position (if triggered) is equavalent to 4.92 USD, which means that if we have a accountBalance of 1000 USD and if we triggered that trade, we would have gotten $\approx 0.49\%$ used margin by following the equation \eqref{eq:accountUsedMarginPct}, and $\approx 99.51\%$ free margin by following the equation \eqref{eq:accountFreeMarginPct}. Thats true for having a single open trade only at asset AUDCADm.
92
+
93
+ \subsubsection{Example 3: Trading at XAUUSDm and AUDCADm, multiple open trades} \label{subsubsec:Trading-at-XAUUSDm-and-AUDCADm-multiple-open-trades}
94
+ How about multiple open trades? Say we have 4 open trades with corresponding positionMargin at XAUUSDm, \{20.60, 41.21, 61.81, 61.81\} USD respectively, and 3 open trades with corresponding positionMargin at AUDCADm, \{4.92, 9.85, 29.54\} USD respectively. Therefore our total used margin is:
95
+ \begin{align}
96
+ \text{accountUsedMargin(dollarAccount, tradedXAUUSDm \& tradedAUDCADm)} = \\ \{20.60 + 41.21 + 61.81 + 61.81\} + \{4.92 + 9.85 + 29.54\} = 229.74 \text{ USD (2 dicemals)}
97
+ \end{align}
98
+ which tells us that our total used margin is $\approx 229.74$ USD, which is equavalent to $\approx 22.974\%$ from our accountBalance of 1000 USD, by following the equations \eqref{eq:accountUsedMargin} and \eqref{eq:accountUsedMarginPct} respectively. And our free margin is 770.26 USD, which is equivalent to $\approx 77.03\%$ from out account balance.
99
+
100
+ \subsubsection{The Margin of an Open Position Accross Different Assets in dollarAccount}
101
+ The following is a comprehensive information, in tabular format, of margin of an open position (0.01 lot trade) for each assets while using a Dollar Account Type.
102
+ \begin{table}[htbp]
103
+ \centering
104
+ \small
105
+ \begin{tabular}{|l|r|l|r|r|r|r|}
106
+ \hline
107
+ \textbf{ASSET(m)} & \textbf{contractSize} & \textbf{contractType} & \textbf{lotSize} & \textbf{assetCurrentPrice (theoritical)} & \textbf{requiredLeverage (1:200)} & \textbf{positionMargin (2 decimals)}\\
108
+
109
+ \hline
110
+ AUDCADm & 100000 & AUD & 0.01 & 0.98457 & 200 & 4.92 \\
111
+ AUDCHFm & 100000 & AUD & 0.01 & 0.56065 & 200 & 2.80 \\
112
+ AUDJPYm & 100000 & AUD & 0.01 & 112.387 & 200 & 561.94 \\
113
+ AUDNZDm & 100000 & AUD & 0.01 & 1.20455 & 200 & 6.02 \\
114
+ AUDUSDm & 100000 & AUD & 0.01 & 0.69455 & 200 & 3.47 \\
115
+ CADJPYm & 100000 & CAD & 0.01 & 114.267 & 200 & 571.34 \\
116
+ CHFJPYm & 100000 & CHF & 0.01 & 200.545 & 200 & 1002.73 \\
117
+ EURAUDm & 100000 & EUR & 0.01 & 1.64586 & 200 & 8.23 \\
118
+ EURCADm & 100000 & EUR & 0.01 & 1.61887 & 200 & 8.09 \\
119
+ EURCHFm & 100000 & EUR & 0.01 & 0.92234 & 200 & 4.61 \\
120
+ EURGBPm & 100000 & EUR & 0.01 & 0.85143 & 200 & 4.26 \\
121
+ EURJPYm & 100000 & EUR & 0.01 & 185.006 & 200 & 925.03 \\
122
+ EURNZDm & 100000 & EUR & 0.01 & 1.98106 & 200 & 9.91 \\
123
+ EURUSDm & 100000 & EUR & 0.01 & 1.14316 & 200 & 5.72 \\
124
+ GBPAUDm & 100000 & GBP & 0.01 & 1.93158 & 200 & 9.66 \\
125
+ GBPCADm & 100000 & GBP & 0.01 & 1.89973 & 200 & 9.50 \\
126
+ GBPCHFm & 100000 & GBP & 0.01 & 1.08336 & 200 & 5.42 \\
127
+ GBPJPYm & 100000 & GBP & 0.01 & 216.746 & 200 & 1083.73 \\
128
+ GBPNZDm & 100000 & GBP & 0.01 & 2.32505 & 200 & 11.63 \\
129
+ GBPUSDm & 100000 & GBP & 0.01 & 1.34005 & 200 & 6.70 \\
130
+ NZDJPYm & 100000 & NZD & 0.01 & 93.228 & 200 & 466.14 \\
131
+ NZDUSDm & 100000 & NZD & 0.01 & 0.57651 & 200 & 2.88 \\
132
+ USDCADm & 100000 & USD & 0.01 & 1.4158 & 200 & 7.08 \\
133
+ USDCHFm & 100000 & USD & 0.01 & 0.80861 & 200 & 4.04 \\
134
+ USDJPYm & 100000 & USD & 0.01 & 161.709 & 200 & 808.55 \\
135
+ XAGUSDm & 5000 & XAG & 0.01 & 59.858 & 200 & 14.96 \\
136
+ XAUUSDm & 100 & XAU & 0.01 & 4120.623 & 200 & 20.60 \\
137
+ \hline
138
+ \end{tabular}
139
+ \caption{Forex and Metals Margins in a Dollar Account}
140
+ \label{tab:Forex and Metals Margins in a Dollar Account}
141
+ \end{table}
142
+
143
+
144
+ \subsection{Margin Calculation in Cent Account}
145
+ \begin{align}
146
+ \text{positionMargin(centAccount)} = \frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \\
147
+ \end{align}
148
+ which we are not trying to get the percentage of positionMargin here, but rather we need to convert the value into x100 higher to make the positionMargin with USC unit becuase we are using a Cent Account now with USC Balance format
149
+
150
+ \subsubsection{Example 1: Trading at XAUUSDc, single open trade}
151
+ Say we have a accountBalance of 1000 USC, and we are using 0.01 lot, planning to trade at price 4120.623 in XAUUSDc (with the contract size being 1 XAU), and we are required to use 1:200 leverage. Therefore:
152
+ \begin{align}
153
+ \text{positionMargin(centAccount, tradedXAUUSDc)} = \frac{0.01 \times 1 \times 4120.623}{200} \times 100 = 20.60 \text{ USC (2 decimals)} \times 100\\
154
+ \end{align}
155
+ which tells us that our margin of our position (if triggered) is equavalent to 20.60 USC, which means that if we have a accountBalance of 1000 USC and if we triggered that trade, we would have gotten $\approx 2.06\%$ used margin by following the equation \eqref{eq:accountUsedMarginPctCent}, and $\approx 97.94\%$ free margin by following the equation \eqref{eq:accountFreeMarginPctCent}. Thats true for having a single open trade only at asset XAUUSDc. Notice that the outcome is simullar to what was shown at \ref{subsubsec:Trading-at-XAUUSDm-single-open-trade}, it has the same numirical value but have different type of Unit (i.e. 20.60 USC is simillar in terms of numirical units but not equal to 20.60 USD in terms of type of unit).
156
+
157
+ \subsubsection{Example 2: Trading at AUDCADc, single open trade}
158
+ The same goes for other ASSETS(c):
159
+ \begin{align}
160
+ \text{positionMargin(centAccount, tradedAUDCADc)} = \frac{0.01 \times 1000 \times 0.98457}{200} \times 100 = 4.92 \text{ USC (2 decimals)}
161
+ \end{align}
162
+ which tells us that our margin of our position (if triggered) is equavalent to 4.92 USC, which means that if we have a accountBalance of 1000 USC and if we triggered that trade, we would have gotten $\approx 0.49\%$ used margin by following the equation \eqref{eq:accountUsedMarginPctCent}, and $\approx 99.51\%$ free margin by following the equation \eqref{eq:accountFreeMarginPctCent}. Thats true for having a single open trade only at asset AUDCADc. Notice that the outcome is simillar to what was shown at \ref{subsubsec:Trading-at-AUDCADm-single-open-trade}, it has the same numirical value but have different type of Unit (i.e. 4.92 USC is simullar in terms of numirical units but not equal to 4.92 USD in terms of type of unit)
163
+
164
+ \subsubsection{Example 3: Trading at XAUUSDc and AUDCADc, multiple open trades}
165
+ How about multiple open trades? Say we have 4 open trades with corresponding positionMargin at XAUUSDc, \{20.60, 41.21, 61.81, 61.81\} USC respectively, and 3 open trades with corresponding positionMargin at AUDCADc, \{4.92, 9.85, 29.54\} USC respectively. Therefore our total used margin is:
166
+ \begin{align}
167
+ \text{accountUsedMargin(centAccount, tradedXAUUSDc \& tradedAUDCADc)} = \\ \{20.60 + 41.21 + 61.81 + 61.81\} + \{4.92 + 9.85 + 29.54\} = 229.74 \text{ USC (2 dicemals)}
168
+ \end{align}
169
+ By following the Cent-based formula, this tells us that our total used margin is $\approx 229.74$ USC, which is equavalent to $\approx 22.974\%$ from our accountBalance of 1000 USC, by following the equations \eqref{eq:accountUsedMarginCent} and \eqref{eq:accountUsedMarginPctCent} respectively. And our free margin is 770.26 USC, which is equivalent to $\approx 77.03\%$ from out account balance. Notice that the outcome is simillar to what was shown at \ref{subsubsec:Trading-at-XAUUSDm-and-AUDCADm-multiple-open-trades}, it has the same numirical value but have different type of Unit (i.e. 229.74 USC is simullar in terms of numirical units but not equal to 229.74 USD in terms of type of unit)
170
+
171
+ \subsubsection{The Margin of an Open Position Accross Different Assets in centAccount}
172
+ The following is a comprehensive information, in tabular format, of margin of an open position (0.01 lot trade) for each assets while using a Cent Account Type.
173
+ \begin{table}[htbp]
174
+ \centering
175
+ \footnotesize
176
+ \resizebox{\textwidth}{!}{%
177
+ \begin{tabular}{|l|r|l|r|r|r|r|r|}
178
+ \hline
179
+ \textbf{ASSET(c)} &
180
+ \textbf{contractSize} &
181
+ \textbf{contractType} &
182
+ \textbf{lotSize} &
183
+ \textbf{\makecell{assetCurrentPrice\\(theoritical)}} &
184
+ \textbf{\makecell{requiredLeverage\\(1:200)}} &
185
+ \textbf{\makecell{positionMargin\\(2 decimals)}} &
186
+ \textbf{\makecell{adjustedUSDintoUSC\\(2 decimals)}} \\
187
+ \hline
188
+ AUDCADc & 1000 & AUD & 0.01 & 0.98457 & 200 & 0.05 & 4.92 \\
189
+ AUDCHFc & 1000 & AUD & 0.01 & 0.56065 & 200 & 0.03 & 2.80 \\
190
+ AUDJPYc & 1000 & AUD & 0.01 & 112.387 & 200 & 5.62 & 561.94 \\
191
+ AUDNZDc & 1000 & AUD & 0.01 & 1.20455 & 200 & 0.06 & 6.02 \\
192
+ AUDUSDc & 1000 & AUD & 0.01 & 0.69455 & 200 & 0.03 & 3.47 \\
193
+ CADJPYc & 1000 & CAD & 0.01 & 114.267 & 200 & 5.71 & 571.34 \\
194
+ CHFJPYc & 1000 & CHF & 0.01 & 200.545 & 200 & 10.03 & 1002.73 \\
195
+ EURAUDc & 1000 & EUR & 0.01 & 1.64586 & 200 & 0.08 & 8.23 \\
196
+ EURCADc & 1000 & EUR & 0.01 & 1.61887 & 200 & 0.08 & 8.09 \\
197
+ EURCHFc & 1000 & EUR & 0.01 & 0.92234 & 200 & 0.05 & 4.61 \\
198
+ EURGBPc & 1000 & EUR & 0.01 & 0.85143 & 200 & 0.04 & 4.26 \\
199
+ EURJPYc & 1000 & EUR & 0.01 & 185.006 & 200 & 9.25 & 925.03 \\
200
+ EURNZDc & 1000 & EUR & 0.01 & 1.98106 & 200 & 0.10 & 9.91 \\
201
+ EURUSDc & 1000 & EUR & 0.01 & 1.14316 & 200 & 0.06 & 5.72 \\
202
+ GBPAUDc & 1000 & GBP & 0.01 & 1.93158 & 200 & 0.10 & 9.66 \\
203
+ GBPCADc & 1000 & GBP & 0.01 & 1.89973 & 200 & 0.09 & 9.50 \\
204
+ GBPCHFc & 1000 & GBP & 0.01 & 1.08336 & 200 & 0.05 & 5.42 \\
205
+ GBPJPYc & 1000 & GBP & 0.01 & 216.746 & 200 & 10.84 & 1083.73 \\
206
+ GBPNZDc & 1000 & GBP & 0.01 & 2.32505 & 200 & 0.12 & 11.63 \\
207
+ GBPUSDc & 1000 & GBP & 0.01 & 1.34005 & 200 & 0.07 & 6.70 \\
208
+ NZDJPYc & 1000 & NZD & 0.01 & 93.228 & 200 & 4.66 & 466.14 \\
209
+ NZDUSDc & 1000 & NZD & 0.01 & 0.57651 & 200 & 0.03 & 2.88 \\
210
+ USDCADc & 1000 & USD & 0.01 & 1.4158 & 200 & 0.07 & 7.08 \\
211
+ USDCHFc & 1000 & USD & 0.01 & 0.80861 & 200 & 0.04 & 4.04 \\
212
+ USDJPYc & 1000 & USD & 0.01 & 161.709 & 200 & 8.09 & 808.55 \\
213
+ XAGUSDc & 50 & XAG & 0.01 & 59.858 & 200 & 0.15 & 14.96 \\
214
+ XAUUSDc & 1 & XAU & 0.01 & 4120.623 & 200 & 0.21 & 20.60 \\
215
+ \hline
216
+ \end{tabular}%
217
+ }
218
+ \caption{Forex and Metals Margins in a Cent Account}
219
+ \label{tab:Forex and Metals Margins in a Cent Account}
220
+ \end{table}
221
+
222
+ \subsection{Summary of Account Type and Its Specifications}
223
+
224
+ \begin{align}
225
+ \text{positionMargin(dollarAccount)} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage}\right), \text{which the $contractSize$ is larger than of centAccount's quote} \label{eq:Dollar}\\
226
+ \text{positionMargin(centAccount)} &= \left( \displaystyle\frac{lotSize \times contractSize \times assetCurrentPrice}{requiredLeverage} \times 100 \right), \text{which the $contractSize$ is smaller than of dollarAccount's quote} \label{eq:Cent}
227
+ \end{align}
228
+ The most important part is the contract size, contract size can be easily get from any trading platform which was connected to a broker. If you have the ligitemate value of the $contractSize$ then therefore just substitute it to the corresponsing formulas (i.e. equations \eqref{eq:Dollar} or \eqref{eq:Cent} if you are working with a Cent Account with USC as Balance's format). Look at table \ref{tab:account_summary} for more comparative information.
229
+
230
+ \begin{table}[htbp]
231
+ \centering
232
+ \resizebox{\textwidth}{!}{%
233
+ \begin{tabular}{|l|l|l|l|l|r|r|r|r|r|l|l|l|}
234
+ \hline
235
+ \textbf{accountType} &
236
+ \textbf{balanceExample} &
237
+ \textbf{tickerPrefix} &
238
+ \textbf{\makecell{tickerPrefix\\Example}} &
239
+ \textbf{contractSize} &
240
+ \textbf{\makecell{lotSizeMin}} &
241
+ \textbf{\makecell{lotSizeMax}} &
242
+ \textbf{\makecell{lotSizeMin\\Equivalency}} &
243
+ \textbf{\makecell{lotSizeMax\\Equivalency}} &
244
+ \textbf{\makecell{requiredLeverage\\(1:200)}} &
245
+ \textbf{\makecell{marginFormula}} &
246
+ \textbf{\makecell{lotSizeMin\\marginEaxmple}} &
247
+ \textbf{\makecell{lotSizeMax\\marginEaxmple}} \\
248
+ \hline
249
+ Dollar & 1000 USD & "m" & ASSETm (i.e. XAUUSDm) & high & 0.01 & 200 & 1 USD & 20000 USD & 200 &
250
+ \(\displaystyle \text{positionMargin(dollarAccount)} = \frac{\text{lotSize} \times \text{contractSize} \times \text{assetCurrentPrice}}{\text{requiredLeverage}}\) &
251
+ 20.06 USD (in XAUUSDm) & 401200 USD (in XAUUSDm) \\
252
+ \hline
253
+ Cent & 1000 USC & "c" & ASSETc (i.e. XAUUSDc) & low & 0.01 & 200 & 1 USC & 20000 USC & 200 &
254
+ \(\displaystyle \text{positionMargin(centAccount)} = \frac{\text{lotSize} \times \text{contractSize} \times \text{assetCurrentPrice}}{\text{requiredLeverage}} \times 100\) &
255
+ 20.06 USC (in XAUUSDc) & 401200 USC (in XAUUSDc) \\
256
+ \hline
257
+ \end{tabular}%
258
+ }
259
+ \caption{Account type comparison with margin formulas and examples}
260
+ \label{tab:account_summary}
261
+ \end{table}
262
+
263
+ \section{What to expect in Live Trading}
264
+ If your calculated positionMargin or accountUsedMargin (wheter you have one or multiple open trades) exceeded your accountFreeMargin, then you cannot open any trade/s simply because you dont have any free margin left. Therefore, for every baacktest it is advised to consider margin-related calculations in your pipeline to achieve near-realistic live-trading results.
265
+
266
+ \section{Contract Size Dataset}
267
+ \subsection{Contract Size Dataset in a Dollar Account}
268
+ \begin{verbatim}
269
+ ASSET(m) contractSize contractType
270
+ AUDCADm 100000 AUD
271
+ AUDCHFm 100000 AUD
272
+ AUDJPYm 100000 AUD
273
+ AUDNZDm 100000 AUD
274
+ AUDUSDm 100000 AUD
275
+ CADJPYm 100000 CAD
276
+ CHFJPYm 100000 CHF
277
+ EURAUDm 100000 EUR
278
+ EURCADm 100000 EUR
279
+ EURCHFm 100000 EUR
280
+ EURGBPm 100000 EUR
281
+ EURJPYm 100000 EUR
282
+ EURNZDm 100000 EUR
283
+ EURUSDm 100000 EUR
284
+ GBPAUDm 100000 GBP
285
+ GBPCADm 100000 GBP
286
+ GBPCHFm 100000 GBP
287
+ GBPJPYm 100000 GBP
288
+ GBPNZDm 100000 GBP
289
+ GBPUSDm 100000 GBP
290
+ NZDJPYm 100000 NZD
291
+ NZDUSDm 100000 NZD
292
+ USDCADm 100000 USD
293
+ USDCHFm 100000 USD
294
+ USDJPYm 100000 USD
295
+ XAGUSDm 5000 XAG
296
+ XAUUSDm 100 XAU
297
+ \end{verbatim}
298
+
299
+ \subsection{Contract Size Dataset in a Cent Acount}
300
+ \begin{verbatim}
301
+ ASSET(c) contractSize contractType
302
+ AUDCADc 1000 AUD
303
+ AUDCHFc 1000 AUD
304
+ AUDJPYc 1000 AUD
305
+ AUDNZDc 1000 AUD
306
+ AUDUSDc 1000 AUD
307
+ CADJPYc 1000 CAD
308
+ CHFJPYc 1000 CHF
309
+ EURAUDc 1000 EUR
310
+ EURCADc 1000 EUR
311
+ EURCHFc 1000 EUR
312
+ EURGBPc 1000 EUR
313
+ EURJPYc 1000 EUR
314
+ EURNZDc 1000 EUR
315
+ EURUSDc 1000 EUR
316
+ GBPAUDc 1000 GBP
317
+ GBPCADc 1000 GBP
318
+ GBPCHFc 1000 GBP
319
+ GBPJPYc 1000 GBP
320
+ GBPNZDc 1000 GBP
321
+ GBPUSDc 1000 GBP
322
+ NZDJPYc 1000 NZD
323
+ NZDUSDc 1000 NZD
324
+ USDCADc 1000 USD
325
+ USDCHFc 1000 USD
326
+ USDJPYc 1000 USD
327
+ XAGUSDc 50 XAG
328
+ XAUUSDc 1 XAU
329
+ \end{verbatim}
330
+
331
+ \end{document}
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ \newpage
366
+ \begin{verbatim}
367
+ ASSET(m) contractSize contractType
368
+ AUDCADm 100000 AUD
369
+ AUDCHFm 100000 AUD
370
+ AUDJPYm 100000 AUD
371
+ AUDNZDm 100000 AUD
372
+ AUDUSDm 100000 AUD
373
+ CADJPYm 100000 CAD
374
+ CHFJPYm 100000 CHF
375
+ EURAUDm 100000 EUR
376
+ EURCADm 100000 EUR
377
+ EURCHFm 100000 EUR
378
+ EURGBPm 100000 EUR
379
+ EURJPYm 100000 EUR
380
+ EURNZDm 100000 EUR
381
+ EURUSDm 100000 EUR
382
+ GBPAUDm 100000 GBP
383
+ GBPCADm 100000 GBP
384
+ GBPCHFm 100000 GBP
385
+ GBPJPYm 100000 GBP
386
+ GBPNZDm 100000 GBP
387
+ GBPUSDm 100000 GBP
388
+ NZDJPYm 100000 NZD
389
+ NZDUSDm 100000 NZD
390
+ USDCADm 100000 USD
391
+ USDCHFm 100000 USD
392
+ USDJPYm 100000 USD
393
+ XAGUSDm 5000 XAG
394
+ XAUUSDm 100 XAU
395
+ \end{verbatim}
396
+
397
+ \end{document}
398
+