RainbowStats Command Reference

Descriptions, aliases, examples and available result extracts.

Tool Bar Buttons

TextField Area

The text field is where your program begins. Data is sourced from the St. Louis Federal Reserve (FRED). Enter commands here or select from the list.

OIL=DCOILWTICO

Add Button

Submit the current command to your workspace. Pressing Enter performs the same action. Submitted commands appear below the toolbar.

Edit Button

Review and modify your script or scenario. After making changes, re-run the scenario.

Save Scenario

Save your scenario locally (browser storage). It will be available when you return. The server does not store this data.

Load Scenario

Load a previously saved scenario.

Copy Link

Generate a shareable link that reproduces your current scenario.

Import

Import a scenario into your workspace.

Focus

Expand or contract the viewing panel.

POP

Display the raw server response for detailed inspection.

Chat GPT

Analyze the current table or HTML output using ChatGPT.

Clipboard

Copy the current viewing panel to the clipboard.

Clip Compact

Copy a compact version of the viewing panel.

Commands

Open the command reference panel.

Studies

Ability to Save Scripts to your file

Save Study

Save a Study - will prompt for a name

Delete Study

Delete a Current Study

CLEAR

Clear the current tool equation map.

Full description

List/Series Commands

CFTC_FTT_SEARCH

Search for CFTC data

CFTC_TFF_SEARCH("yen")
Run example

CFTC_FTT

Get CFTC data

YenPosition=CFTC_TFF("097741","LEV_MONEY_NET","FUTURES_ONLY")
Run example

ALIGN_FIPS

Align lists by county FIPS identifiers.

Full description

ALIGN_STATES

Align lists by U.S. state identifiers.

Full description

BLS_GENDER

Build the server’s occupational earnings comparison by sex.

G=BLS_GENDER(2024,50)
EXTRACT(G,"comparison")
Run example Full description

ECB_FAVORITES

Return the installed ECB favorites catalog.

Aliases: ECBFAVORITES

Full description

ESTAT_FAVORITES

Return the installed ESTAT favorites catalog.

Aliases: ESTATFAVORITES

Full description

EXTRACT_LIST

Collect extractable result objects.

Full description

FRED_QD_SERIES

Load a series through the FRED-QD integration.

Full description

LIST

Construct a series list.

Full description

LIST_BETWEEN

Select a date interval from a series list.

Full description

LIST_SINCE

Select observations from a date onward.

Aliases: SERIES_SINCE, SINCE

Full description

LOOP_BLS_OCCUPATIONS

Run the server’s BLS occupation loop.

LOOP_BLS_OCCUPATIONS(2024,50)
Run example Full description

READ_JSON_SERIES

Read a named time series from a supported JSON file.

Aliases: JSON_SERIES, READJSON, READJSONSERIES

Full description

REMOVE

Remove a series from a list.

Full description

SAME_DATE_RANGE

SAME_DATE_RANGE(seriesOrList,...) flattens individual series and DataLists in argument order and returns a DataList through DataSeriesList.getSameDateRange(). It can change frequency and date labels, not merely trim endpoints: monthly INDPRO with quarterly GDP produced quarterly output; monthly EIA month-end and FRED month-start inputs were relabeled and could lose extra boundary months. Align full histories before clipping, then inspect frequency, dates, counts and list size. No specific aggregation, interpolation or internal-missing-value policy is promised by this dispatcher; choose explicit frequency conversion/aggregation when it matters. Non-series inputs are ignored rather than rejected. Aliases: SAME_RANGE, COMMON_RANGE.

Aliases: COMMON_RANGE, SAME_RANGE

Aligned=SAME_DATE_RANGE(INDPRO,PAYEMS)
Aligned
Run example Full description

SOCRATA

Load a column through the generic Socrata integration.

Full description

SOCRATA_DAILY

Load a daily series from a Socrata dataset.

Full description

SOCRATA_META

Inspect Socrata dataset metadata.

Full description

SOCRATA_SEARCH

Search Socrata datasets.

Full description

Text Commands

ADD_ANNOTATION

Add policy annotations or a single chart annotation.

Aliases: ANNOTATE

ADD_ANNOTATION(LINE_CHART(UNRATE),20200301,"March 2020")
Run example Full description

ADD_DATE_ANNOTATION

Annotate an explicit date and y value.

Aliases: DATE_ANNOTATE

ADD_DATE_ANNOTATION(LINE_CHART(UNRATE),20200401,14.8,"April 2020")
Run example Full description

ADD_NUMERIC_XMARKER

Add an explicitly numeric x-axis marker.

ADD_NUMERIC_XMARKER(SCATTER_PLOT(UNRATE,JTSJOR),4,"Vacancy rate")
Run example Full description

ADD_XMARKER

Add an x-axis marker.

Aliases: XMARKER

ADD_XMARKER(LINE_CHART(UNRATE),20200301,"March 2020")
Run example Full description

ADD_YMARKER

Add a horizontal y-axis marker.

Aliases: YMARKER

ADD_YMARKER(LINE_CHART(UNRATE),5,"Five percent")
Run example Full description

ARG

Construct a named argument.

Full description

ARG_LIST

Collect named arguments.

Full description

BULLET_SLIDE

Build a bullet slide.

Aliases: BULLETSLIDE

Full description

REMOVE_ANNOTATIONS

Remove annotations from a supported chart.

Aliases: CLEAR_ANNOTATIONS

REMOVE_ANNOTATIONS(LINE_CHART(UNRATE))
Run example Full description

STR

Return raw argument text as a string.

Full description

TEXT

Create a D3 HTML paragraph.

Full description

TEXT_SLIDE

Build a text slide.

Aliases: TEXTSLIDE

Full description

Sankey Builder Commands

SANKEY_CHART

Render a Sankey group as a chart.

SANKEY_CHART(CREATE_SANKEY_GROUP(LIST(PAYEMS,INDPRO)))
Run example Full description

SANKEY_GROUP

Combine Sankey paths and nested groups.

SANKEY_GROUP(SANKEY_PATH(SANKEY_LINK("A"),SANKEY_LINK("B"),INDPRO))
Run example Full description

SANKEY_LINK

Create a Sankey endpoint or link identifier.

SANKEY_LINK("Supply","Demand")
Run example Full description

SANKEY_PATH

Create a time-varying Sankey path.

SANKEY_PATH(SANKEY_LINK("Supply"),SANKEY_LINK("Demand"),INDPRO)
Run example Full description

Math Commands

ABS

Replace each value with its nonnegative magnitude.

x = DIFF(SERIES_SINCE(INDPRO,20010101))
LINE_CHART(ABS(x))
Run example Full description

BEG_DATE

Return the beginning observation date.

Full description

BEG_VALUE

Return the first series value.

Full description

CURRENT_DATE

Return today as numeric YYYYMMDD.

Aliases: CURRENTDATE

Full description

END_DATE

Return the ending observation date.

Full description

END_VALUE

Return the last series value.

Aliases: LAST_VALUE

Full description

EXP

Raise e to each input value.

x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(EXP(LOG(x)))
Run example Full description

INTERPOLATE_VALUE

Interpolate a series value at a date.

Full description

LAG

Apply the existing observation lag.

Full description

MAX

Return the maximum series value.

Full description

MAX_DATE

Return the date of the maximum value.

Full description

MIN

Return the minimum series value.

Full description

MIN_DATE

Return the date of the minimum value.

Full description

QUANTILE

Return a series quantile.

Full description

SIZE

Count series observations.

Full description

SYM

Parse a symbolic expression.

Full description

TO_ARRAY

Create a numeric array.

Full description

TO_NORMAL

Normalize series through the existing normalize method.

Aliases: NORMALIZE, TONORMAL

Full description

Graph Commands

Animated Line_Chart

Animated Graph a series

Animated_Line_chart(UNRate)
Run example

ADD_SERIES_LINE

Add a two-point line to a chart.

ADD_SERIES_LINE(LINE_CHART(UNRATE),20200101,5,20251201,5,"Reference")
Run example Full description

ADD_SUBTITLE

Append a subtitle to a line chart.

Aliases: SUBTITLE

ADD_SUBTITLE(LINE_CHART(UNRATE),"Monthly observations")
Run example Full description

ANIMATED_BAR_CHART

Animate a rolling bar chart.

ANIMATED_BAR_CHART(LIST(UNRATE,U6RATE))
Run example Full description

ANIMATE_SCATTER_PLOT

Animate a rolling scatter plot.

ANIMATE_SCATTER_PLOT(UNRATE,JTSJOR,30)
Run example Full description

AREA_LINE_CHART

Shade the area between two series and overlay a third line.

AREA_LINE_CHART(U6RATE,UNRATE,UNRATE)
Run example Full description

BAR_CHART

Draw bars for a series or a rolling bar view for a list.

Aliases: BARCHART, BAR_GRAPH

BAR_CHART(SERIES_SINCE(UNRATE,20200101))
Run example Full description

BAR_CHARTD3

Compare series using the period bar chart.

Aliases: LATEST_BAR, PERIOD_BAR

BAR_CHARTD3(LIST(UNRATE,U6RATE))
Run example Full description

BINARY_SPLIT

Display the existing split-regression chart.

Aliases: BINARYSPLIT, SPLIT_REGRESSION

BINARY_SPLIT(UNRATE,JTSJOR)
Run example Full description

COMBINE

Collect operators in the existing combined panel.

Full description

COMBINED3

Collect supported objects into a D3 combo.

Full description

DISCRIMINANT

Build the existing two-series discriminant chart.

Full description

DUAL_LINE_CHART

Draw two series on separate left and right y axes.

Aliases: DUAL_CHART

DUAL_LINE_CHART(UNRATE,U6RATE)
Run example Full description

GARCH

Construct the existing GARCH volatility analysis.

Full description

GRAPH

Choose the existing recommended chart for a series.

GRAPH(INDPRO)
Run example Full description

HIST

Display the distribution of a series as a histogram.

HIST(LOGDIFF(INDPRO))
Run example Full description

LINE_CHART

Plot observed values for one or more time series. For a compact view of long histories, see EPICYCLE_LINE_CHART.

Aliases: LINECHART, LINE_GRAPH

LINE_CHART(SERIES_SINCE(INDPRO,20000101))
Run example Full description

LINE_GRAPH_WITH_MEAN

Draw a series with its mean line.

Aliases: LINE_CHART_WITH_MEAN, MEAN_CHART, MEAN_LINE_CHART

LINE_GRAPH_WITH_MEAN(UNRATE)
Run example Full description

LOGISTIC_CURVE

Return a fitted logistic series.

LINE_CHART(LOGISTIC_CURVE(INDPRO))
Run example Full description

LOGISTIC_GRAPH

Display a logistic fit with residuals.

Aliases: LOGISTIC_CHART, LOGISTIC_FIT, LOGISTIC_PLOT

LOGISTIC_GRAPH(INDPRO)
Run example Full description

LOGISTIC_GRAPH_BOUND

Display a logistic fit with lower and upper bounds.

LOGISTIC_GRAPH_BOUND(INDPRO,1,200)
Run example Full description

LOGISTIC_GRAPH_LOWER

Display a logistic fit constrained by a lower bound.

LOGISTIC_GRAPH_LOWER(INDPRO,1)
Run example Full description

LOGISTIC_GRAPH_UPPER

Display a logistic fit constrained by an upper bound.

LOGISTIC_GRAPH_UPPER(INDPRO,200)
Run example Full description

MERGE_CHARTS

Merge D3 line or scatter charts.

MERGE_CHARTS("Combined",LINE_CHART(UNRATE),LINE_CHART(U6RATE))
Run example Full description

POISSON_CHART

Display the existing shock-probability chart.

POISSON_CHART(INDPRO,5)
Run example Full description

POLY_FIT

Build the existing polynomial-fit chart.

Full description

POLY_SCATTER

Plot a polynomial relationship with fitted bands.

POLY_SCATTER(UNRATE,JTSJOR,3)
Run example Full description

POLY_SPLINE

Evaluate the existing polynomial-spline chart operator.

POLY_SPLINE(LIST(UNRATE,JTSJOR),2,3)
Run example Full description

PUBLICATION_CHART

Create the existing publication chart presentation.

Aliases: PUBLISH

PUBLICATION_CHART(LINE_CHART(UNRATE))
Run example Full description

ROLL_BETA

Compute a rolling regression slope.

Full description

ROLL_CORR

Compute a rolling correlation.

Full description

ROLL_QUADRATIC

Display the existing rolling quadratic relationship.

ROLL_QUADRATIC(UNRATE,JTSJOR,36)
Run example Full description

ROLL_STD

Compute a rolling standard deviation.

Full description

SCATTER_PLOT

Plot two series with the existing fitted confidence band.

Aliases: SCATTERPLOT

SCATTER_PLOT(UNRATE,JTSJOR)
Run example Full description

SET_TITLE

