Test Object properties use equity values from every system in the test.  


A test can run multiple systems at once by adding the additional systems to the Suite selections.  


Many equity properties are also index-able - if you put an offset number in brackets, you will get the historical value from that day.  For instance, test.ClosedEquity[5] will be the closed equity 5 days ago.  Several of these properties are also graphed when the results for a test are displayed.


Equity Properties

Property Descriptions


Total capital Adds and Draws are summed from the first Add or Draw date to the current position in the tes.  When this property is accessed in the After Trading Day script section, the amount returned is the current summation value as of the test date it is accessed.  When it is access before the After Trading Day script section the value returned is the summation of the previous test date.  


As values are added or removed the Capital Adds Draws file is updated.  This File is located in the Trading Blox's installation Data folder.


See test.otherExpenses & test.UpdateOtherExpenses .


Current cash of the test.


Cash is determined by subtracting test.totalMargin from test.closedEquity.  

Futures margin is the value entered into the Futures Dictionary that is summed as the Futures margin amount.  

Stock margin is the "Purchase Equity" cost of the instruments summed as the total Stock margin amount.  


Test margin is the sum of the margin amounts from open orders not filled, and the margin of all active positions.

closedEquity[ ]

Total Closed Equity for all systems.  For order generation this is the Order Generation Equity minus Open Equity.


Current high water mark for closed equity. Used to compute the test.currentClosedDrawdown.


Core Equity is updated for each test.currentDay location of a test (not indexed).


Core Equity Calculations are a measure of equity that includes Closed Equity plus that portion of Open Equity that would be realized if all the current positions were exited at their current stop values (i.e. Locked-In Profits).


Core Equity = Closed Equity + Locked-In Profits


Current bar's closed equity drawdown.

currentDrawdown[ ]

Percent of total equity drawdown.  Graphed as the "Drawdown" graph under test results.


Deprecated, use totalMargin

currentRisk[ ]

Total percent of total equity at risk, based on the close for  markets with open positions minus the stop price for those positions.  Graphed as the "Total Risk Profile" .  


Total other expenses as set by test.UpdateOtherExpenses.


For stocks. Initial equity required to purchase current open positions (entry fill price times quantity).


Returns the smartFillExit property as set in global parameters. True or false.


Equity as of the start of the simulation. Equal to the Global Parameters, Equity Manager's Test Starting Equity.


Returns the threadCount property as set in global parameters.  Value can be a minimum of 1 to the maximum number of threads allowed by the license.

totalEquity[ ]

Starts as the Test Starting Equity as specified in Global Parameters.  It is then affected by the total profits, losses, and interest of trades by all systems.  Graphed as the "Equity Curve" graph. For order generation this is the Order Generation Equity.


Note:  This property is not affected by any of the following Global Parameters settings:

System Allocation Slider

Draw down Reduction Threshold, or its Amount,

Choice of Base Equity  selection:

Total Equity or Closed Equity.


Current high water mark for test.totalEquity. This value is used to compute the value of test.currentDrawdown.


Total current margin of all open positions in the test.  For Futures test.totalMargin represents the margin value of all open Future position margin values.  When the instruments are for a Stock type of position test.totalMargin represents the "Purchase Equity" or the amount paid to support the sum of all active stock type trades.  


In a Suite where both Stock and Future positions are active, this property's value represents the combined sum of Futures Margin amounts and the sum Stock "Purchase Equity" of all active positions in the Suite.


For order generation, the number of open positions at the end of the test.

vadi[ ]

VADI is the acronym for "Value Added Daily Index". VADI calculations start at the start of trading equity.  Values increase and decrease as a ratio of  profit/loss of trading equity percent. VADI is net of capital adds and draws, and it includes accrued fees, whereas trading equity only includes booked fees and the current sum of test.otherExpenses.



Fee transactions are accrued on a (daily/monthly/quarterly/yearly) basis, and booked as defined in global parameters .


Global Fees Parameter Options

Click to Expand -- Click to Reduce


Current VADI drawdown.



The most current equity numbers are from the prior test date.  It works this way when the test date is one trade day ahead of the instrument date the value for equity is based on what happened after all positions were settle on the previous test date.  It is important to know that all equity transactions are settle at the end of the test date.  At the equity settle location the test date and the instruments that had a trade record for that date will have the same date value when equity settles are made.  


Equity va, since the final equity figures are not determined until the end of the day when all scripting has finished for the Test.CurrentDate value.  


Update End-of-Day Equity numbers are available when scripting reaches the After Trading Day script section.




See Also:



Edit Time: 9/25/2017 09:09:54 AM

Topic ID#: 305


Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software