RealTest User Guide
RealTest User Guide

 

 

Navigation: Realtest Script Language > Syntax Element Details >

DaysPerYear

 

 

 

 

Category

Settings

Description

Number of market days per year for stats purposes

Notes

This becomes the value returned by S.BPY for Daily BarSize tests (S.BPY is logically always 52 for Weekly, 12 for Monthly, 4 for Quarterly, 1 for Yearly).

The default if not specified is 252.

Use 365 for a 7-day asset such as Crypto.

S.BPY is used internally to calculate the following:

- S.BPW = S.BPY / 52

- S.BPM = S.BPY / 12

- S.BPQ = S.BPY / 4

- HVOL(len) = StdDev(log(c/c[1]), len) * 100 * Sqr(S.BPY)

S.BPY is also used in some of the formulas in Graphs.rts and Results.rts.

 

 

 

Copyright © 2020-2025 Systematic Solutions, LLC