Set the title of a supported chart.

SET_TITLE(LINE_CHART(UNRATE),"Unemployment")
Run example Full description

SET_TITLE_SUBTITLE

Set a title and append subtitles.

Aliases: SETTITLESUBTITLE, TITLE, TITLE_SUBTITLE

SET_TITLE_SUBTITLE(LINE_CHART(UNRATE),"Unemployment","Monthly observations")
Run example Full description

SPLIT_POLY_FIT

Fit polynomial segments around supplied split dates.

SPLIT_POLY_FIT(LIST(UNRATE,JTSJOR),2,20200301)
Run example Full description

STACKED_BAR_CHART

Display multiple series as stacked bars.

Aliases: STACKEDBAR, STACKEDBARCHART

STACKED_BAR_CHART(LIST(UNRATE,U6RATE))
Run example Full description

TERM_CHART

Compare relative series paths.

Aliases: RELATIVE_COMPARISON, TERM_GRAPH

TERM_CHART(INDPRO,PAYEMS)
Run example Full description

VOL_STUDY

Construct the existing volatility-study analysis.

Full description

Data Manipulation

AGGREGATE_TO_PERIOD

Aggregate a series with an explicit period and method.

Aliases: AGGREGATE, AGGREGATETOPERIOD, RESAMPLE

Full description

AQS

Load an EPA AQS daily air-quality series.

Full description

BOE

Load data through the Bank of England integration.

Full description

BOE_SEARCH

Search the BOE data catalog.

Full description

CDC

Load data through the Centers for Disease Control and Prevention integration.

Full description

CDC_SEARCH

Search the CDC data catalog.

Full description

CHINA

Load data through the China data source integration.

Full description

CHINA_SEARCH

Search the installed China data integration.

Full description

CLIP

Clip series values using numeric bounds.

Full description

COMEXT

Load data through the Eurostat Comext integration.

Full description

COMEXT_NETWORK

Build a trade network through the server Comext integration.

Full description

COMPOUND_SUM

Compute the existing compounded cumulative series.

Aliases: COMPOUNDSUM

Full description

COMTRADE

Load data through the UN Comtrade integration.

Full description

CUM_SUM

Compute cumulative sums.

Aliases: CUMSUM

Full description

DART

Load DART adult fish passage or river-environment data.

Full description

DIFF

Calculate changes between consecutive observations.

x = SERIES_SINCE(UNRATE,20010101)
LINE_CHART(DIFF(x))
Run example Full description

ECB

Load data through the ECB integration.

Full description

ECB_SEARCH

Search ECB data with an optional topic selector.

Aliases: ECBSEARCH, SEARCH_ECB

Full description

EIA

Load a U.S. Energy Information Administration series using the exact code returned by EIA_SEARCH(source,topic), for example S=EIA(PET.MCRSTUS1.M). Pass the provider code as raw text; punctuation, underscores and case are part of the code, not arithmetic. Monthly, weekly and annual codes are different series. Inspect EXTRACT(S,"summary") and the source definition for units, coverage, geography and inventory inclusion of the Strategic Petroleum Reserve. EIA does not automatically deflate prices, seasonally adjust observations or construct the paper-specific global inventory series. Do not assume an empty search means no data or substitute US measures for global data without labeling the substitution.

S=EIA(PET.MCRSTUS1.M)
EXTRACT(S,"summary")
Run example Full description

EIA_BEST

Select EIA matches through the server integration.

Full description

EIA_SEARCH

Search EIA bulk-series metadata within one source and return a table of up to 50 matches; it does not return the observation series. Sources: PET, NG, ELEC, COAL, INTL, EMISS, TOTAL, STEO. Bare tokens or outer quotes are accepted. Use short keywords, geography or distinctive code fragments, for example EIA_SEARCH(INTL,World), EIA_SEARCH(PET,MCRSTUS1), EIA_SEARCH(PET,F000000). Search matching/ranking is provider-specific: do not assume natural-language, Boolean or all-word matching. Empty results do not establish unavailable data; try a shorter term or another source. Copy a returned full code into EIA(code), then verify actual coverage and units. Aliases: EIASEARCH, SEARCH_EIA.

Aliases: EIASEARCH, SEARCH_EIA

EIA_SEARCH(INTL,World)
Run example Full description

EQUICENT

Apply the existing equicent transformation to a series or list.

EQUICENT(INDPRO)
Run example Full description

ESTAT

Load data through the Japan e-Stat integration.

Full description

ESTAT_LOOP

Load Japan e-Stat search results through the server loop hook.

Aliases: ESTATLOOP

Full description

ESTAT_SEARCH

Search the ESTAT data catalog.

Aliases: ESTATSEARCH, SEARCH_ESTAT

Full description

EUKLEMS_SEARCH

Search the EUKLEMS data catalog.

Full description

EUROSTAT

Load data through the Eurostat integration.

Full description

EXTRACT

Extract an output from a supported result object.

Aliases: EX

Full description

KURTOSIS

Summarize tail behavior using excess kurtosis.

x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
KURTOSIS(x)
Run example Full description

LAST

Return the last requested observations.

Aliases: TAIL

Full description

LOG

Take the natural logarithm of positive values.

x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(LOG(x))
Run example Full description

LOGDIFF

RainbowStats LOGDIFF and LOG_DIFF: fractional log changes, explicit lags, series-list transformations, percentage scaling and EXTRACT support.

Aliases: LOG_DIFF

LOGDIFF(US_ZERO(DGS10,10))
Run example Full description

MEAN

Calculate the arithmetic average of the supplied observations.

Aliases: AVG

x = SERIES_SINCE(UNRATE,20010101)
MEAN(x)
Run example Full description

NYFED

Load data through the Federal Reserve Bank of New York integration.

Full description

NYFED_SEARCH

Search the NYFED data catalog.

Full description

POSITIVE_PART

Compute the existing positive part transformation.

Aliases: POSITIVE

Full description

SEARCH

Search FRED and load up to 20 matching series.

Aliases: FRED_SEARCH, SEARCH_FRED

Full description

SEARCH_RID

Load FRED series associated with a numeric release ID.

Full description

SERIES_BETWEEN

SERIES_BETWEEN(seriesOrList,start,end) selects a date window from a series or separately from every series in a DataList, returning the corresponding type. Dates are numeric YYYYMMDD, not quoted strings. Both endpoints are inclusive in verified monthly FRED and EIA checks. Selection uses observation timestamps: a month-start endpoint can exclude a month-end-labeled observation in that month. For January 1975 through December 2019 use 19750101,20191231 and inspect the output. This is date selection, not alignment, resampling or missing-value filling. Apply LOGDIFF, DIFF or required lags before clipping when the first desired result needs earlier history. Alias: BETWEEN.

Aliases: BETWEEN

Growth=LOGDIFF(INDPRO)
Sample=SERIES_BETWEEN(Growth,19750101,20191231)
EXTRACT(Sample,"summary")
Run example Full description

SERIES_STATS

Return descriptive statistics in a table.

Full description

SKEW

Summarize the asymmetry of the supplied observations.

x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
SKEW(x)
Run example Full description

STDDEV

Measure dispersion around the mean.

x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
STDDEV(x)
Run example Full description

TO_ANNUAL

Convert series frequency using toAnnual.

Aliases: TOANNUAL

Full description

TO_INDEX

Apply the existing base-increase transformation.

Full description

TO_MONTHLY

Convert series frequency using toMonthly.

Aliases: TOMONTHLY

Full description

TO_QUARTERLY

Convert series frequency using toQuarterly.

Aliases: TOQUARTERLY

Full description

TO_WEEKLY

Convert series frequency using toWeekly.

Aliases: TOWEEKLY

Full description

TREASURY

Load data through the U.S. Treasury integration.

Full description

TREASURY_SEARCH

Search the TREASURY data catalog.

Aliases: SEARCH_TREASURY, TREASURYSEARCH

Full description

UPDOWN_SERIES

Compute the existing up/down count transformation.

Full description

USBR

Load a Bureau of Reclamation RISE daily series.

Full description

USDA

Load data through the U.S. Department of Agriculture integration.

Full description

USDA_SEARCH

Search the USDA data catalog.

Full description

USGS

Load a USGS daily observation series.

Full description

VOL_DRAG_INDEX

Apply the existing volatility-drag index transformation.

VOL_DRAG_INDEX(INDPRO,2)
Run example Full description

Matrix Commands

CHOLESKY

Create Cholesky Matrix from a list of series.

CholMatrix=CHOLESKY(covvar(LogDiff(List(DGS10,DEXJPUS,DGS30)))))
Run example

COL_COUNT

Count matrix columns.

Full description

CORR

Compute a correlation matrix or pairwise correlation.

Aliases: CORRELATION

Full description

COVVAR

Compute a covariance matrix or pairwise covariance.

Full description

DATA

Convert series observations to a data matrix.

Full description

INVERT

Compute a matrix inverse.

Full description

ROW_COUNT

Count matrix rows.

Full description

TRANSPOSE

Transpose a numeric matrix.

Full description

Lag Regression Analysis

ACF_CHART

Display autocorrelation and partial-autocorrelation analysis.

Aliases: ACFCHART, ACF_GRAPH

ACF_CHART(LOGDIFF(INDPRO),24)
Run example Full description

ARIMA

Build the existing automatic ARIMA analysis.

Full description

EPICYCLES

Display the existing epicycle reconstruction.

EPICYCLES(SERIES_SINCE(INDPRO,20000101),8)
Run example Full description

MVTRANSFER_FUNCTION

Build the existing multivariable transfer-function analysis.

Full description

PDL_REGRESSION

Fit the existing polynomial distributed-lag model.

Aliases: PDL

p=PDL_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)),12,2)
EXTRACT(p,"periodbarchart")
Run example Full description

SPECTRUM

Display the power spectrum of a series.

SPECTRUM(LOGDIFF(INDPRO))
Run example Full description

TRANSFER_FUNCTION

Build the existing two-series transfer-function analysis.

Full description

VAR_MODEL

VAR_MODEL(alignedList,lags) estimates a reduced-form VAR in the supplied series, without automatic differencing, lag selection, unit-root testing or structural shock identification. Align inputs first with SAME_DATE_RANGE and inspect the resulting frequency and dates. For a growth VAR, use LOGDIFF on positive levels and clip after transformation. lags counts lagged observations of every supplied variable. EXTRACT keys: model; chart:n (zero-based equation index); shockdiff:target:shockSeries:shockSize (zero-based indices in list order, 24-step conditional shock-minus-baseline path); dsge (installed VAR(1) conversion only). A shock size uses the supplied variable units: 0.01 in raw LOGDIFF is approximately one percent. Responses in growth units are not cumulative level effects or identified structural elasticities. Unrecognized extract keys fall back to the model table.

Growth=SERIES_BETWEEN(SAME_DATE_RANGE(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)),19750101,20191231)
V=VAR_MODEL(Growth,12)
EXTRACT(V,"chart:0")
Run example Full description

VAR_MODEL_FIT

Chart a fitted VAR equation.

Full description

Regression Analysis

ADD_DUMMY_SERIES

Add event or monthly dummy variables using the existing paths.

ADD_DUMMY_SERIES(LIST(INDPRO,PAYEMS),1)
Run example Full description

ADD_MONTHLY_DUMMY_SERIES

Append monthly dummy series to a list.

REGRESSION(ADD_MONTHLY_DUMMY_SERIES(LIST(INDPRO,PAYEMS)))
Run example Full description

BEST_BIC_REGRESSION

Search candidate regressors and return the selected regression.

r=BEST_BIC_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)),1)
EXTRACT(r,"model")
Run example Full description

BEST_COVID_REGRESSION

Select predictors and fit a COVID-adjusted regression. IMPORTANT: Use only when the estimation sample spans March 2020, preferably with observations before and after COVID onset. Do not apply to pre-COVID-only or post-onset-only samples; use ordinary regression instead.

r=BEST_COVID_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)),1)
EXTRACT(r,"model")
Run example Full description

BEST_REGRESSION

Search candidate regressors and return the selected regression.

r=BEST_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)),1)
EXTRACT(r,"model")
Run example Full description

BOOTSTRAP

Construct the existing bootstrap analysis.

Full description

CLINICAL_TRIALS

Load matching clinical-trial records.

Aliases: CT_SEARCH

Full description

CONSTRAINED_OLS

Fit constrained ordinary least squares.

Aliases: CONSTRAINED

r=CONSTRAINED_OLS(LIST(INDPRO,PAYEMS),1)
EXTRACT(r,"r2chart")
Run example Full description

CPS_WAGE_BANDS

Group CPS wages using supplied numeric boundaries.

Full description

DIFFERENCE_IN_DIFFERENCES

Estimate the existing difference-in-differences event analysis.

Aliases: DID, DIFF_IN_DIFF

m=DID(treated,controls,20200301)
EXTRACT(m,"summary")
Run example Full description

DISCOVER_MODEL

Run the existing genetic-search, forest and OLS pipeline.

m=DISCOVER_MODEL(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")
Run example Full description

FIXED_THRESHOLD_REGRESSION

Estimate two regimes at a fixed threshold.

t=FIXED_THRESHOLD_REGRESSION(LIST(UNRATE,JTSJOR),1,4)
EXTRACT(t,"model")
Run example Full description

GENETIC_MODEL

Search lagged predictors using the existing genetic model.

m=GENETIC_MODEL(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")
Run example Full description

GLS

Apply the existing rolling GLS calculation.

r=REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
g=GLS(r,12)
EXTRACT(g,"model")
Run example Full description

GROUPED_CROSS_SECTION

Analyze a county cross section grouped by state.

Full description

HUBER_REGRESSION

Fit the existing Huber robust-regression selection.

HUBER_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
Run example Full description

INSTRUMENT_HACKING

Demonstrate selection effects from searching over instruments.

m=INSTRUMENT_HACKING(200)
EXTRACT(m,"summary")
Run example Full description

IV_REGRESSION

Estimate instrumental-variables regression.

iv=IV_REGRESSION(LIST(Y,X),LIST(Z1,Z2))
EXTRACT(iv,"first_stage_f")
EXTRACT(iv,"beta:1")
Run example Full description

LOOP

Expand a wildcard function into a combined presentation.

LOOP(LINE_CHART($$),DGS10,DGS2)
Run example Full description

LOOP_ECB

Load a geographic series list after wildcard substitution.

Aliases: ECB_LOOP

LOOP_ECB(EXR.A.$$.EUR.SP00.A,"$$ exchange rate")
Run example Full description

LOOP_EURO_ECB

Load a geographic series list after wildcard substitution.

LOOP_EURO_ECB(ICP.M.$$.N.000000.4.ANR,"$$ inflation")
Run example Full description

LOOP_OBJECTS

Expand a wildcard function while retaining its result objects.

MODELS=LOOP_OBJECTS(REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF($$))),PAYEMS,CPIAUCSL)
Run example Full description

LOOP_STATE2

Load a list across the installed U.S. state set.

LOOP_STATE2($$UR)
Run example Full description

LOOP_STATE_ANSICODE

Load a list across the installed U.S. state set.

LOOP_STATE_ANSICODE(ATNHPIUS$$A)
Run example Full description

LOOP_US_COUNTY

Load a geographic series list after wildcard substitution.

LOOP_US_COUNTY(PCPI$$,"WA")
Run example Full description

MATCHED_COMPARISON

Compare matched observations across groups.

m=MATCHED_COMPARISON(LIST(UNRATE,JTSJOR,CPIAUCSL),1,4)
EXTRACT(m,"balance")
Run example Full description

PC_ANALYSIS

Build the existing principal-component analysis object.

Full description

PRINC_COMPONENTS

Return principal-component series.

Full description

QCEW

Load BLS Quarterly Census of Employment and Wages data.

Full description

QUANTILE_RANDOM_FOREST

Fit quantile random-forest regression.

