---
title: "Historical Returns Matrix"
description: "In Indicators this is a table, not a matrix pane: there is no renderer that ignores the time axis, so the kScript (legacy) month-by-year grid has no Indicator…"
order: 64
section: "cookbook"
---

<!-- source: docs/indicators/cookbook/historical-returns.md; generated by packages/cli/scripts/gen-indicator-docs.ts, do not edit -->

# Historical Returns Matrix

In Indicators this is a table, not a matrix pane: there is no renderer that ignores the time axis, so the kScript (legacy) month-by-year grid has no Indicator form today.

The nearest form is `render.table` over string slots: bucket bars into months from `time.bar_open_sec`, keep the last N monthly returns in module-level variables, write them into `rows x cols` string slots in `finalize()`, and the chart shows the newest complete row of the table ([Plotting](../functions/plotting.md)).

What stays on kScript (legacy): `requestBars` for daily history independent of the chart interval, `plotMatrix` with its summary rows and the highlighted forming month; run the original with **Use kScript engine**.
