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:

Capital Adds Draws Total

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 test date.  When it is accessed 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 updated value changes in a test file are included when the sequence reaches the After Trading Day script section in the test simulation. The amount of change in equity that is applied is the amount of change in closed equity.

 

See test.otherExpenses & test.UpdateOtherExpenses .

cash

Cash is the most current cash amount available.  It is updated at the end of each test date.  The update happens in the After Trading Day script section.  This script is used because a test can contain systems that are using Stocks, Futures, and or Forex instruments, this property requires the current close price of all the instruments active in the test.  

 

Values returned are closed equity, plus marked to market open equity minus purchase equity.  

Marked to market open equity is the Futures instruments open equity, and purchase equity is the total initial purchase equity required to purchase open Stock instruments.

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.  

closedEquityHigh

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

coreEquity

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

currentClosedDrawdown

Current bar's closed equity drawdown.

currentClosedEquity

This property value is dynamic and it will change as the test works towards completion.

currentDrawdown[ ]

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

currentMargin

Deprecated -- see totalMargin

currentOpenEquity

This property value is dynamic and it will change as the test works towards completion.

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" .  

currentTotalEquity

This property value is dynamic and it will change as the test works towards completion.

otherExpenses

Total other expenses as set by test.UpdateOtherExpenses.

purchaseEquity

Use this property with stock porfolios.  Ths property will return the  current test simulation's Initial equity required amount to purchase current open positions (entry fill price times the quantity of shares) that are active in the test.

smartFillExit

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

startingEquity

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

threadCount

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.

totalEquityHigh

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

totalMargin

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.

totalOpenPositionTrades

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.

vadiDrawdown

Current VADI drawdown.

 

NOTE:

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.

 

Links:

UpdateOtherExpenses

See Also:

 

 


Edit Time: 3/29/2022 12:07:16 PM


Topic ID#: 305

 

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