m=QUANTILE_RANDOM_FOREST(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")
Run example Full description

RANDOM_FOREST

Fit a random-forest regression.

m=RANDOM_FOREST(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")
Run example Full description

REGRESSION

Fit ordinary least squares.

Aliases: REG

r=REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
EXTRACT(r,"slideshow")
Run example Full description

REGRESSION_COVID

Fit regression with a COVID-onset adjustment. IMPORTANT: Use only when the estimation sample spans March 2020, preferably with observations before and after COVID onset. Do not apply to pre-COVID-only or post-onset-only samples; use ordinary regression instead.

r=REGRESSION_COVID(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
EXTRACT(r,"model")
Run example Full description

RIDGE_REGRESSION

Compare ridge regressions over the existing lambda grid.

Aliases: RIDGE

RIDGE_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
Run example Full description

SIMU_REGRESSION

Collect regression equations into a system.

s=SIMU_REGRESSION(REGRESSION(UNRATE,U6RATE),REGRESSION(INDPRO,PAYEMS))
EXTRACT(s,"residual_covariance")
Run example Full description

SPECTRAL_KL

Build the existing spectral Kullback-Leibler analysis.

SPECTRAL_KL(LIST(INDPRO,PAYEMS),LIST(INDPRO,PAYEMS))
Run example Full description

STAGGERED_SYNTHETIC_CONTROL

Estimate the existing staggered synthetic-control analysis.

Aliases: SSC

m=SSC(outcomes,20120101,20150101,0)
EXTRACT(m,"event_att")
Run example Full description

STATE_FIXED_EFFECTS

Append state fixed-effect variables to a cross section.

STATE_FIXED_EFFECTS(crossSection,"largest")
Run example Full description

SUR_REGRESSION

Estimate seemingly unrelated regressions from a regression system.

Aliases: SUR

system=SIMU_REGRESSION(REGRESSION(UNRATE,U6RATE),REGRESSION(INDPRO,PAYEMS))
sur=SUR_REGRESSION(system)
EXTRACT(sur,"summary")
Run example Full description

THREE_STAGE_REGRESSION

Build the existing instrumental-variables system estimator.

system=SIMU_REGRESSION(REGRESSION(UNRATE,U6RATE),REGRESSION(INDPRO,PAYEMS))
THREE_STAGE_REGRESSION(system,LIST(CPIAUCSL))
Run example Full description

THRESHOLD_REGRESSION

Search for a two-regime regression threshold.

t=THRESHOLD_REGRESSION(LIST(UNRATE,JTSJOR),1,24)
EXTRACT(t,"slideshow")
Run example Full description

TRANSITION_MATRIX

Build the existing series transition analysis.

Full description

Distribution Functions

BINOMIAL_DIST

Construct a binomial distribution.

Aliases: BINOMIAL

Full description

CAUCHY_DIST

Construct a Cauchy distribution.

Full description

DISTRIBUTION_MAP

Build the existing distribution-map presentation.

DISTRIBUTION_MAP(LIST(UNRATE,U6RATE))
Run example Full description

EXPONENTIAL_DIST

Construct the existing exponential distribution.

Full description

FIT_DIST

Fit a distribution and display its chart.

Aliases: HIST_FIT

FIT_DIST(LOGDIFF(INDPRO))
Run example Full description

GAMMA_DIST

Construct the existing gamma distribution.

Full description

NORMAL_DIST

Construct a normal distribution.

Aliases: NORMAL

Full description

RANDOM

Sample a distribution into a numeric array.

Full description

UNIFORM_DIST

Construct the existing uniform distribution.

Full description

Pricing Commands

Option Pricer

Pricing of Simple European/American Options

Option_Pricer
Run example

Model Comparison using Characteristic Functions

Pricing of European Options Using Different Models

Option_Modeler
Run example

US Government Bond Pricer

Pricing of U.S. Government Bonds

US_GOVT_BOND_PRICER
Run example

US Corporate Bond Pricer

Pricing of U.S. Corporate Bonds

US_CORPORATE_BOND_PRICER
Run example

US Convertible Bond Pricer

Pricing of U.S. Simple Convertible Corporate Bonds

US_CONVERTIBLE_BOND_PRICER
Run example

Structured Product Developer

In Development, a Tool for Evaluating Structured Products

Structured_Product_Developer
Run example

Cash Flow Defeasance -- In Progress

Defeasance of a Monthly Series of Cash Flows

Defeasance_model
Run example

Spectral Barriers

Calculation of Barrier Options using Eigenfunctions

Spectral_Barriers
Run example

Linear Programming

ADD_LP_EQUATION

Add a linear constraint to an LP or LP regression.

Aliases: LP_ADD_EQUATION

ADD_LP_EQUATION(P,"X+Y<=4")
Run example Full description

DSGE_MODEL

Create an empty linear or affine DSGE model, not a fitted model. Build and retain it with M=DSGE_MODEL(); M=ADD_DSGE_SHOCK(M,"EPS"); M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS"); M=COMPILE_DSGE(M); M=SOLVE_DSGE(M). Always assign returned model updates back to M. Set period-zero values with M=SET_DSGE_INITIAL(M,"X",2), then display FORECAST_DSGE(M,12). This is a user-specified linear system, not automatic Bayesian estimation, nonlinear solution or structural identification.

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

DUALMODEL_LP

Display the existing LP dual table.

DUALMODEL_LP(P)
Run example Full description

LINEAR_LP

Create an ordinary linear-programming model.

P=LINEAR_LP(Production)
Run example Full description

LP_ADD_PERIOD_EQUATION

Add period-specific constraints to an LP regression.

R=LP_ADD_PERIOD_EQUATION(LIST(Y,X),"Intercept>=0",20200101,20201231)
EXTRACT(R,"model")
Run example Full description

LP_REGRESSION

Create a linear-programming regression.

Aliases: LP_OLS

r=LP_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
EXTRACT(r,"model")
Run example Full description

MAX_LP

Maximize an LP objective.

MAX_LP(P)
Run example Full description

MIN_LP

Minimize an LP objective.

MIN_LP(P)
Run example Full description

MODEL_LP

Return an ordinary LP model.

MODEL_LP(P)
Run example Full description

SET_LP_OBJECTIVE

Set the objective of an ordinary LP.

SET_LP_OBJECTIVE(P,3*X+2*Y)
Run example Full description

SET_PARAMETER

Set an object parameter.

Aliases: SET

Full description

Political Economy Functions

COMPARE_PRESIDENT

Chart the existing presidential-period comparison.

Full description

COMPARE_SELECTED_PRESIDENTS

Compare relative paths over selected presidential terms.

Aliases: COMPAREPRESIDENTS

COMPARE_SELECTED_PRESIDENTS(UNRATE,OBAMA,TRUMP)
Run example Full description

PARTY_REGRESSION

Fit the existing party-dummy regression.

r=PARTY_REGRESSION(UNRATE)
EXTRACT(r,"model")
Run example Full description

PARTY_SERIES

Create the existing Democratic or Republican party-period series.

Full description

POLITICAL_ANALYSIS

Build the existing political-period analysis.

Full description

PRESIDENT_REGRESSION

Fit regression with presidential-term dummy variables.

r=PRESIDENT_REGRESSION(UNRATE)
EXTRACT(r,"model")
Run example Full description

Spectral Analyis Function

SPECTRAL_TRANSFER_FUNCTION_WELCH

Display Welch spectral transfer-function analysis.

SPECTRAL_TRANSFER_FUNCTION_WELCH(LOGDIFF(INDPRO),LOGDIFF(PAYEMS))
Run example Full description

SPECTRAL_TRANSFER_MATRIX

Display a selected spectral transfer-matrix result.

SPECTRAL_TRANSFER_MATRIX(LIST(INDPRO,PAYEMS),PEAK)
Run example Full description

Pages

INTEREST_RATES

Open the existing interest rates model.

INTEREST_RATES()
Run example Full description

MARKETPAGE

Open the existing marketpage model.

MARKETPAGE()
Run example Full description

MERTON_DEBT_GDP

Open the existing merton debt gdp model.

MERTON_DEBT_GDP()
Run example Full description

Analysis Commands

Series Analysis

Quick View of a Time Series

series_analysis
Run example

Bid Analyzer

Competitive Bidding with Asymmetric Information - Wilson

Bid_Analyzer
Run example

Dual Series Analysis

Analysis of Two Time Series, ScatterPlot,Regression etc

dual_series_analysis
Run example

Multivariate Series Analysis

Analysis of Mutivariate Time Series,Correlations,Regression etc

multi_series_analysis
Run example

Sankey Charts

Chart of various economic flows

Sankey_Charts
Run example

PROBIT

Estimate a binary-response probit regression using maximum likelihood and the standard normal cumulative distribution. Use PROBIT(outcome,LIST(X1,X2,...)) to model the probability of an event, such as a recession, default, or economic contraction, from explanatory variables. Returns a ProbitCombo with fitted probabilities, coefficient statistics, classification diagnostics, and D3 visualizations. Use EXTRACT(model,fitted) to obtain fitted probabilities and EXTRACT(model,series) for the original outcome.

PROBIT(outcome,LIST(X1,X2))
Run example Full description

RECESSION_PROBIT

Create recession-probability analysis from predictors.

RECESSION_PROBIT(LIST(T10Y3M,LOGDIFF(INDPRO)))
Run example Full description

SLIDESHOW

Build an animated slideshow.

Aliases: SLIDE, SLIDES

Full description

Simulations

Series Simulator

Historical Time Series Simulation

series_simulator
Run example

Normal Test

Testing the concept of user created simulations

Normal_Test
Run example

Interest Rate Calculations

AFFINE_RATES

Open the existing affine rates model.

AFFINE_RATES()
Run example Full description

MORT_DURATION

Transform yield observations using the existing mort duration calculation.

MORT_DURATION(DGS10,10)
Run example Full description

MORT_PAYMENT

Transform yield observations using the existing mort payment calculation.

MORT_PAYMENT(DGS10,10)
Run example Full description

US_BOND_DURATION

Transform yield observations using the existing us bond duration calculation.

US_BOND_DURATION(DGS10,10)
Run example Full description

US_ZERO

Transform yield observations using the existing us zero calculation.

US_ZERO(DGS10,10)
Run example Full description

ZCB_CIR_CURVE

Build a model term structure.

ZCB_CIR_CURVE(R0,0.03,TMIN,1,TMAX,10,N,10)
Run example Full description

DSGE

ADD_DSGE_EQUATION

Append a quoted linear or affine equation and return the updated DSGE model. Use M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS"); always reassign M. Supports +, -, *, /, parentheses, registered scalar parameters, LAG(variable,1) and LEAD(variable,1); products or division involving endogenous variables must remain linear. Register shocks before compilation. Adding equations invalidates compilation and solution; compile and solve again. Does not automatically linearize nonlinear equations.

Aliases: ADD_EQUATION

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

ADD_DSGE_SHOCK

Register a named exogenous innovation in a DSGE model. Use M=ADD_DSGE_SHOCK(M,"EPS") and retain the returned model. Register the name before compiling equations that use it. Duplicate shock names are rejected; adding a shock invalidates compiled and solved results, so compile and solve again. Registering a shock does not apply it: FORECAST_DSGE sets future innovations to zero.

Aliases: ADD_SHOCK

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

COMPILE_DSGE

Compile a defined linear or affine DSGE system into coefficient matrices; return the compiled model. Use M=COMPILE_DSGE(M), then M=SOLVE_DSGE(M). Compilation alone does not create a solved policy rule and clears stale solution results. Retain every model update by reassignment. Inspect compiled matrices with EXTRACT(M,"current_matrix"), EXTRACT(M,"lag_matrix") or other documented matrix keys.

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

FORECAST_DSGE

Display a deterministic path from a solved DSGE model: F=FORECAST_DSGE(M,12). Requires M=SOLVE_DSGE(M) first; set initial values with M=SET_DSGE_INITIAL(M,"X",2). Horizon is a positive integer number of model periods, not inferred calendar months or quarters. Includes period zero and periods 1 through horizon, with future shocks zero and the solved intercept included. Returns an initial-conditions/line-chart slideshow, not a model: keep F separate from M. Generic deviation-axis wording may need explanation for level equations; SET_TITLE on the slideshow does not retitle its inner chart.

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

SET_DSGE_INITIAL

Set a finite period-zero endogenous-variable value for a deterministic DSGE forecast and return the model. Use M=SET_DSGE_INITIAL(M,"X",2), retaining M. Endogenous variables without explicit initial values start at zero. Setting initial values preserves an existing solved rule; unknown variable names are checked when forecasting. Units follow the equations: a log deviation of 0.01 can mean approximately 1 percent, while 1 can mean one unit in a level equation. This does not inject a future shock.

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

SOLVE_DSGE

Solve a user-specified linear or affine DSGE system and return the solved model. Use M=SOLVE_DSGE(M); keep the returned M for initial conditions, extraction and forecasting. Compiles if needed. Requires a nonempty valid system; success depends on equation consistency, rank and solver solution conditions. Inspect EXTRACT(M,"solver_summary"), EXTRACT(M,"stability") and EXTRACT(M,"policy_residual"). Does not estimate parameters or establish causal identification.

M=DSGE_MODEL()
M=ADD_DSGE_SHOCK(M,"EPS")
M=ADD_DSGE_EQUATION(M,"X=0.5*LAG(X,1)+EPS")
M=COMPILE_DSGE(M)
M=SOLVE_DSGE(M)
M=SET_DSGE_INITIAL(M,"X",2)
FORECAST_DSGE(M,12)
Run example Full description

Series

ADD_ITEM

Add series to a stored data list.

Full description

APPEND

Join values into text.

Full description

GET_SERIES

Select one series from a list.

Full description

INDEX_100

Apply the existing index-100 transformation.

Full description

INTERPOLATE

INTERPOLATE(Y,X) returns a numeric dated series by interpolating Y onto the dates supplied by X. Argument order matters: Y supplies the values and units; X supplies the target observation calendar, not explanatory values. Calls the existing Y.getInterpolatedDates(X) method even when the two inputs have the same frequency. Use INTERPOLATE(radiation,water) to align solar radiation with observed buoy water-temperature dates before regression or transfer-function analysis. Returns a SeriesOperator suitable for REGRESSION, LIST and MVTRANSFER_FUNCTION. Both arguments must be nonempty numeric dated series. Uses linear interpolation in elapsed milliseconds, keeps exact source values at matching timestamps, omits target dates outside Y's span and omits interpolated NaN values. Preserves Y's name, code, units and source and sets the output frequency from X. No extrapolation. It does not create a complete daily calendar unless X supplies one, and does not by itself establish calendar-day lag semantics. Interpolated values are estimates. For SOLAR, direct calculation on X's dates is preferable when available: EXTRACT(SOLAR(X,location),RADIATION).

water=NDBC("42040","WTMP",2000,2025)
location=GEO_LOCATION(29.207,-88.237)
solar=SOLAR(water,location)
radiation=EXTRACT(solar,"RADIATION")
alignedSolar=INTERPOLATE(radiation,water)
reg=REGRESSION(water,alignedSolar)
EXTRACT(reg,"slideshow")
Run example Full description

LIST_SUMMARY

Return a summary table for a series list.

Full description

MAKE_SIMILAR_SERIES

Create a series using new values and existing dates.

Full description

NEGATIVE_PART

Compute the existing negative part transformation.

Aliases: NEGATIVE

Full description

ROLL_COV

Compute a rolling covariance.

Full description

ROLL_MEAN

Compute a rolling mean.

Full description

ROLL_OLS

Compute a rolling OLS fitted value.

Full description

SET_FIRST

Move a selected series to the first position.

Full description

SET_NAME

Copy a series and give it a new name.

Aliases: NAME

Full description

SET_UNITS

Set units on a series copy or Sankey chart.

Full description

VELOCITY

Divide one operator value by another.

Full description

ZSCORE

Compute the existing z-score transformation.

Full description

Optimization

ADD_LP_EQUATION_RANGE

Add a date-bounded constraint to an existing LP regression.

Aliases: LP_ADD_RANGE

ADD_LP_EQUATION_RANGE(R,"Intercept>=0",20200101,20201231)
Run example Full description

Presentation

ADD_TEXT

Add a text-block paragraph to a D3 HTML panel.

Full description

AI_PANEL

Create the existing AI graph analysis panel.

Full description

HTML_SLIDE

HTML_SLIDE(html) returns a D3HtmlOperator that renders an HTML fragment and is directly accepted by SLIDE/SLIDESHOW and COMBINED3. Pass one quoted HTML literal or an expression evaluating to StringOperator. Use it for explanatory text, headings, tables, source links and supported inline SVG. Example: intro=HTML_SLIDE("<h1>Seasonal response</h1><p>Source and interpretation.</p>"); slide(intro,EXTRACT(model,"actualvsfitted")). Markup is preserved, not escaped as visible text. Text-only slides should use TEXT_SLIDE. Unlike MAKE_HTML, this returns a D3 panel rather than HTMLObject. Use trusted presentation content. This command does not sanitize HTML, execute JavaScript, fetch images, grant network permissions or export a file. Viewer sanitization and CSP still apply. External images may be blocked; prefer approved RainbowStats-hosted assets with caption/source links. Use simple fragments and inline styles, not complete HTML documents, scripts, iframes or event handlers. Maximum 32000 HTML characters; the MCP script/request/result limits apply separately. Avoid base64 images and oversized tables. One equation per line; put slide(...) last. If HTML_SLIDE is unavailable, refresh command discovery after deploying and registering the core command.

intro=HTML_SLIDE("<h1>Seasonal response</h1><p>Read the diagnostics before interpreting a fit.</p>")
notes=HTML_SLIDE("<h2>Sources</h2><p><a href='https://rainbowstats.com/commandDesc/index.html'>Command reference</a></p>")
slide(intro,notes)
Run example Full description

MAKE_HTML

Wrap evaluated string content as HTMLObject.

Full description

RECIPES

Build the existing economic recipes slideshow.

Full description

Graphs

ANIMATED_LINE_CHART

Animate a time-series line.

ANIMATED_LINE_CHART(SERIES_SINCE(INDPRO,20200101))
Run example Full description

ANIMATE_SANKEY_CHART

ANIMATE_SANKEY_CHART(group) animates dated flows in a SankeyGroup, showing how links change across observations. Build the group using SANKEY_PATH(fromLink,toLink,series) and SANKEY_GROUP(path,...); each path must use a numeric time series. The animation viewer includes a 'Download animated SVG' button. Tell the user that they can download the complete animation as a standalone .svg for embedding in a blog or webpage; the exported SVG does not require the RainbowStats JavaScript renderer. Use consistent source/target identifiers for the same transition throughout the animation. This command returns a scriptable animation, not an ordinary SLIDE/SLIDESHOW panel. Do not interpret aggregate flows as individual-level transitions unless the input data actually measure those transitions.

Full description

BOLLINGER

Display Bollinger bands for a series.

BOLLINGER(INDPRO,12,2)
Run example Full description

CREATE_SANKEY_GROUP

Create a Sankey group from a series list.

CREATE_SANKEY_GROUP(LIST(PAYEMS,INDPRO))
Run example Full description

EXPONENTIAL_GRAPH

Display the existing exponential-fit chart.

EXPONENTIAL_GRAPH(INDPRO)
Run example Full description

GAAP_HISTO

Open the existing GAAP histogram-building interface.

GAAP_HISTO()
Run example Full description

GEOMETRIC_JS

GEOMETRIC_JS(pList,qList[,ridge]) measures how much two economic regimes differ in their entire fitted multivariate Gaussian distributions—not just their averages or regression coefficients. P and Q are DataLists containing the same variables in the same column order; rows are observations, and the samples may have different dates or sizes. The operator fits each regime's mean vector and covariance matrix, uses shared pooled standardization and optional covariance ridge (default 1e-8), constructs the normalized geometric Gaussian midpoint G proportional to sqrt(P*Q), and returns [KL(P||G)+KL(Q||G)]/2 in nats. The measure is symmetric, nonnegative, and not generally bounded by ln(2). Zero means identical fitted regularized Gaussians; a larger value indicates more distributional separation. It is NOT a p-value, causal estimate, or automatically a structural-break test. Serial dependence and non-Gaussian data require caution. The default four-slide educational presentation explains the statistic, Gaussian geometric midpoint, variable-level mean/variance changes, regularization, and econometric interpretation. EXTRACT(model,"divergence"), EXTRACT(model,"kl_p"), EXTRACT(model,"kl_q"), EXTRACT(model,"means"), EXTRACT(model,"covariance_p"), EXTRACT(model,"covariance_q"), EXTRACT(model,"covariance_g"), EXTRACT(model,"summary"), and EXTRACT(model,"slideshow") are supported. For macroeconomic regime comparisons, use matching transforms (e.g. inflation and rate changes), split each variable into two date windows, build LISTs, then GEOMETRIC_JS(before,after). This is a finite-dimensional Gaussian implementation, not the full infinite-dimensional Hilbert-space theorem.

P=LIST(SERIES_BETWEEN(UNRATE,20000101,20071231),SERIES_BETWEEN(FEDFUNDS,20000101,20071231))
Q=LIST(SERIES_BETWEEN(UNRATE,20100101,20191231),SERIES_BETWEEN(FEDFUNDS,20100101,20191231))
M=GEOMETRIC_JS(P,Q)
SLIDE(M)
EXTRACT(M,"divergence")
Run example Full description

PLOT_MATRIX

Plot matrix columns as lines.

PLOT_MATRIX(CURVE,0,1)
Run example Full description

SANKEY_CHARTS

Open the existing Sankey chart-building interface.

SANKEY_CHARTS()
Run example Full description

SCATTER_LAST

Report the existing SCATTER_LAST placeholder status.

SCATTER_LAST(LIST(UNRATE),LIST(U6RATE),12)
Run example Full description

SET_XAXIS

Set the x-axis label.

SET_XAXIS(LINE_CHART(UNRATE),"Date")
Run example Full description

SET_YAXIS

Set the y-axis label.

SET_YAXIS(LINE_CHART(UNRATE),"Percent")
Run example Full description

SIMU_GRAPH

Display one column of a simulation summary.

SIMU_GRAPH(summary,0)
Run example Full description

SPECTRAL_TRANSFER_FUNCTION

Display spectral transfer-function analysis.

SPECTRAL_TRANSFER_FUNCTION(LOGDIFF(INDPRO),LOGDIFF(PAYEMS))
Run example Full description

WEIGHT_CHART

Display official CPI or PPI component weights.

Aliases: WEIGHTCHART

WEIGHT_CHART(CPIAUCSL,0.9)
Run example Full description

YX_SCATTER

Build the existing y-versus-x scatter view.

YX_SCATTER(LIST(UNRATE,JTSJOR))
Run example Full description

Data

AQS_CLASSES

List EPA AQS parameter classes.

Full description

AQS_COUNTIES

List EPA AQS counties in a state.

Full description

AQS_MONITORS

List EPA AQS monitors for a parameter and date range.

Full description

AQS_PARAMETERS

List EPA AQS parameters in a class.

Full description

AQS_SEARCH

Search EPA AQS sites.

Full description

AQS_SITES

List EPA AQS sites in a county.

Full description

AQS_STATES

List EPA AQS states.

Full description

AQS_VARIANTS

Inspect available EPA AQS observation variants.

Full description

BOND_LIST

Collect parsed bond offerings for tranche-level analysis.

BOND_LIST(IBMNotes,AppleNotes)
Run example Full description

CFTC_TFF

Load a CFTC financial-futures position series.

Full description

CFTC_TFF_SEARCH

Find CFTC Traders in Financial Futures contracts.

Full description

CLINICAL_TRIAL

Load a specific clinical-trial study.

Aliases: CT_STUDY

Full description

DART_SEARCH

Search DART station, species and variable information.

Full description

DMO

Load data through the UK Debt Management Office integration.

Full description

DMO_SEARCH

Search the DMO data catalog.

Full description

EDGAR_BOND_TERMS

Read one recent FWP by ticker or CIK and dashed accession. Returns an extractable BondOperator with one row per supported fixed-rate USD tranche with primary-market pricing and Treasury spread in basis points.

EDGAR_BOND_TERMS(AAPL,"0001140361-25-017410")
Run example Full description

EDGAR_SEARCH

Search recent SEC filings by ticker or numeric CIK. Optional exact form and row limit (default 25, maximum 200). Earlier SEC history files are outside this search.

EDGAR_SEARCH(IBM)
Run example Full description

EUKLEMS

Load data through the EU KLEMS integration.

Full description

FRED_QD

Load a FRED-QD series using the existing public spelling.

Full description

GET_FRED_DATES

Return the existing FRED release-date table.

Full description

GET_FRED_RELEASES

Return the existing FRED release table.

Full description

OECD

OECD("agency,dataset,version","selection") loads one OECD Data Explorer time series through the server's cached OECD provider. Pass two literal text arguments: the flow contains agency, dataset ID and an explicit structural version, and selection contains one explicit code for every dimension in the dataset's own dimension order, separated by dots. Quote the flow to protect its commas. Use the OECD catalogue search and the selected dataset's structure/codelists or Developer API query builder to obtain real codes; there is no universal dimension order. Returns an ordinary SeriesOperator. Existing cached data may be served while background refresh runs; a first uncached request may return an empty series while retrieval is queued. Provider values use base units after UNIT_MULT scaling; missing observations remain NaN. Dataset-specific rights and third-party restrictions still apply; retain the source attribution.

OECD("<agency>,<dataset>,<version>","<complete-single-series-dimension-key>")
Run example Full description

OECD_SEARCH

OECD_SEARCH("search words"[,limit]) searches the cached OECD dataset catalogue and returns a D3HtmlOperator table. Alternatively, OECD_SEARCH("agency,dataset,version"[,limit]) lists actual series in that dataset, including complete ready-to-run OECD(flow,selection) commands. Append filter words after the flow inside the same quoted string, such as OECD_SEARCH("agency,dataset,version United States",100), to narrow the series list. Series discovery downloads a bounded dataset once and caches distinct observed keys and labels for seven days; keys are not guessed from codelist combinations. Default limit 25; integer literal 1 through 200. Case-insensitive search requires all whitespace-separated words to occur in the agency, dataset ID, name or description. Results include dataset name, description, flow (agency,dataset,version), a list-series command, and optional OECD/structure links. Dataset keyword search identifies datasets; flow search identifies their actual series. Copy the complete command from the series-list table, or inspect OECD Data Explorer for more detail, then use OECD("agency,dataset,version","complete-single-series-dimension-key"). Do not invent selection codes. The catalogue is cached for seven days; first retrieval can require a network request. Network/rate-limit failure without a catalogue produces an explanatory HTML result; stale cached results are identified. Reuse restrictions depend on the dataset.

OECD_SEARCH("income inequality",25)
Run example Full description

QCEW_SEARCH

Search the existing industry-code registry.

Full description

USBR_LOCATION_META

Inspect Bureau of Reclamation RISE metadata.

Full description

USBR_META

Inspect Bureau of Reclamation RISE metadata.

Full description

USBR_SANKEY

Chart the existing Elephant Butte annual reservoir budget.

Full description

USBR_SEARCH

Find Bureau of Reclamation RISE catalog items.

Full description

USGS_META

Inspect USGS station and parameter metadata.

Full description

USGS_SEARCH

Search USGS monitoring sites.

Full description

WORLD_BANK_CROSS_SECTION

Load a World Bank cross section for a year and indicators.

Full description

WORLD_BANK_SEARCH

Search World Bank indicator information.

Full description

Time Series

ARDL

Estimate an Autoregressive Distributed Lag ARDL(p,q) model by OLS: ARDL(y,LIST(x1,x2,...),p,q). Uses p lags of dependent variable y and lags 0 through q of every explanatory variable, after aligning dates. Returns an educational D3 slideshow with labeled coefficients, classical standard errors, actual-vs-fitted levels, residuals, conditional long-run multipliers, error-correction adjustment and equilibrium-error chart. Use slide(model) or EXTRACT(model,slideshow); EXTRACT supports summary, coefficients, long_run, adjustment, fitted, residuals and equilibrium_errors. ARDL does not automatically test cointegration: no bounds test or automatic lag selection is included. Check integration orders (not I(2)), autocorrelation, structural breaks, and endogeneity before long-run or causal interpretation.

Consumption=PCEC96
Income=DSPIC96
Model=ARDL(Consumption,LIST(Income),2,2)
slide(Model)
EXTRACT(Model,"long_run")
Run example Full description

ARMA

Fit the existing explicit ARMA specification.

Full description

GMM

Estimate two-step linear instrumental-variable GMM with Newey-West HAC moment covariance and robust standard errors. Syntax GMM(y,LIST(x1,x2),LIST(z1,z2)[,hacLags]); optional nonnegative hacLags chooses Bartlett-kernel bandwidth; omitting it selects automatic floor(4*(n/100)^(2/9)); zero means heteroskedasticity-only. Dependent variable and all instruments/regressors are aligned by date, intercepts are included automatically. Returns an educational D3 slideshow via slide(model) and EXTRACT(model,slideshow). Extracts: summary, coefficients, diagnostics, j_test, fitted, residuals. For overidentified models, reports a HAC Hansen J statistic with chi-square p-value. Instrument relevance and exogeneity remain assumptions; HAC does not fix weak or invalid instruments. This is linear IV-GMM, not dynamic-panel or nonlinear GMM.

Y=UNRATE
X=FEDFUNDS
Z1=GS10
Z2=T10Y3M
Model=GMM(Y,LIST(X),LIST(Z1,Z2),12)
slide(Model)
EXTRACT(Model,"j_test")
Run example Full description

MONTE_CARLO

Construct the existing multivariate Monte Carlo operator.

Full description

SARIMA

Fit the existing explicit seasonal ARIMA specification.

Full description

SIMU_FORWARD

Accumulate simulated increments into level paths.

Full description

SIMU_MEAN

Return a simulation-summary mean path matrix.

Full description

SIMU_STD

Return a simulation-summary standard-deviation path matrix.

Full description

SIMU_SUMMARY

Run the existing simulation-summary engine.

Full description

STL

STL(series,period[,seasonalWindow[,trendWindow[,robust]]]) performs additive Seasonal-Trend decomposition using LOESS. Returns an extractable STLOperator with a slideshow of observed, trend, seasonal and remainder components, plus settings and diagnostics. Use period 12 for monthly annual seasonality, 4 for quarterly annual seasonality or 7 for complete daily weekly seasonality. Period counts observations, not elapsed years. Default seasonalWindow=7, automatic odd trend window and robust=0. Robust=1 reduces outlier influence. All observations must be finite, strictly date-ordered and regularly spaced; more than two complete cycles are required. No missing dates or values are silently dropped or interpolated. Extract trend, seasonal, remainder, adjusted, fitted and weights as ordinary dated series; also extracts seasonal_strength, trend_strength, reconstruction_error, summary and slideshow. Suitable for employment, production, temperature, river flow and ecological seasonal analysis. Use non-seasonally-adjusted inputs to study seasonality. For proportional seasonality, consider STL(LOG(positiveSeries),period). This is a descriptive single-season smoother, not MSTL or a forecast; historical components can revise.

Employment=SERIES_SINCE(PAYNSA,20000101)
D=STL(Employment,12,7,23,1)
D
Run example Full description

TWFE

Estimate static binary-treatment two-way fixed effects (TWFE) for panel policy evaluation: TWFE(outcomes,date1,date2,...,ARG(START_DATE,yyyymmdd),ARG(END_DATE,yyyymmdd)). outcomes is a DataList/LIST with the SAME outcome for different units (states, countries, firms); it is NOT a LIST of Y and explanatory X variables. Supply exactly one absorbing adoption date in YYYYMMDD per unit, in LIST order; use 0 for never treated. Sample-window ARG options are optional. The first observed date on or after adoption has D=1 permanently. Dates are intersected exactly without interpolation; nonfinite outcomes remove entire dates. Units must have matching frequency and outcome units. Fits Y_it=intercept+unitFE_i+dateFE_t+beta*D_it+error_it on the retained balanced panel, with equal cell weights. Reports unit-clustered CR1 SE, t(G-1) confidence interval/p-value, within R-squared, adoption status, residualized-treatment information concentration, and NEGATIVE treated-cell weight diagnostics. CR1 uses full dummy rank K=G+T. Returns an Extractable TWFEOperator whose default display/JSON is an educational D3 slideshow. Use slide(model), EXTRACT(model,slideshow), or individual extracts. Scalar extracts: effect/beta, se, p_value, within_r_squared, nobs, cluster_count, negative_weight_mass (absolute negative sum), negative_weight_share (negative/total absolute mass, fraction 0-1), negative_weight_fraction (negative/all treated cell count, fraction 0-1). Matrix extracts: ci [lower,upper]; coefficient_data [beta,se,t,p,lower,upper]; panel_data [unit_index_1based,date,outcome,D,fitted,residual,D_tilde,treatment_weight]. DataList extracts in input-unit order: actual, fitted, residuals, treatment, weights (D*D_tilde/sum(D_tilde²)), linear_weights (D_tilde/sum(D_tilde²) on all cells), residualized_treatment, residualized_outcome. HTML extracts: summary, coefficients, diagnostics, adoption, weight_summary, cohort_weights, unit_effects. Editable D3 charts: outcome_chart (raw cohort means), weight_chart (positive/negative/net treatment weights by calendar date), fit_chart (actual/fitted for first unit). time_effects returns centered date-FE series; json returns structured JSON text with labeled panel columns. TWFE() or TWFE(HETEROGENEOUS_DEMO) generates a reproducible synthetic panel where all effects are positive but beta is negative; TWFE(CONSTANT_DEMO) recovers +2 with the same design/weights. No network data required for demos. Negative weights can make beta differ in sign from every treatment effect; they do not by themselves prove bias. Causal interpretation requires parallel untreated trends, no anticipation and no spillovers. Unit clustering assumes independent units; few clusters or concentrated treatment information weaken inference. Static TWFE is NOT modern cohort-time ATT, imputation DiD, event-study leads/lags, generic covariate panel regression, or synthetic control. Use DID for a common-date two-group contrast; SSC is a distinct staggered synthetic-control alternative. No analytic/population weights, additional regressors, unbalanced-panel estimation, two-way clustering or wild-cluster bootstrap are implemented.

Aliases: TWO_WAY_FIXED_EFFECTS

Model=TWFE()
slide(Model)
Run example Full description

VAR_MODEL_DIFF

Chart the VAR shock-path difference.

Full description

VAR_MODEL_SHOCK

Chart the existing shocked VAR path.

Full description

VECM_MODEL

VECM_MODEL(levelsList,varLags,rank) estimates a Johansen reduced-rank VECM with unrestricted intercepts in change equations and no deterministic trend. Supply aligned levels or log levels, not pre-differenced inputs. varLags is the levels-VAR order: 12 means 11 lagged differences; 13 means 12. rank remains user supplied, from 1 through number of variables minus 1. Native diagnostics now include rank_test (Johansen trace/max-eigenvalue tests and 90/95/99% critical values for up to 12 variables), unit_root (ADF in input levels with constant and constant+trend, and first differences with constant; AIC lag selection, MacKinnon p-values), lag_selection (unrestricted levels-VAR AIC/BIC/HQIC/FPE on a common sample), autocorrelation (adjusted multivariate portmanteau) and stability (companion roots, allowing the expected k-r unit roots). These checks do not silently replace the fitted rank or lag. Scalar extracts trace_rank_5pct, maxeig_rank_5pct, aic_lag, bic_lag, whiteness_p, largest_transient_root, expected_unit_roots and observed_unit_roots allow programmatic inspection; selected ranks can be zero or full rank and must not be blindly fed back into this supplied-rank command. EXTRACT also supports slideshow, cointegration, adjustment, short_run, fitted, residuals, equilibrium_errors, eigenvalues and diagnostics. Optional extract keys unit_root:24, lag_selection:24 and autocorrelation:36 request diagnostic horizons; use colon-separated integer literals. Fitted values are first differences, not levels or forecasts. A successful fit does not establish cointegration, causal identification or structural stability.

Levels=SERIES_BETWEEN(SAME_DATE_RANGE(LOG(INDPRO),LOG(PAYEMS)),19750101,20191231)
EC=VECM_MODEL(Levels,13,1)
EXTRACT(EC,"slideshow")
Run example Full description

Distributions

BERNOULLI

Construct a one-trial binomial distribution.

Full description

CREATE_RANDOM

Sample a distribution into a matrix.

Full description

LOGNORMAL_DIST

Construct a lognormal distribution.

Full description

PARETO_DIST

Construct the existing Pareto distribution.

Full description

POISSON_DIST

Construct the existing Poisson distribution.

Full description

STUDENT_T_DIST

Construct the existing Student-t distribution.

Full description

Regression

BEST_BIC_COVID_REGRESSION

Search candidate regressors and return the selected regression.

r=BEST_BIC_COVID_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)),1)
EXTRACT(r,"model")
Run example Full description

