Navigation: Realtest Script Language > Syntax Element Details >

OrdersNetLiq

 

 

 

 

Category

Settings or OrderSettings 

Description

Path and name of a text file that contains the current Net Liquidation Value (mark to market account balance) of your brokerage account

Notes

This setting can be used to ensure that orders are generated with the correct Quantity (position size) for your current account value.

If you have a way to automatically recreate this one-line text file each day, or a habit of doing so manually, this is the simplest way to get your order sizes right.

The value found in the file becomes the value of S.Alloc for the purpose of order generation.

To clarify how this works, imagine that daily order generation for live trading began at the start of this year with an account balance of $100K.

Your Settings might look like this:

When you generate tomorrow's orders, RealTest runs a backtest starting with $100K on 1/1/22 (or the first market day thereafter), models all the trades that should have occurred, and accumulates their net P/L in each strategy's S.Equity.

On the last date of the test, orders are generated by evaluating all of the strategy rules to determine which open positions call for exits and which new setups call for entries in each strategy.

For each strategy that uses a typical Quantity formula with either explicit or implied S.Alloc as its basis, if OrdersNetLiq was provided, it will become the value of S.Alloc. Otherwise, S.Alloc will be whatever it is at the end of the backtest segment.

Examples of Quantity formulas that would use OrdersNetLiq:

Examples of Quantity formulas that would NOT use OrdersNetLiq:

As always, position sizes for each backtest trade and generated order are calculated bottom-up, based on the Quantity formula provided.

The default calculation of S.Alloc is Combined(S.Equity), which is always equivalent to the NLV of a model account running all of the strategies in the script using whatever their Quantity formulas happen to be.

If you use a different Allocation formula to override the default S.Alloc, or if you don't base your sizes on S.Alloc (whether explicitly or implicitly), then it would not make sense to use an OrdersNetLiq file.

Even if you are using the default Allocation, you may prefer to keep sizing new positions according to the system model rather than your live account balance. OrdersNetLiq simply gives you the choice of using live NLV, it's not a requirement.

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC