There’s no reason to use FHist(“Close(0)”,52) when you can use Close(252) or Close_D(260). The operations, though, are quite different. FHist is unadjusted for splits and dividends, while Close is fully adjusted for both. I’m also unsure why you’re including ln.
Thx - after posting this I realized I could use close(251) instead of the fhist.
Essentially ret1yr% is the same as (close(0)-close(251))/close(251), which is split adjusted and includes dividends.
I also stumbled on closeexdiv(bars), which excludes dividends.
Some further background - I’m trying to replicate some of the work in OSAM’s “Factors from Scratch” paper. There’s a breakdown of returns, which requires taking logarithmic returns, hence the ln.
Hope to write a piece on SA on “return decomposition” soon.