LASSO_REGRESSION

LASSO_REGRESSION(LIST(Y,X1,...)[,lambda[,maxIterations[,tolerance]]]) fits Gaussian lasso by coordinate descent. Y is first; require >=1 predictor and >=3 common finite observations. Omit lambda for automatic expanding-window validation (minimum 30 observations); explicit lambda must be finite and >=0. Objective SSE/(2*n)+lambda*sum(abs(theta)); X is centered and scaled using sqrt(sum((X-mean)^2)/n); Y is centered but NOT scaled; intercept is unpenalized. Reported beta uses original units. Lambda is an absolute penalty in response units, not a percentage, p-value or number of selected variables. Default maxIterations=10000 (1..1000000), tolerance=1e-8 (0<tolerance<=0.01). Stop when maximum KKT violation <= tolerance*max(1,lambdaMax); fail clearly on nonconvergence. LambdaMax=max(abs(Z'*(Y-mean(Y))))/n is reported in summary; lambda>=lambdaMax gives zero slopes. Automatic mode: 5 expanding windows starting at half the sample; 30 log-spaced fractions of each training lambdaMax from 1 to .001 plus zero. Select lowest pooled validation MSE (exact ties prefer larger fraction), then apply winning fraction to full-sample lambdaMax and refit. All fold scaling uses training rows only. Validation uses observed predictors; no automatic forecast lags. Selection score is not an independent test score. Extract validation for the curve and validationtable for all grid scores. Explicit mode runs no search. Align once using getSameDateRange (may convert frequency); reject remaining nonfinite or nonmatching dates. Constant predictors get zero slopes. Collinear/p>=n lasso fits are allowed, but coefficient solutions may be nonunique. Default output is an educational D3 slideshow. EXTRACT keys: model (HTML coefficients, no OLS p-values), summary (training metrics, lambdaMax, convergence), beta (intercept then original-order slopes), standardizedbeta (predictor theta only, no intercept), selected (retained coefficient HTML), data, selecteddata (Y first, may be Y alone), fitted, residuals, actual_vs_fitted, autocorrelation, slideshow, regression (optional full baseline OLS), refit (optional post-selection OLS). OLS extracts may return an error if singular or no predictors remain. Refit is NOT lasso; its inference ignores selection, including HAC. Lasso does not correct serial correlation, establish causality or test significance. Sine/cosine are penalized individually, not as groups.

housing=LOGDIFF(HOUSTNSA)
permits=LOGDIFF(PERMITNSA)
fit=LASSO_REGRESSION(LIST(housing,permits))
fit
Run example Full description

LOCAL_PROJECTION

LOCAL_PROJECTION(LIST(Y,shock[,controls...])[,horizon[,lags]]) estimates horizon-wise responses to one unit of a supplied shock. Defaults: horizon 12, lags 1. All list members enter as lag controls. Output is an impulse chart with pointwise 95% Bartlett HAC bands. Extract impulse, model, response, se, lower, upper or slideshow.

housing=LOGDIFF(HOUSTNSA)
permits=LOGDIFF(PERMITNSA)
lp=LOCAL_PROJECTION(LIST(housing,permits),24,2)
lp
Run example Full description

LOGIT

Estimate a binary logistic regression for a 0/1 outcome and predictor series using maximum likelihood. Return a D3 presentation with estimated coefficients, standard errors, classification accuracy, and fitted event probabilities. Use LOGIT for recession indicators, defaults, policy events, and other binary outcomes; use PROBIT when a standard-normal latent-response link is preferred. Syntax: LOGIT(outcome,LIST(X1,X2)). Extract fitted probabilities with EXTRACT(model,fitted) and the observed outcome with EXTRACT(model,series).

model=LOGIT(outcome,LIST(X1,X2))
probabilities=EXTRACT(model,fitted)
Run example Full description

SEASONAL_REGRESSION

SEASONAL_REGRESSION(LIST(Y,X1,...)[,period[,harmonics]]) compares baseline OLS with OLS augmented by dated sine/cosine pairs, using the same aligned sample. Returns an educational comparison slideshow by default. First series is Y. Default annual period: monthly 12, quarterly 4, weekly 365.2425/7, daily or unknown 365.2425 days. Annual data require an explicit multiyear period. Harmonics default 1, range 1..20; period > 2*harmonics. Alignment uses getSameDateRange and may change frequency; period units follow aligned Y. EXTRACT keys: regression (baseline RegressionOperator), seasonalregression (augmented RegressionOperator), comparison or summarytable (HTML beta comparison), summary (fit metrics and interpretation), harmonicAnalysis:N (fixed-period OLS and each harmonic count through N), slideshow, data (baseline list), seasonaldata (augmented list). Extract a regression first to access its model, hac, fitted, residuals or autocorrelation. Beta differences are descriptive, not tests. Higher R-squared is expected for nested OLS; compare adjusted R-squared, AIC/BIC and residual diagnostics. DW movement is descriptive, not a test that seasonal terms caused autocorrelation. No causal claim or automatic model selection. Spectrum mode: SEASONAL_REGRESSION(list,"spectrum"[,maxCycles=4]); compares K=0..4 by residual Welch peaks, full-fit DW/ACF and expanding-window RMSE with observed X. Requires at least 64 regular observations. Extract summary, coefficients, validation, periods, model:K or acf:K.

Housing=SERIES_BETWEEN(LIST(HOUSTNSA,PERMITNSA),20000101,20241231)
Fit=SEASONAL_REGRESSION(Housing,"spectrum",4)
Run example Full description

TVP_REGRESSION

TVP_REGRESSION(LIST(Y,X1,...,X8)[,focusIndex=1]) fits a joint Bayesian regression with random-walk coefficients. One response, 1 to 8 predictors. Focus 1 refers to X1. Compares varying vs constant focus slope by conditional log Bayes factor over four prior scales; the intercept and other slopes may vary under both hypotheses. Discrete variance-ratio priors are summed directly. X is standardized on the initial max(20,3*(predictors+1)) training rows. Require at least 10 additional rows and at most 4000 total. Align via getSameDateRange; require matching increasing dates and finite values. One transition per observation, including across calendar gaps. Default slideshow. EXTRACT beta returns all original-unit smoothed coefficient series. beta:J, chart:J, lower:J, upper:J select a coefficient (0=intercept, 1=X1,...). Other keys: evidence, summary, actual_vs_fitted, fitted, residuals, data, slideshow. Pointwise 90% credible limits condition on the varying model at prior mean 0.01. Smoothed fits use future observations.

Data=SERIES_BETWEEN(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),UNRATE),20000101,20241231)
Fit=TVP_REGRESSION(Data,2)
Evidence=EXTRACT(Fit,"evidence")
Run example Full description

