Equity Properties

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


Returns the total capital Adds and Draws that have been applied to the account.  When this property is accessed in the After Trading Day script, the amount returned is the current summation value as of the current date.  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/Auxiliary folder, and the file is named "Suite Name Capital Adds Draws.csv". Only values in this file that are on a test date that is included in the test run will be applied to the test. The amounts are applied to the closed equity account.


See test.otherExpenses & test.UpdateOtherExpenses .


Current cash of the test. Because a test can contain both stocks and futures and forex, this property returns closed equity plus marked to market open equity minus purchase equity. Marked to market open equity is the futures open equity, and purchase equity is the total initial purchase equity required to purchase open stock positions.


For a futures only test this returns total equity.

For a stock only test this returns closed equity minus purchase equity.



closedEquity[ ]

Total Closed Equity for all systems.  


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  of trades by all systems as well as margin costs and interest earned,.  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 test.totalMargin represents the initial purchase equity.


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.


Same as totalMargin, currentMargin, purchaseEquity. These all return the sum of all futures margin and all stock purchase equity.


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: 1/17/2018 11:50:58 AM

Topic ID#: 305


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