q.indicator contains deterministic market measurements for one instrument at a time. Indicators preserve pandas indexes, never group by symbol implicitly, and do not express investment intent. The preserved observation index is the row key, so indicator results align correctly when assigned to or joined with other objects computed from the same observations.
Use indicators directly in research, model-input frames, dashboards, alerts, and rules. Scheduling and materialization belong to the application using QRT.
Native functions are flat under q.indicator; provider-specific formulas remain explicit under q.indicator.talib and q.indicator.pandas_ta. The examples below are executed live by Quarto every time the docs are built.
Sample data
We use qrt’s bundled AAPL sample dataset — loaded offline via q.data.datasets.load, no network dependency (see the Data tutorial for more on q.data):
import pandas as pdimport qrt as qaapl = q.data.datasets.load("aapl")aapl.tail()
open
high
low
close
volume
datetime
2026-07-20
333.510010
333.709991
323.679993
326.589996
53468000
2026-07-21
323.130005
329.600006
322.220001
327.739990
41338900
2026-07-22
327.869995
329.000000
323.339996
325.890015
38755900
2026-07-23
321.730011
323.299988
319.350006
321.660004
40840800
2026-07-24
NaN
NaN
NaN
NaN
47460975
Calculate reusable market measurements directly and assemble them into a model-input DataFrame when needed:
To add a native indicator, create qrt/indicator/_<indicator>.py with one public function and re-export it from qrt/indicator/__init__.py. Keep one canonical formula per native name; provider variants remain under their provider namespace.
Visualizing indicators
q.plot.line renders any indicator DataFrame as an interactive Plotly chart with hover, zoom, and range-selector buttons. Visualization does not register the values as stored features:
fig = q.plot.line( price_indicators, title="AAPL close price with SMA overlays", ylabel="Price", height=450,)fig.show()