Statistics

BETA

Return the existing beta matrix for a series list.

Full description

FORWARD_FROM_DENSITY

Compute forward/mean from a density grid.

Full description

KDE

KDE(series[,bandwidth]) estimates an unweighted Gaussian kernel density from finite observations without choosing a Normal, Gamma or Exponential family. Use for exploratory distributions, skew, multimodality, tail probabilities and simulated draws. Returns an extractable KDEOperator with a default three-slide presentation: normalized histogram with KDE and Normal comparison, KDE CDF, and settings/diagnostics. Optional bandwidth is a positive number in the input's units; omitted bandwidth uses a robust Silverman rule. Extract pdf:x, cdf:x, quantile:p or samples:n:seed for numerical evaluation and reproducible Gaussian-mixture sampling. Also extracts bandwidth, n, dropped, mean, stddev, sample_stddev, median, density, cdf, matrix, summary and slideshow. Nonfinite observations are dropped and counted. Unlike FIT_DIST(series,"CURVE"), this estimates a nonparametric density. Gaussian kernels have unbounded support, no boundary correction, and ignore date ordering. This is a descriptive marginal distribution, not an FFT risk-neutral model or an automatically valid forecast.

Changes=LOGDIFF(SERIES_SINCE(DEXJPUS,20200101))
D=KDE(Changes)
D
Run example Full description

KURTOSIS_FROM_DENSITY

Compute kurtosis from a density grid.

Full description

MEAN_FROM_DENSITY

Compute mean from a density grid.

Full description

MEDIAN

Return the series median.

Full description

NORMAL_TEST

Open the existing normal-distribution test object.

Full description

SKEW_FROM_DENSITY

Compute skewness from a density grid.

Full description

SPECTRAL_ARIMA

Discover an ARIMA/SARIMA or sequential harmonic-plus-ARIMA model using spectral peaks, a differencing screen, ACF/PACF proposals, conditional CSS-AICc and held-out level forecast RMSE. SPECTRAL_ARIMA(series[,period[,maxModels[,horizon]]]); period=0 detects a period, maxModels defaults to 24 (range 4..64), horizon defaults to 12. Uses existing FFTWrapper-backed SpectralAnalysis with a dedicated shared-parameter segmented CSS fitter. Sequential 60-second discovery budget checked during objective evaluation; final refit is additional. Dates are checked: retain all finite observations in explicit contiguous blocks; reset AR/MA and differencing at each gap. Report per-block initialization losses; never compress time or interpolate measurements. Long periods use calendar Fourier terms (K=1 or 2) plus short ARIMA errors. Short periods also test seasonal AR, MA and seasonal differencing. AICc is approximate CSS screening and compared only within identical differencing/seasonality/harmonic families; family winners use a common validation interval. Extract spectrum, candidates, search/coverage, education/notes, model, actual/data, fitted, residuals, forecast (numeric points), forecast_chart (previous 12 observations plus shaded ±1 forecast-error SD), forecast_sd, forecast_lower, forecast_upper, actualvsfitted, autocorrelation and slideshow. Residual lag pairs never cross gaps; pooled portmanteau/PACF diagnostics are explicitly approximate. Educational reference: Box-Jenkins, Time Series Analysis: Forecasting and Control; explains identification, estimation and diagnostic checking. A spectral peak does not uniquely identify ARIMA orders or justify differencing. Residual diagnostics and out-of-sample review remain necessary; no speedup guarantee, no causal interpretation.

water=NDBC("42040","WTMP",2000,2025)
model=SPECTRAL_ARIMA(water)
EXTRACT(model,"slideshow")
Run example Full description

STD_FROM_DENSITY

Compute standard deviation from a density grid.

Full description

VARIANCE_FROM_DENSITY

Compute variance from a density grid.

Full description

Finance

BID_ANALYZER

Open the existing bid analyzer model.

BID_ANALYZER()
Run example Full description

CAPITAL_STOCK

Calculate the existing capital-stock series.

CAPITAL_STOCK(INDPRO,0.06)
Run example Full description

CORP_BOND_DURATION

Transform yield observations using the existing corp bond duration calculation.

CORP_BOND_DURATION(DGS10,10)
Run example Full description

CORP_ZERO

Transform yield observations using the existing corp zero calculation.

CORP_ZERO(DGS10,10)
Run example Full description

DEFEASANCE_MODEL

Open the existing defeasance model model.

DEFEASANCE_MODEL()
Run example Full description

EUROPEAN_FFT

Price European options using the existing characteristic-function FFT model.

CF=SYM(EXP(i*U*((R-0.5*SIG^2)*T)-0.5*SIG^2*U^2*T))
F=EUROPEAN_FFT(CF,S0,100,R,0.03,T,1,ALPHA,1.5,N,4096,ETA,0.25,SIG,0.2,CF_RETURN,1)
EXTRACT(F,"diagnostics")
SLIDE(F)
Run example Full description

FORWARD_SERIES

Calculate a historical series of outright forward prices for a fixed maturity from spot prices, annual financing rates and income yields using simple net carry: F(t,T) = S(t) * (1 + (r(t) - y(t)) * days(t,T)/365.25). Each rate independently accepts a constant decimal or a time series; percent-marked series are converted automatically. Supports forward-pricing, cost-of-carry and financing-versus-income scenario analysis. Returns a price series, not forward points, a forecast or a term structure. Syntax: FORWARD_SERIES(spotSeries,startDate,maturityDate,financingRate,yieldRate).

Aliases: FORW_SERIES

FORWARD_SERIES(DEXJPUS,20050101,20050315,IR3TIB01JPM156N,IR3TIB01USM156N)
Run example Full description

FWD_FROM_CURVE

Calculate a continuously compounded forward rate from a saved curve matrix.

C=ZCB_VASICEK_CURVE(R0,0.03,TMIN,1,TMAX,10,N,10)
EVAL(FWD_FROM_CURVE(C,T1,2,T2,5))
Run example Full description

KKT_PORTFOLIO

Construct the editable constrained-portfolio model.

KKT_PORTFOLIO(LIST(US_ZERO(DGS10,10),US_ZERO(DGS2,2)))
Run example Full description

MERTON_IMPLIED_VOL

Infer annualized firm asset, equity and debt return volatility from leverage and a bond spread.

MERTON_IMPLIED_VOL(0.50,10,4.428,80)
Run example Full description

OPTION_DELTA_SERIES

OPTION_DELTA_SERIES(Series,start,end,strike,vol,rate,yield,type): Calculate a historical European option delta series, the sensitivity of option premium to a unit change in underlying price. Strike and expiry end are fixed; remaining time decreases at each underlying observation. Volatility, interest rate and yield each accept a decimal number or independently percent-scaled series. Returns a normal series for charts, differences, hedging analysis and multi-leg strategy arithmetic. Type is CALL or PUT. Supports zero volatility and expiry. European exercise only; values are theoretical, per unit of underlying.

OPTION_DELTA_SERIES(DEXJPUS,20050101,20050315,105,0.10,IR3TIB01JPM156N,IR3TIB01USM156N,"CALL")
Run example Full description

OPTION_MODELER

Open the existing option modeler model.

OPTION_MODELER()
Run example Full description

OPTION_PRICER

Open the existing option pricer model.

OPTION_PRICER()
Run example Full description

OPTION_SERIES

OPTION_SERIES(Series,start,end,strike,vol,rate,yield,type): Calculate a historical European call or put premium series using Black-Scholes with continuous yield (Garman-Kohlhagen for currency options). Strike and expiry end are fixed; remaining time decreases at each underlying observation. Volatility, interest rate and yield each accept a decimal number or independently percent-scaled series. Returns a normal series for charts, differences, hedging analysis and multi-leg strategy arithmetic. Type is CALL or PUT. Supports zero volatility and expiry. European exercise only; values are theoretical, per unit of underlying.

OPTION_SERIES(DEXJPUS,20050101,20050315,105,0.10,IR3TIB01JPM156N,IR3TIB01USM156N,"CALL")
Run example Full description

REAL_RATES_DEBT_GDP

Compare general-government gross debt/GDP with inflation-adjusted ten-year sovereign yields for thirteen countries, including the United States. Returns a slideshow with linear and quadratic regressions including and excluding Japan, nominal-yield comparisons, data coverage, and a separate ECB headline-HICP sensitivity check. Default snapshot: 2023. Real rates are trailing-headline-inflation yield proxies, not real policy rates, inflation-linked bond yields, or expected ten-year real yields. Syntax: REAL_RATES_DEBT_GDP().

REAL_RATES_DEBT_GDP()
Run example Full description

SOLVE_STRIKE

SOLVE_STRIKE(fftModel,longStrike,longQuantity,shortQuantity,targetPremium,type) requires a pricing model built by EUROPEAN_FFT; first consult DESCRIBE_COMMAND("EUROPEAN_FFT") for its construction and supported models. Selects a European option short-leg strike from that FFT pricing grid so longQuantity*price(longStrike)-shortQuantity*price(shortStrike)=targetPremium. Use target 0 for an even-premium or zero-upfront-premium ratio spread, a positive target for a debit or a negative target for a credit. CALL and PUT are supported; both legs have the same type, expiry and pricing model. Optional minStrike,maxStrike restrict the search. Returns a trade result displayed as a compact three-slide slideshow: trade/premiums, expiry P/L chart, premium verification. Use EXTRACT(result,"strike") to obtain the numeric short strike for OPTION_SERIES or OPTION_DELTA_SERIES. Uses linear strike-grid interpolation, verifies the achieved premium, and rejects extrapolation, invalid grids and nonunique targets. Supports strike selection for put/call ratio spreads and same-type verticals; does not price mixed-type collars or solve multiple butterfly wings. COMPLETE MODEL CONSTRUCTION FOR MCP: create CF=SYM(EXP(i*U*(R-Q-0.5*SIG^2)*T-0.5*SIG^2*U^2*T)), then F=EUROPEAN_FFT(CF,S0,100,R,0.03,Q,0.01,T,1,ALPHA,1.5,N,16384,ETA,0.25,SIG,0.20,CF_RETURN,1). Pass F as fftModel, for example SOLVE_STRIKE(F,100*EXP(0.02),1,2,0,"PUT"). S0 is spot, R the quote-currency rate, Q the income yield or FX base-currency rate, T remaining years, SIG annualized volatility; rates and volatility are decimals. N must be a power of two; CF_RETURN=1 means log-return CF. For other distributions, construct the appropriate symbolic CF and parameters through EUROPEAN_FFT, then pass its original result to this solver.

CF=SYM(EXP(i*U*(R-Q-0.5*SIG^2)*T-0.5*SIG^2*U^2*T))
F=EUROPEAN_FFT(CF,S0,156.72,R,0.011199964516129033,Q,0.03630967741935484,T,152/365.25,ALPHA,1.5,N,16384,ETA,0.25,SIG,0.10,CF_RETURN,1)
S=SOLVE_STRIKE(F,155.09088241574716,1,2,0,"PUT")
S
Run example Full description

SPECTRAL_BARRIERS

Open the existing spectral barriers model.

SPECTRAL_BARRIERS()
Run example Full description

STRUCTURED_PRODUCT_DEVELOPER

Open the existing structured product developer model.

STRUCTURED_PRODUCT_DEVELOPER()
Run example Full description

US_CONVERTIBLE_BOND_PRICER

Open the existing us convertible bond pricer model.

US_CONVERTIBLE_BOND_PRICER()
Run example Full description

US_CORPORATE_BOND_PRICER

Open the existing us corporate bond pricer model.

US_CORPORATE_BOND_PRICER()
Run example Full description

US_GOVT_BOND_PRICER

Open the existing us govt bond pricer model.

US_GOVT_BOND_PRICER()
Run example Full description

ZCB_CIR

Calculate a model zero-coupon discount factor.

ZCB_CIR(R0,0.03,KAPPA,0.5,THETA,0.04,SIG,0.01,T,5)
Run example Full description

ZCB_VASICEK

Calculate a model zero-coupon discount factor.

ZCB_VASICEK(R0,0.03,KAPPA,0.5,THETA,0.04,SIG,0.01,T,5)
Run example Full description

ZCB_VASICEK_CURVE

Build a model term structure.

ZCB_VASICEK_CURVE(R0,0.03,TMIN,1,TMAX,10,N,10)
Run example Full description

Matrix

CHOLESKEY

Compute the existing Cholesky factorization.

Full description

COMBINE_MATRIX

Merge numeric matrices by columns.

Full description

CREATEMATRIX

Create an editable numeric matrix.

Full description

CUM_COL

Compute cumulative sums down a selected column.

Full description

GET_COL

Extract one matrix column.

Full description

GET_ROW

Extract one matrix row.

Full description

INTERP_COL

Interpolate one matrix column onto another matrix’s x values.

Full description

SET_COL_NAMES

Return a copy with column names.

Full description

UPDATEMATRIX

Update a matrix through EditableUpdater.

Full description

UPDATE_OBJECT_MATRIX

Update an object matrix through ObjectMatrixUpdater.

Full description

General

CONFIGURE

Configure a supported object.

Aliases: CONFIG

Full description

DESCRIBE_COMMAND

Look up the current syntax, examples, extracts and documentation of a registered RainbowStats command, including aliases.

DESCRIBE_COMMAND("SPECTRUM")
Run example Full description

MCP_VERSION

Check the live RainbowStats MCP server version, discovery instructions, tool metadata, UI resource and local command registration.

MCP_VERSION()
Run example Full description

OPERATOR

OPERATOR() returns a styled HTML reference in a D3HtmlOperator for RainbowStats arithmetic, series transformations, statistics and EXTRACT capabilities. Consult this reference before writing ratios, percentages, spreads, scaling or arithmetic involving a DataList. Use native expressions directly; there is no need to find a separate arithmetic command for each calculation. Series A supports A+B, A-B, A*B, A/B and A%B with either a series or a numeric scalar B on the right. These operations return a Series. % means percent of, not remainder/modulo or percentage change: numerator % denominator expresses the numerator as a percentage of the denominator. / is division. RainbowStats handles series units/scaling internally; do not add guessed unit multipliers. Use % for a percentage rather than automatically multiplying a ratio by 100. For DataList L, put L FIRST (on the LEFT): L+n, L-n, L*n, L/n, L%n and L+S, L-S, L*S, L/S, L%S apply the operation separately to every member series, returning a DataList. A right-hand series is applied to every member. Do not reverse these to n+L, n*L, S+L or S*L even for commutative arithmetic; SeriesOperator does not implement a DataList right operand. Series-first scalar arithmetic is also the form verified by this reference. L/R supports two equally sized DataLists: member i of L is divided by member i of R, in LIST ORDER, not matched by country, code or name. Check order first. DataList+DataList, DataList-DataList, DataList*DataList and DataList%DataList are not implemented by the supplied DataListOperator. For pairwise percentages of two lists, first verify matching order and size, then use (L/R)*100, taking account of the units of the resulting ratios. Do not infer unsupported types. Series and DataList also implement log, exp, diff, logdiff, lag, last N, sin, cos, tanh, base increase, mean, standard deviation, skewness, excess kurtosis and covariance. Series additionally implements abs, numeric power, sqrt and correlation. Series statistics return numbers; DataList mean/stddev/skewness/ kurtosis return one-column matrices, one row per member. DataList covariance returns its own covariance matrix. Discover the registered transformation command names/signatures before invoking them; Java method names are not DSL syntax. EXTRACT(A,"summary"|"arima"|"cumulative"|"logdiff"|"diff"|"logistic"|"epicycle") accesses a Series. The | notation lists alternatives; pass ONE quoted key. EXTRACT(L,"summary"|"linechart"|"barchart"|"animatedbarchart"|"lastbarchart"| "daily"|"weekly"|"monthly"|"quarterly"|"annual"|"percent") accesses a DataList. Frequency extraction FILTERS members by frequency; it does not resample them. The percent extraction filters percentage-unit series; it does not calculate shares. Other DataList keys: "series:0" (zero-based), "removeseries:0", "setfirst:0", "units:text" (or "unit:text"), "namecontains:text", "endswith:text", "binary_split:y:x" (zero-based y and x indices), or a member series code. Do not use the advertised but unimplemented fredcode key. The supplied DataList slideshow extraction falls through to barchart; use explicit chart keys. Example expressions, where A and B are series and L and R are DataLists: Spread=A-B; Ratio=A/B; Share=A%B; Scaled=A/1000; Adjusted=L-A; Shares=L%A; PairwiseRatios=L/R; EXTRACT(Shares,"lastbarchart"). Use parentheses to make compound formulas explicit. For economic interpretation, check compatible units, frequencies and observation dates; arithmetic is not a substitute for deliberate frequency conversion or missing-data alignment.

Full description

SEARCH_COMMAND

Find registered RainbowStats commands by task, keyword, capability, example, or extract key.

Aliases: SEARCH_COMMANDS

SEARCH_COMMAND("spectral seasonality")
Run example Full description

Analysis

ANCOVA

Compare adjusted group means and test equality of slopes on complete CSV rows. X and Y must be numeric.

Aliases: ANCOA

