Little questions about the [Detailed Log]

Hello,

I wrote a super simple backtest code Buy[1]=1; Sell=0;
with initial equity = 50,000; MarginDeposite = 20,000; [v] Future mode;
then I pressed [Backtest] and see the [Detailed log], it shows:

Price: 9056; Share: 1; commission = 200;
Rank 1; Fx rate: 1;
1 Open position
Equity 49600; Market value 19,800; Cash 29800;

I want to ask
Q1) What is Rank 1?
Q2) What is Fx rate: 1?
Q3) Why market value is 19,800 (as this is the begin bar of this Buy)?
Q4) Why equity is 49,600 (as commission = 200 & this is the begin bar of this Buy)?

Thank you very much :smiley: !

Q1) Read here about what rank refers too
http://www.amibroker.com/kb/2015/09/28/symbol-selection-when-positionscore-is-not-defined/

Q2) Fx rate of detailed log gives info about currency conversion rate. You can define forex rate (static one or dynamic one) in case you use securities being denominated in different currency than your account currency
Read here (bottom)
https://www.amibroker.com/guide/h_pyramid.html
http://www.amibroker.com/kb/2006/08/09/amibroker-for-forex/

Q3) Positionvalue is required margin per contract multiplied by contract number.
And Market Value is positionvalue minus entry commission -> 20000 - 200 = 19800

Q4) It is commission per trade, entry is one trade and exit it one trade so 2*200 = 400. You don't ever close open positions? What if you do not have $200 left for exit commission? How do you want to exit then? Your Broker will say "Deposit more money first".

3 Likes

Actually market value is value of position minus EXIT commission (entry commission was already subtracted from 'cash').

2 Likes