RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Details >

#Median

 

 

 

 

Category

Cross-Sectional Functions

Description

For each date, evaluates a formula for each symbol, then calculates the median value for all symbols on that date and stores that value in the data item array for every symbol.

Syntax

#Median formula

Example

MedPriceToday: #Median Close

Calculates the average closing price across all stocks today and stores that value in today's slot for each symbol.

Notes

If the formula result is nan (not a number -- unable to calculate) then that stock is not included in the count from which the median is derived.

 

 

 

Copyright © 2020-2026 Systematic Solutions, LLC