Cats=CROSS_SECTION("https://cran.r-universe.dev/MASS/data/cats/csv")
Fit=ANCOVA(Cats,"Hwt","Bwt","Sex")
Run example Full description

CROSS_SECTION

Build a cross section from dated series or a quoted HTTPS CSV URL.

Full description

CROSS_SECTION_STUDY_LIST

CS_STUDIES([source]) lists dataset slideshows, analyses and research credits by collection. Filter by collection name or CSV host.

Aliases: CROSS_SECTION_STURY_LIST, CS_STUDIES

Full description

DUAL_SERIES_ANALYSIS

Construct the existing two-series analysis object.

Full description

EPICYCLE_LINE_CHART

Draw a DataList as approximate Fourier lines, retaining up to 128 components per series by default.

Full description

INSPECT

Open the inspector for a named object that supports inspection.

INSPECT(C)
Run example Full description

MANN_KENDALL

Tie-corrected Mann–Kendall trend test and exact Sen slope per calendar year. Uses 3 to 3000 unique dated observations.

Trend=MANN_KENDALL(UNRATE)
Run example Full description

MULTI_SERIES_ANALYSIS

Construct the existing multiseries analysis object.

Full description

SERIES_ANALYSIS

Construct the existing single-series analysis object.

Full description

SERIES_SIMULATOR

Construct the existing series-simulation object.

Full description

STATE_PCA_EFFECTS

Append state PCA loading coordinates to a county cross section.

Full description

Symbolic

DERIV

Differentiate a symbolic expression.

Full description

EVAL

Evaluate a symbolic expression with real values.

Full description

EVALC

Evaluate a symbolic expression with complex values.

Full description

INTEGRAL

Compute a definite integral using Simpson integration.

Full description

INTEGRATE

Find a symbolic antiderivative.

Full description

SYM_LATEX

Return symbolic mathematics as display LaTeX.

Full description

Math

COS

Apply cosine to a number in radians, or to standardized values of a series or each series in a list. Series results are bounded from -1 to 1 and labeled Index.

COS(1)
x = DIFF(SERIES_SINCE(UNRATE,20010101))
LINE_CHART(COS(x))
LINE_CHART(COS(LIST(x,DIFF(SERIES_SINCE(U6RATE,20010101)))))
Run example Full description

GAMMA

Evaluate the mathematical gamma function for a supported input.

GAMMA(5)
Run example Full description

POW

Raise a supported operator value to a power.

Full description

SIN

Apply sine to a number in radians, or to standardized values of a series or each series in a list. Series results are bounded from -1 to 1 and labeled Index.

SIN(1)
x = DIFF(SERIES_SINCE(UNRATE,20010101))
LINE_CHART(SIN(x))
LINE_CHART(SIN(LIST(x,DIFF(SERIES_SINCE(U6RATE,20010101)))))
Run example Full description

SQRT

Calculate the square root of each value.

x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(SQRT(x))
Run example Full description

TANH

Apply hyperbolic tangent directly to a number, or to standardized observations of a series or each series in a list. Creates bounded nonlinear features, compresses extremes, and preserves ordering. Series results use Index units.

TANH(1)
x = DIFF(SERIES_SINCE(UNRATE,20010101))
LINE_CHART(TANH(x))
LINE_CHART(TANH(LIST(x,DIFF(SERIES_SINCE(U6RATE,20010101)))))
Run example Full description

Administration

LIST_SCENARIOS

List stored scenario files.

Full description

VIEW_SCENARIO

Read a stored scenario.

Full description

Ecology

GEO_LOCATION

Create a reusable geographic location object from latitude and longitude, optionally elevation in meters and an IANA time zone. Use it with SOLAR to derive daylight duration, sunrise, sunset, solar noon, solar declination, solar elevation and extraterrestrial radiation for the dates of an existing economic, environmental or ecological time series. Useful in photoperiod, salmon migration, hydrology, agriculture, climate and solar-energy research.

location = GEO_LOCATION(47.6062,-122.3321,50,"America/Los_Angeles")
Run example Full description

SOLAR

Compute date-aligned astronomical solar variables at any geographic location using the observation dates of an existing time series. Extract DAYLIGHT, SUNRISE, SUNSET, SOLAR_NOON, DECLINATION, MAX_ELEVATION and RADIATION. Supports research on photoperiod and salmon migration, water temperature, seasonal biology, agriculture, hydrology, climate, evaporation and solar-energy potential. No external API or weather station is needed. RADIATION is extraterrestrial solar energy, not measured surface sunlight.

salmon = DART("BON","CHINOOK")
location = GEO_LOCATION(45.64436,-121.94075,24,"America/Los_Angeles")
solar = SOLAR(salmon,location)
daylight = EXTRACT(solar,"DAYLIGHT")
radiation = EXTRACT(solar,"RADIATION")
Run example Full description

Other

FIT_SOLAR_ELLIPSE

FIT_SOLAR_ELLIPSE(response,location[,bootstrap]) or FIT_SOLAR_ELLIPSE(response,solarSeries[,bootstrap]) returns an Extractable SolarEllipseObject in ecostats. Fits each coordinate against an intercept and annual calendar cosine/sine (365.2425 elapsed days), producing a time-ordered seasonal ellipse rather than an OLS line or covariance confidence ellipse. location is a GeoLocationOperator: calculate extraterrestrial radiation on response dates. An explicit solarSeries is matched by exact timestamps with no interpolation or frequency conversion; UTC calendar is used. FIT_SOLAR_ELLIPSE(response) attempts EXTRACT(response,geolocation), suitable for native NDBC series when preserved by the dispatcher. Reports means, amplitudes, signed wrapped phase delay in days (positive=response follows solar), amplitude ratio, in-sample R-squared/RMSE, standardized axes, rotation, eccentricity, foci, area and direction. Geometry is centered on fitted means and scaled by observed paired-sample standard deviations; axes/foci depend on this metric and are not physical orbit parameters. Default bootstrap=199, range 0..499; approximate whole-calendar-year cluster percentile intervals require at least five well-covered years. Assumes exchangeable years; no causal inference or forecast validation. Minimum 60 finite pairs, 1.5 years of span and ten represented months; strictly increasing dates, at most one observation per calendar day; maximum 100000 input observations and 10 million pair-replicates. Extract model/summary, scatter/scatterfit (native D3 observed points with fitted loop in original units), ellipse/chart, geometry/foci, animation, svg, yearly, intervals, diagnostics/coverage, education/notes, actual/data, solar, fitted, solar_fitted, residuals, actualvsfitted, delay_days, amplitude_ratio, response_amplitude, solar_amplitude, slideshow. Animation is a self-contained SVG annual fitted trajectory with month readouts and an animated SVG download link; daylight is shown when location is supplied. Location-only extracts daylight (hours), daylight_change (signed minutes/day from a centred one-day finite difference), declination and max_elevation (degrees) reuse SolarOperator.calculate; negative daylight_change means losing daylight. Residuals are dated response minus its harmonic fit, suitable for SPECTRAL_ARIMA. Additional harmonics, trend and changing response are not fitted. Solar radiation here is potential extraterrestrial energy, not measured surface sunlight.

water=NDBC("42040","WTMP",2000,2025)
location=EXTRACT(NDBC_META("42040"),"geolocation")
loop=FIT_SOLAR_ELLIPSE(water,location)
EXTRACT(loop,"slideshow")
Run example Full description

NDBC

NDBC means NOAA National Data Buoy Center. Retrieve marine buoy and coastal station observations as a native daily numeric time series. NDBC(station,variable[,startYear,endYear[,minSamples]]) supports water temperature WTMP, air temperature ATMP, wind speed WSPD, wind direction WDIR, gust GST, significant wave height WVHT, wave periods DPD/APD, mean wave direction MWD, pressure PRES, dew point DEWP, visibility VIS, pressure tendency PTDY and water level TIDE when reported. EXTRACT(result,GEOLOCATION) returns a GeoLocationOperator for SOLAR(result,location), using catalogue coordinates with UTC and zero-meter defaults. Use NDBC_SEARCH to find station IDs and NDBC_META for station details. Historical files are saved by requested station and year and stitched into long series. Dates are UTC; daily means are sample-weighted; directions use circular means; missing values and days are omitted. Default years: 2000 through today. Use EXTRACT(result,coverage) to inspect missing days, archive availability, warnings and sources before modeling; EXTRACT(result,data) gives daily values and sample counts; raw gives original timestamps. Ecological uses include seasonal ocean warming, thermal exposure, storm cooling, coastal habitat conditions and lagged relationships with fish returns. Buoy measurements do not directly establish harmful blooms, oxygen depletion or ecological causation. Remove seasonality before interpreting unusual warmth as a marine heatwave. Alias NOAA_BUOY.

Aliases: NOAA_BUOY

water=NDBC("42040","WTMP",2000,2025)
water
Run example Full description

NDBC_META

Describe a NOAA National Data Buoy Center (NDBC) station by ID: station name, coordinates/location, owner, platform type and operational notes, with a link to NOAA's station history. NDBC_META(station) uses the station catalogue; it does not infer sensor depths, exact available variables, period of record or continuous coverage. Check NOAA history and EXTRACT(NDBC(...),coverage) for those questions. Useful before ecological temperature, storm and fisheries analysis. Results implement Extractable. EXTRACT(result,geolocation:n) returns a GeoLocationOperator for zero-based displayed row n, usable by SOLAR. EXTRACT(result,station_id:n) returns a station ID usable by NDBC. Other row extracts: name, latitude, longitude, owner, type, hull, payload, timezone, notes, location_text, history_url and station_url, with :n appended. Unindexed row keys require exactly one match; no silent first-match selection. count returns row count; table returns the display. geolocations and station_ids return ordered extractable collections; EXTRACT(collection,0) retrieves the first item. Collections are not numeric DataLists. Catalogue coordinates are not historical positions. Geolocation defaults elevation to zero and timezone to UTC; timezone extract preserves the original NOAA code. Missing coordinates raise a descriptive error without dropping rows.

Aliases: NOAA_BUOY_META

NDBC_META("42040")
Run example Full description

NDBC_SEARCH

Search NOAA National Data Buoy Center (NDBC) station catalogue by station ID, name, location, owner, type or notes. NDBC_SEARCH(query) returns an Extractable station-results operator with a readable station table, history links and example NDBC calls. Case-insensitive; all query words must match. Use location names or state abbreviations such as Cape Elizabeth, WA, or Dauphin Island; state names are not automatically translated to abbreviations. Search downloads only the small station catalogue, not observation data for the network. Inactive and historical stations may appear. A match does not guarantee current operation, temperature observations, or complete history. Use NDBC_META and NDBC, then inspect EXTRACT(result,coverage). Results implement Extractable. EXTRACT(result,geolocation:n) returns a GeoLocationOperator for zero-based displayed row n, usable by SOLAR. EXTRACT(result,station_id:n) returns a station ID usable by NDBC. Other row extracts: name, latitude, longitude, owner, type, hull, payload, timezone, notes, location_text, history_url and station_url, with :n appended. Unindexed row keys require exactly one match; no silent first-match selection. count returns row count; table returns the display. geolocations and station_ids return ordered extractable collections; EXTRACT(collection,0) retrieves the first item. Collections are not numeric DataLists. Catalogue coordinates are not historical positions. Geolocation defaults elevation to zero and timezone to UTC; timezone extract preserves the original NOAA code. Missing coordinates raise a descriptive error without dropping rows.

Aliases: NOAA_BUOY_SEARCH

NDBC_SEARCH("Cape Elizabeth")
Run example Full description

WORLD_GDP

WORLD_GDP(indicator,year[,fit,xScale,yScale]) returns one country scatter chart comparing a World Bank WDI outcome with GDP per capita, PPP (constant 2021 international dollars). Arguments resolve through the command tool: quoted strings, numeric expressions and assigned variables are supported. Defaults: fit=log, xScale=log, yScale=linear. Fits: log means Y=a+b*ln(GDP); linear means Y=a+b*GDP; loglog means ln(Y)=a+b*ln(GDP); none omits the fit. X and Y display scales independently accept log or linear; changing display scale does not change the model. Exact-year ISO3 country alignment, no aggregates, interpolation or carry-forward. Missing/nonfinite pairs and nonpositive GDP are excluded; logarithmic outcomes also exclude nonpositive Y. Chart includes regression equation, R squared, sample size, country hover values and World Bank attribution. Unweighted OLS is descriptive, not causal. For loglog, R squared/residuals are in log-outcome units. EXTRACT keys: chart, regression, model, summary, data, residuals, outliers, source, sources, metadata, license. Use WORLD_BANK_SEARCH to find outcome codes. Suitable for markets JSON command fields; no time-window placeholder is needed.

Aliases: WORLD_BANK_CHART_GDP

WORLD_GDP("SP.DYN.LE00.IN",2023)
Run example Full description