RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Details >

Adjusted

 

 

 

 

Category

Multi-Bar Functions

Description

Produce a fully back-adjusted (splits and dividends) price series for use as a Data section item

Syntax

Adjusted(price)

Parameters

price - a price expression. In practice only O, H, L, or C is meaningful — any expression is accepted, but the result is only correct when the input is one of those raw bar prices.

Notes

This is a special function that only works as a stand-alone Data section item formula. It is calculated in one pass over each symbol's bars, walking newest to oldest and applying splits and dividends so that every value is on the same scale as the most recent bar.

The resulting Data item can then be referenced by name in any other formula (Data, Library, Strategy, Scan, etc.) the same way you would reference an OHLC value.

The intended use case is to keep your underlying price data un-dividend-adjusted (e.g. Adjustment: Capital), so that backtest fills and dividend cash credits behave correctly, while still being able to compute total-return-style factors (momentum, relative strength, etc.) on a fully-adjusted series for ranking.

For this function to incorporate dividends, the imported data must carry dividend values — either from a source that provides them (Norgate, Yahoo) or via a dividend Event List. When no dividends are present in the data, the function still applies split adjustment correctly.

Because the calculation walks the full history of each symbol in one pass, the function cannot be embedded inside a larger expression or used outside of the Data section.

Example

Data:
 AdjC: Adjusted(C)
 Mom12M: ROC(AdjC, 252)

Build a fully back-adjusted close series and use it as the input to a 12-month total-return momentum factor, while the strategy itself continues to fill at the unadjusted O/H/L/C prices.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC