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=DCOILWTICODescriptions, aliases, examples and available result extracts.
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=DCOILWTICOSubmit the current command to your workspace. Pressing Enter performs the same action. Submitted commands appear below the toolbar.
Review and modify your script or scenario. After making changes, re-run the scenario.
Save your scenario locally (browser storage). It will be available when you return. The server does not store this data.
Load a previously saved scenario.
Generate a shareable link that reproduces your current scenario.
Import a scenario into your workspace.
Expand or contract the viewing panel.
Display the raw server response for detailed inspection.
Analyze the current table or HTML output using ChatGPT.
Copy the current viewing panel to the clipboard.
Copy a compact version of the viewing panel.
Open the command reference panel.
Ability to Save Scripts to your file
Save a Study - will prompt for a name
Delete a Current Study
Clear the current tool equation map.
Full descriptionSearch for CFTC data
CFTC_TFF_SEARCH("yen")Run example Get CFTC data
YenPosition=CFTC_TFF("097741","LEV_MONEY_NET","FUTURES_ONLY")Run example Align lists by county FIPS identifiers.
Full descriptionAlign lists by U.S. state identifiers.
Full descriptionBuild the server’s occupational earnings comparison by sex.
G=BLS_GENDER(2024,50)
EXTRACT(G,"comparison")Run example Full descriptionReturn the installed ECB favorites catalog.
Aliases: ECBFAVORITES
Return the installed ESTAT favorites catalog.
Aliases: ESTATFAVORITES
Collect extractable result objects.
Full descriptionLoad a series through the FRED-QD integration.
Full descriptionConstruct a series list.
Full descriptionSelect a date interval from a series list.
Full descriptionSelect observations from a date onward.
Aliases: SERIES_SINCE, SINCE
Run the server’s BLS occupation loop.
LOOP_BLS_OCCUPATIONS(2024,50)Run example Full descriptionRead a named time series from a supported JSON file.
Aliases: JSON_SERIES, READJSON, READJSONSERIES
Remove a series from a list.
Full descriptionSAME_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)
AlignedRun example Full descriptionLoad a column through the generic Socrata integration.
Full descriptionLoad a daily series from a Socrata dataset.
Full descriptionInspect Socrata dataset metadata.
Full descriptionSearch Socrata datasets.
Full descriptionAdd policy annotations or a single chart annotation.
Aliases: ANNOTATE
ADD_ANNOTATION(LINE_CHART(UNRATE),20200301,"March 2020")Run example Full descriptionAnnotate an explicit date and y value.
Aliases: DATE_ANNOTATE
ADD_DATE_ANNOTATION(LINE_CHART(UNRATE),20200401,14.8,"April 2020")Run example Full descriptionAdd an explicitly numeric x-axis marker.
ADD_NUMERIC_XMARKER(SCATTER_PLOT(UNRATE,JTSJOR),4,"Vacancy rate")Run example Full descriptionAdd an x-axis marker.
Aliases: XMARKER
ADD_XMARKER(LINE_CHART(UNRATE),20200301,"March 2020")Run example Full descriptionAdd a horizontal y-axis marker.
Aliases: YMARKER
ADD_YMARKER(LINE_CHART(UNRATE),5,"Five percent")Run example Full descriptionConstruct a named argument.
Full descriptionCollect named arguments.
Full descriptionBuild a bullet slide.
Aliases: BULLETSLIDE
Remove annotations from a supported chart.
Aliases: CLEAR_ANNOTATIONS
REMOVE_ANNOTATIONS(LINE_CHART(UNRATE))Run example Full descriptionReturn raw argument text as a string.
Full descriptionCreate a D3 HTML paragraph.
Full descriptionBuild a text slide.
Aliases: TEXTSLIDE
Render a Sankey group as a chart.
SANKEY_CHART(CREATE_SANKEY_GROUP(LIST(PAYEMS,INDPRO)))Run example Full descriptionCombine Sankey paths and nested groups.
SANKEY_GROUP(SANKEY_PATH(SANKEY_LINK("A"),SANKEY_LINK("B"),INDPRO))Run example Full descriptionCreate a Sankey endpoint or link identifier.
SANKEY_LINK("Supply","Demand")Run example Full descriptionCreate a time-varying Sankey path.
SANKEY_PATH(SANKEY_LINK("Supply"),SANKEY_LINK("Demand"),INDPRO)Run example Full descriptionReplace each value with its nonnegative magnitude.
x = DIFF(SERIES_SINCE(INDPRO,20010101))
LINE_CHART(ABS(x))Run example Full descriptionReturn the beginning observation date.
Full descriptionReturn the first series value.
Full descriptionReturn today as numeric YYYYMMDD.
Aliases: CURRENTDATE
Return the ending observation date.
Full descriptionReturn the last series value.
Aliases: LAST_VALUE
Raise e to each input value.
x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(EXP(LOG(x)))Run example Full descriptionInterpolate a series value at a date.
Full descriptionApply the existing observation lag.
Full descriptionReturn the maximum series value.
Full descriptionReturn the date of the maximum value.
Full descriptionReturn the minimum series value.
Full descriptionReturn the date of the minimum value.
Full descriptionReturn a series quantile.
Full descriptionCount series observations.
Full descriptionParse a symbolic expression.
Full descriptionCreate a numeric array.
Full descriptionNormalize series through the existing normalize method.
Aliases: NORMALIZE, TONORMAL
Animated Graph a series
Animated_Line_chart(UNRate)Run example Add a two-point line to a chart.
ADD_SERIES_LINE(LINE_CHART(UNRATE),20200101,5,20251201,5,"Reference")Run example Full descriptionAppend a subtitle to a line chart.
Aliases: SUBTITLE
ADD_SUBTITLE(LINE_CHART(UNRATE),"Monthly observations")Run example Full descriptionAnimate a rolling bar chart.
ANIMATED_BAR_CHART(LIST(UNRATE,U6RATE))Run example Full descriptionAnimate a rolling scatter plot.
ANIMATE_SCATTER_PLOT(UNRATE,JTSJOR,30)Run example Full descriptionShade the area between two series and overlay a third line.
AREA_LINE_CHART(U6RATE,UNRATE,UNRATE)Run example Full descriptionDraw 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 descriptionCompare series using the period bar chart.
Aliases: LATEST_BAR, PERIOD_BAR
BAR_CHARTD3(LIST(UNRATE,U6RATE))Run example Full descriptionDisplay the existing split-regression chart.
Aliases: BINARYSPLIT, SPLIT_REGRESSION
BINARY_SPLIT(UNRATE,JTSJOR)Run example Full descriptionCollect operators in the existing combined panel.
Full descriptionCollect supported objects into a D3 combo.
Full descriptionBuild the existing two-series discriminant chart.
Full descriptionDraw two series on separate left and right y axes.
Aliases: DUAL_CHART
DUAL_LINE_CHART(UNRATE,U6RATE)Run example Full descriptionConstruct the existing GARCH volatility analysis.
Full descriptionChoose the existing recommended chart for a series.
GRAPH(INDPRO)Run example Full descriptionDisplay the distribution of a series as a histogram.
HIST(LOGDIFF(INDPRO))Run example Full descriptionPlot 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 descriptionDraw a series with its mean line.
Aliases: LINE_CHART_WITH_MEAN, MEAN_CHART, MEAN_LINE_CHART
LINE_GRAPH_WITH_MEAN(UNRATE)Run example Full descriptionReturn a fitted logistic series.
LINE_CHART(LOGISTIC_CURVE(INDPRO))Run example Full descriptionDisplay a logistic fit with residuals.
Aliases: LOGISTIC_CHART, LOGISTIC_FIT, LOGISTIC_PLOT
LOGISTIC_GRAPH(INDPRO)Run example Full descriptionDisplay a logistic fit with lower and upper bounds.
LOGISTIC_GRAPH_BOUND(INDPRO,1,200)Run example Full descriptionDisplay a logistic fit constrained by a lower bound.
LOGISTIC_GRAPH_LOWER(INDPRO,1)Run example Full descriptionDisplay a logistic fit constrained by an upper bound.
LOGISTIC_GRAPH_UPPER(INDPRO,200)Run example Full descriptionMerge D3 line or scatter charts.
MERGE_CHARTS("Combined",LINE_CHART(UNRATE),LINE_CHART(U6RATE))Run example Full descriptionDisplay the existing shock-probability chart.
POISSON_CHART(INDPRO,5)Run example Full descriptionBuild the existing polynomial-fit chart.
Full descriptionPlot a polynomial relationship with fitted bands.
POLY_SCATTER(UNRATE,JTSJOR,3)Run example Full descriptionEvaluate the existing polynomial-spline chart operator.
POLY_SPLINE(LIST(UNRATE,JTSJOR),2,3)Run example Full descriptionCreate the existing publication chart presentation.
Aliases: PUBLISH
PUBLICATION_CHART(LINE_CHART(UNRATE))Run example Full descriptionCompute a rolling regression slope.
Full descriptionCompute a rolling correlation.
Full descriptionDisplay the existing rolling quadratic relationship.
ROLL_QUADRATIC(UNRATE,JTSJOR,36)Run example Full descriptionCompute a rolling standard deviation.
Full descriptionPlot two series with the existing fitted confidence band.
Aliases: SCATTERPLOT
SCATTER_PLOT(UNRATE,JTSJOR)Run example Full descriptionSet the title of a supported chart.
SET_TITLE(LINE_CHART(UNRATE),"Unemployment")Run example Full descriptionSet a title and append subtitles.
Aliases: SETTITLESUBTITLE, TITLE, TITLE_SUBTITLE
SET_TITLE_SUBTITLE(LINE_CHART(UNRATE),"Unemployment","Monthly observations")Run example Full descriptionFit polynomial segments around supplied split dates.
SPLIT_POLY_FIT(LIST(UNRATE,JTSJOR),2,20200301)Run example Full descriptionDisplay multiple series as stacked bars.
Aliases: STACKEDBAR, STACKEDBARCHART
STACKED_BAR_CHART(LIST(UNRATE,U6RATE))Run example Full descriptionCompare relative series paths.
Aliases: RELATIVE_COMPARISON, TERM_GRAPH
TERM_CHART(INDPRO,PAYEMS)Run example Full descriptionConstruct the existing volatility-study analysis.
Full descriptionAggregate a series with an explicit period and method.
Aliases: AGGREGATE, AGGREGATETOPERIOD, RESAMPLE
Load an EPA AQS daily air-quality series.
Full descriptionLoad data through the Bank of England integration.
Full descriptionSearch the BOE data catalog.
Full descriptionLoad data through the Centers for Disease Control and Prevention integration.
Full descriptionSearch the CDC data catalog.
Full descriptionLoad data through the China data source integration.
Full descriptionSearch the installed China data integration.
Full descriptionClip series values using numeric bounds.
Full descriptionLoad data through the Eurostat Comext integration.
Full descriptionBuild a trade network through the server Comext integration.
Full descriptionCompute the existing compounded cumulative series.
Aliases: COMPOUNDSUM
Load data through the UN Comtrade integration.
Full descriptionCompute cumulative sums.
Aliases: CUMSUM
Load DART adult fish passage or river-environment data.
Full descriptionCalculate changes between consecutive observations.
x = SERIES_SINCE(UNRATE,20010101)
LINE_CHART(DIFF(x))Run example Full descriptionLoad data through the ECB integration.
Full descriptionSearch ECB data with an optional topic selector.
Aliases: ECBSEARCH, SEARCH_ECB
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 descriptionSelect EIA matches through the server integration.
Full descriptionSearch 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 descriptionApply the existing equicent transformation to a series or list.
EQUICENT(INDPRO)Run example Full descriptionLoad data through the Japan e-Stat integration.
Full descriptionLoad Japan e-Stat search results through the server loop hook.
Aliases: ESTATLOOP
Search the ESTAT data catalog.
Aliases: ESTATSEARCH, SEARCH_ESTAT
Search the EUKLEMS data catalog.
Full descriptionLoad data through the Eurostat integration.
Full descriptionExtract an output from a supported result object.
Aliases: EX
Summarize tail behavior using excess kurtosis.
x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
KURTOSIS(x)Run example Full descriptionReturn the last requested observations.
Aliases: TAIL
Take the natural logarithm of positive values.
x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(LOG(x))Run example Full descriptionRainbowStats 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 descriptionCalculate the arithmetic average of the supplied observations.
Aliases: AVG
x = SERIES_SINCE(UNRATE,20010101)
MEAN(x)Run example Full descriptionLoad data through the Federal Reserve Bank of New York integration.
Full descriptionSearch the NYFED data catalog.
Full descriptionCompute the existing positive part transformation.
Aliases: POSITIVE
Search FRED and load up to 20 matching series.
Aliases: FRED_SEARCH, SEARCH_FRED
Load FRED series associated with a numeric release ID.
Full descriptionSERIES_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 descriptionReturn descriptive statistics in a table.
Full descriptionSummarize the asymmetry of the supplied observations.
x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
SKEW(x)Run example Full descriptionMeasure dispersion around the mean.
x = LOGDIFF(SERIES_SINCE(INDPRO,20010101))
STDDEV(x)Run example Full descriptionConvert series frequency using toAnnual.
Aliases: TOANNUAL
Apply the existing base-increase transformation.
Full descriptionConvert series frequency using toMonthly.
Aliases: TOMONTHLY
Convert series frequency using toQuarterly.
Aliases: TOQUARTERLY
Convert series frequency using toWeekly.
Aliases: TOWEEKLY
Load data through the U.S. Treasury integration.
Full descriptionSearch the TREASURY data catalog.
Aliases: SEARCH_TREASURY, TREASURYSEARCH
Compute the existing up/down count transformation.
Full descriptionLoad a Bureau of Reclamation RISE daily series.
Full descriptionLoad data through the U.S. Department of Agriculture integration.
Full descriptionSearch the USDA data catalog.
Full descriptionLoad a USGS daily observation series.
Full descriptionApply the existing volatility-drag index transformation.
VOL_DRAG_INDEX(INDPRO,2)Run example Full descriptionCreate Cholesky Matrix from a list of series.
CholMatrix=CHOLESKY(covvar(LogDiff(List(DGS10,DEXJPUS,DGS30)))))Run example Count matrix columns.
Full descriptionCompute a correlation matrix or pairwise correlation.
Aliases: CORRELATION
Compute a covariance matrix or pairwise covariance.
Full descriptionConvert series observations to a data matrix.
Full descriptionCompute a matrix inverse.
Full descriptionCount matrix rows.
Full descriptionTranspose a numeric matrix.
Full descriptionDisplay autocorrelation and partial-autocorrelation analysis.
Aliases: ACFCHART, ACF_GRAPH
ACF_CHART(LOGDIFF(INDPRO),24)Run example Full descriptionBuild the existing automatic ARIMA analysis.
Full descriptionDisplay the existing epicycle reconstruction.
EPICYCLES(SERIES_SINCE(INDPRO,20000101),8)Run example Full descriptionBuild the existing multivariable transfer-function analysis.
Full descriptionFit the existing polynomial distributed-lag model.
Aliases: PDL
p=PDL_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)),12,2)
EXTRACT(p,"periodbarchart")Run example Full descriptionDisplay the power spectrum of a series.
SPECTRUM(LOGDIFF(INDPRO))Run example Full descriptionBuild the existing two-series transfer-function analysis.
Full descriptionVAR_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 descriptionChart a fitted VAR equation.
Full descriptionAdd event or monthly dummy variables using the existing paths.
ADD_DUMMY_SERIES(LIST(INDPRO,PAYEMS),1)Run example Full descriptionAppend monthly dummy series to a list.
REGRESSION(ADD_MONTHLY_DUMMY_SERIES(LIST(INDPRO,PAYEMS)))Run example Full descriptionSearch 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 descriptionSelect 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 descriptionSearch candidate regressors and return the selected regression.
r=BEST_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)),1)
EXTRACT(r,"model")Run example Full descriptionConstruct the existing bootstrap analysis.
Full descriptionLoad matching clinical-trial records.
Aliases: CT_SEARCH
Fit constrained ordinary least squares.
Aliases: CONSTRAINED
r=CONSTRAINED_OLS(LIST(INDPRO,PAYEMS),1)
EXTRACT(r,"r2chart")Run example Full descriptionGroup CPS wages using supplied numeric boundaries.
Full descriptionEstimate the existing difference-in-differences event analysis.
Aliases: DID, DIFF_IN_DIFF
m=DID(treated,controls,20200301)
EXTRACT(m,"summary")Run example Full descriptionRun the existing genetic-search, forest and OLS pipeline.
m=DISCOVER_MODEL(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")Run example Full descriptionEstimate two regimes at a fixed threshold.
t=FIXED_THRESHOLD_REGRESSION(LIST(UNRATE,JTSJOR),1,4)
EXTRACT(t,"model")Run example Full descriptionSearch lagged predictors using the existing genetic model.
m=GENETIC_MODEL(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")Run example Full descriptionApply the existing rolling GLS calculation.
r=REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
g=GLS(r,12)
EXTRACT(g,"model")Run example Full descriptionAnalyze a county cross section grouped by state.
Full descriptionFit the existing Huber robust-regression selection.
HUBER_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))Run example Full descriptionDemonstrate selection effects from searching over instruments.
m=INSTRUMENT_HACKING(200)
EXTRACT(m,"summary")Run example Full descriptionEstimate instrumental-variables regression.
iv=IV_REGRESSION(LIST(Y,X),LIST(Z1,Z2))
EXTRACT(iv,"first_stage_f")
EXTRACT(iv,"beta:1")Run example Full descriptionExpand a wildcard function into a combined presentation.
LOOP(LINE_CHART($$),DGS10,DGS2)Run example Full descriptionLoad a geographic series list after wildcard substitution.
Aliases: ECB_LOOP
LOOP_ECB(EXR.A.$$.EUR.SP00.A,"$$ exchange rate")Run example Full descriptionLoad a geographic series list after wildcard substitution.
LOOP_EURO_ECB(ICP.M.$$.N.000000.4.ANR,"$$ inflation")Run example Full descriptionExpand a wildcard function while retaining its result objects.
MODELS=LOOP_OBJECTS(REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF($$))),PAYEMS,CPIAUCSL)Run example Full descriptionLoad a list across the installed U.S. state set.
LOOP_STATE2($$UR)Run example Full descriptionLoad a list across the installed U.S. state set.
LOOP_STATE_ANSICODE(ATNHPIUS$$A)Run example Full descriptionLoad a geographic series list after wildcard substitution.
LOOP_US_COUNTY(PCPI$$,"WA")Run example Full descriptionCompare matched observations across groups.
m=MATCHED_COMPARISON(LIST(UNRATE,JTSJOR,CPIAUCSL),1,4)
EXTRACT(m,"balance")Run example Full descriptionBuild the existing principal-component analysis object.
Full descriptionReturn principal-component series.
Full descriptionLoad BLS Quarterly Census of Employment and Wages data.
Full descriptionFit quantile random-forest regression.
m=QUANTILE_RANDOM_FOREST(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")Run example Full descriptionFit a random-forest regression.
m=RANDOM_FOREST(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS),LOGDIFF(CPIAUCSL)))
EXTRACT(m,"slideshow")Run example Full descriptionFit ordinary least squares.
Aliases: REG
r=REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
EXTRACT(r,"slideshow")Run example Full descriptionFit 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 descriptionCompare ridge regressions over the existing lambda grid.
Aliases: RIDGE
RIDGE_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))Run example Full descriptionCollect regression equations into a system.
s=SIMU_REGRESSION(REGRESSION(UNRATE,U6RATE),REGRESSION(INDPRO,PAYEMS))
EXTRACT(s,"residual_covariance")Run example Full descriptionBuild the existing spectral Kullback-Leibler analysis.
SPECTRAL_KL(LIST(INDPRO,PAYEMS),LIST(INDPRO,PAYEMS))Run example Full descriptionEstimate the existing staggered synthetic-control analysis.
Aliases: SSC
m=SSC(outcomes,20120101,20150101,0)
EXTRACT(m,"event_att")Run example Full descriptionAppend state fixed-effect variables to a cross section.
STATE_FIXED_EFFECTS(crossSection,"largest")Run example Full descriptionEstimate 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 descriptionBuild the existing instrumental-variables system estimator.
system=SIMU_REGRESSION(REGRESSION(UNRATE,U6RATE),REGRESSION(INDPRO,PAYEMS))
THREE_STAGE_REGRESSION(system,LIST(CPIAUCSL))Run example Full descriptionSearch for a two-regime regression threshold.
t=THRESHOLD_REGRESSION(LIST(UNRATE,JTSJOR),1,24)
EXTRACT(t,"slideshow")Run example Full descriptionBuild the existing series transition analysis.
Full descriptionConstruct a binomial distribution.
Aliases: BINOMIAL
Construct a Cauchy distribution.
Full descriptionBuild the existing distribution-map presentation.
DISTRIBUTION_MAP(LIST(UNRATE,U6RATE))Run example Full descriptionConstruct the existing exponential distribution.
Full descriptionFit a distribution and display its chart.
Aliases: HIST_FIT
FIT_DIST(LOGDIFF(INDPRO))Run example Full descriptionConstruct the existing gamma distribution.
Full descriptionConstruct a normal distribution.
Aliases: NORMAL
Sample a distribution into a numeric array.
Full descriptionConstruct the existing uniform distribution.
Full descriptionPricing of Simple European/American Options
Option_PricerRun example Pricing of European Options Using Different Models
Option_ModelerRun example Pricing of U.S. Government Bonds
US_GOVT_BOND_PRICERRun example Pricing of U.S. Corporate Bonds
US_CORPORATE_BOND_PRICERRun example Pricing of U.S. Simple Convertible Corporate Bonds
US_CONVERTIBLE_BOND_PRICERRun example In Development, a Tool for Evaluating Structured Products
Structured_Product_DeveloperRun example Defeasance of a Monthly Series of Cash Flows
Defeasance_modelRun example Calculation of Barrier Options using Eigenfunctions
Spectral_BarriersRun example Add a linear constraint to an LP or LP regression.
Aliases: LP_ADD_EQUATION
ADD_LP_EQUATION(P,"X+Y<=4")Run example Full descriptionCreate 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 descriptionDisplay the existing LP dual table.
DUALMODEL_LP(P)Run example Full descriptionCreate an ordinary linear-programming model.
P=LINEAR_LP(Production)Run example Full descriptionAdd 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 descriptionCreate a linear-programming regression.
Aliases: LP_OLS
r=LP_REGRESSION(LIST(LOGDIFF(INDPRO),LOGDIFF(PAYEMS)))
EXTRACT(r,"model")Run example Full descriptionMaximize an LP objective.
MAX_LP(P)Run example Full descriptionMinimize an LP objective.
MIN_LP(P)Run example Full descriptionReturn an ordinary LP model.
MODEL_LP(P)Run example Full descriptionSet the objective of an ordinary LP.
SET_LP_OBJECTIVE(P,3*X+2*Y)Run example Full descriptionSet an object parameter.
Aliases: SET
Chart the existing presidential-period comparison.
Full descriptionCompare relative paths over selected presidential terms.
Aliases: COMPAREPRESIDENTS
COMPARE_SELECTED_PRESIDENTS(UNRATE,OBAMA,TRUMP)Run example Full descriptionFit the existing party-dummy regression.
r=PARTY_REGRESSION(UNRATE)
EXTRACT(r,"model")Run example Full descriptionCreate the existing Democratic or Republican party-period series.
Full descriptionBuild the existing political-period analysis.
Full descriptionFit regression with presidential-term dummy variables.
r=PRESIDENT_REGRESSION(UNRATE)
EXTRACT(r,"model")Run example Full descriptionDisplay Welch spectral transfer-function analysis.
SPECTRAL_TRANSFER_FUNCTION_WELCH(LOGDIFF(INDPRO),LOGDIFF(PAYEMS))Run example Full descriptionDisplay a selected spectral transfer-matrix result.
SPECTRAL_TRANSFER_MATRIX(LIST(INDPRO,PAYEMS),PEAK)Run example Full descriptionOpen the existing interest rates model.
INTEREST_RATES()Run example Full descriptionOpen the existing marketpage model.
MARKETPAGE()Run example Full descriptionOpen the existing merton debt gdp model.
MERTON_DEBT_GDP()Run example Full descriptionQuick View of a Time Series
series_analysisRun example Competitive Bidding with Asymmetric Information - Wilson
Bid_AnalyzerRun example Analysis of Two Time Series, ScatterPlot,Regression etc
dual_series_analysisRun example Analysis of Mutivariate Time Series,Correlations,Regression etc
multi_series_analysisRun example Chart of various economic flows
Sankey_ChartsRun example 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 descriptionCreate recession-probability analysis from predictors.
RECESSION_PROBIT(LIST(T10Y3M,LOGDIFF(INDPRO)))Run example Full descriptionBuild an animated slideshow.
Aliases: SLIDE, SLIDES
Historical Time Series Simulation
series_simulatorRun example Testing the concept of user created simulations
Normal_TestRun example Open the existing affine rates model.
AFFINE_RATES()Run example Full descriptionTransform yield observations using the existing mort duration calculation.
MORT_DURATION(DGS10,10)Run example Full descriptionTransform yield observations using the existing mort payment calculation.
MORT_PAYMENT(DGS10,10)Run example Full descriptionTransform yield observations using the existing us bond duration calculation.
US_BOND_DURATION(DGS10,10)Run example Full descriptionTransform yield observations using the existing us zero calculation.
US_ZERO(DGS10,10)Run example Full descriptionBuild a model term structure.
ZCB_CIR_CURVE(R0,0.03,TMIN,1,TMAX,10,N,10)Run example Full descriptionAppend 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 descriptionRegister 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 descriptionCompile 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 descriptionDisplay 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 descriptionSet 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 descriptionSolve 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 descriptionAdd series to a stored data list.
Full descriptionJoin values into text.
Full descriptionSelect one series from a list.
Full descriptionApply the existing index-100 transformation.
Full descriptionINTERPOLATE(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 descriptionReturn a summary table for a series list.
Full descriptionCreate a series using new values and existing dates.
Full descriptionCompute the existing negative part transformation.
Aliases: NEGATIVE
Compute a rolling covariance.
Full descriptionCompute a rolling mean.
Full descriptionCompute a rolling OLS fitted value.
Full descriptionMove a selected series to the first position.
Full descriptionCopy a series and give it a new name.
Aliases: NAME
Set units on a series copy or Sankey chart.
Full descriptionDivide one operator value by another.
Full descriptionCompute the existing z-score transformation.
Full descriptionAdd 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 descriptionAdd a text-block paragraph to a D3 HTML panel.
Full descriptionCreate the existing AI graph analysis panel.
Full descriptionHTML_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 descriptionWrap evaluated string content as HTMLObject.
Full descriptionBuild the existing economic recipes slideshow.
Full descriptionAnimate a time-series line.
ANIMATED_LINE_CHART(SERIES_SINCE(INDPRO,20200101))Run example Full descriptionANIMATE_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 descriptionDisplay Bollinger bands for a series.
BOLLINGER(INDPRO,12,2)Run example Full descriptionCreate a Sankey group from a series list.
CREATE_SANKEY_GROUP(LIST(PAYEMS,INDPRO))Run example Full descriptionDisplay the existing exponential-fit chart.
EXPONENTIAL_GRAPH(INDPRO)Run example Full descriptionOpen the existing GAAP histogram-building interface.
GAAP_HISTO()Run example Full descriptionGEOMETRIC_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 descriptionPlot matrix columns as lines.
PLOT_MATRIX(CURVE,0,1)Run example Full descriptionOpen the existing Sankey chart-building interface.
SANKEY_CHARTS()Run example Full descriptionReport the existing SCATTER_LAST placeholder status.
SCATTER_LAST(LIST(UNRATE),LIST(U6RATE),12)Run example Full descriptionSet the x-axis label.
SET_XAXIS(LINE_CHART(UNRATE),"Date")Run example Full descriptionSet the y-axis label.
SET_YAXIS(LINE_CHART(UNRATE),"Percent")Run example Full descriptionDisplay one column of a simulation summary.
SIMU_GRAPH(summary,0)Run example Full descriptionDisplay spectral transfer-function analysis.
SPECTRAL_TRANSFER_FUNCTION(LOGDIFF(INDPRO),LOGDIFF(PAYEMS))Run example Full descriptionDisplay official CPI or PPI component weights.
Aliases: WEIGHTCHART
WEIGHT_CHART(CPIAUCSL,0.9)Run example Full descriptionBuild the existing y-versus-x scatter view.
YX_SCATTER(LIST(UNRATE,JTSJOR))Run example Full descriptionList EPA AQS parameter classes.
Full descriptionList EPA AQS counties in a state.
Full descriptionList EPA AQS monitors for a parameter and date range.
Full descriptionList EPA AQS parameters in a class.
Full descriptionSearch EPA AQS sites.
Full descriptionList EPA AQS sites in a county.
Full descriptionList EPA AQS states.
Full descriptionInspect available EPA AQS observation variants.
Full descriptionCollect parsed bond offerings for tranche-level analysis.
BOND_LIST(IBMNotes,AppleNotes)Run example Full descriptionLoad a CFTC financial-futures position series.
Full descriptionFind CFTC Traders in Financial Futures contracts.
Full descriptionLoad a specific clinical-trial study.
Aliases: CT_STUDY
Search DART station, species and variable information.
Full descriptionLoad data through the UK Debt Management Office integration.
Full descriptionSearch the DMO data catalog.
Full descriptionRead 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 descriptionSearch 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 descriptionLoad data through the EU KLEMS integration.
Full descriptionLoad a FRED-QD series using the existing public spelling.
Full descriptionReturn the existing FRED release-date table.
Full descriptionReturn the existing FRED release table.
Full descriptionOECD("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 descriptionOECD_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 descriptionSearch the existing industry-code registry.
Full descriptionInspect Bureau of Reclamation RISE metadata.
Full descriptionInspect Bureau of Reclamation RISE metadata.
Full descriptionChart the existing Elephant Butte annual reservoir budget.
Full descriptionFind Bureau of Reclamation RISE catalog items.
Full descriptionInspect USGS station and parameter metadata.
Full descriptionSearch USGS monitoring sites.
Full descriptionLoad a World Bank cross section for a year and indicators.
Full descriptionSearch World Bank indicator information.
Full descriptionEstimate 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 descriptionFit the existing explicit ARMA specification.
Full descriptionEstimate 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 descriptionConstruct the existing multivariate Monte Carlo operator.
Full descriptionFit the existing explicit seasonal ARIMA specification.
Full descriptionAccumulate simulated increments into level paths.
Full descriptionReturn a simulation-summary mean path matrix.
Full descriptionReturn a simulation-summary standard-deviation path matrix.
Full descriptionRun the existing simulation-summary engine.
Full descriptionSTL(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)
DRun example Full descriptionEstimate 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 descriptionChart the VAR shock-path difference.
Full descriptionChart the existing shocked VAR path.
Full descriptionVECM_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 descriptionConstruct a one-trial binomial distribution.
Full descriptionSample a distribution into a matrix.
Full descriptionConstruct a lognormal distribution.
Full descriptionConstruct the existing Pareto distribution.
Full descriptionConstruct the existing Poisson distribution.
Full descriptionConstruct the existing Student-t distribution.
Full descriptionSearch 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 descriptionLASSO_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))
fitRun example Full descriptionLOCAL_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)
lpRun example Full descriptionEstimate 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 descriptionSEASONAL_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 descriptionTVP_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 descriptionReturn the existing beta matrix for a series list.
Full descriptionCompute forward/mean from a density grid.
Full descriptionKDE(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)
DRun example Full descriptionCompute kurtosis from a density grid.
Full descriptionCompute mean from a density grid.
Full descriptionReturn the series median.
Full descriptionOpen the existing normal-distribution test object.
Full descriptionCompute skewness from a density grid.
Full descriptionDiscover 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 descriptionCompute standard deviation from a density grid.
Full descriptionCompute variance from a density grid.
Full descriptionOpen the existing bid analyzer model.
BID_ANALYZER()Run example Full descriptionCalculate the existing capital-stock series.
CAPITAL_STOCK(INDPRO,0.06)Run example Full descriptionTransform yield observations using the existing corp bond duration calculation.
CORP_BOND_DURATION(DGS10,10)Run example Full descriptionTransform yield observations using the existing corp zero calculation.
CORP_ZERO(DGS10,10)Run example Full descriptionOpen the existing defeasance model model.
DEFEASANCE_MODEL()Run example Full descriptionPrice 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 descriptionCalculate 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 descriptionCalculate 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 descriptionConstruct the editable constrained-portfolio model.
KKT_PORTFOLIO(LIST(US_ZERO(DGS10,10),US_ZERO(DGS2,2)))Run example Full descriptionInfer 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 descriptionOPTION_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 descriptionOpen the existing option modeler model.
OPTION_MODELER()Run example Full descriptionOpen the existing option pricer model.
OPTION_PRICER()Run example Full descriptionOPTION_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 descriptionCompare 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 descriptionSOLVE_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")
SRun example Full descriptionOpen the existing spectral barriers model.
SPECTRAL_BARRIERS()Run example Full descriptionOpen the existing structured product developer model.
STRUCTURED_PRODUCT_DEVELOPER()Run example Full descriptionOpen the existing us convertible bond pricer model.
US_CONVERTIBLE_BOND_PRICER()Run example Full descriptionOpen the existing us corporate bond pricer model.
US_CORPORATE_BOND_PRICER()Run example Full descriptionOpen the existing us govt bond pricer model.
US_GOVT_BOND_PRICER()Run example Full descriptionCalculate 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 descriptionCalculate 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 descriptionBuild a model term structure.
ZCB_VASICEK_CURVE(R0,0.03,TMIN,1,TMAX,10,N,10)Run example Full descriptionCompute the existing Cholesky factorization.
Full descriptionMerge numeric matrices by columns.
Full descriptionCreate an editable numeric matrix.
Full descriptionCompute cumulative sums down a selected column.
Full descriptionExtract one matrix column.
Full descriptionExtract one matrix row.
Full descriptionInterpolate one matrix column onto another matrix’s x values.
Full descriptionReturn a copy with column names.
Full descriptionUpdate a matrix through EditableUpdater.
Full descriptionUpdate an object matrix through ObjectMatrixUpdater.
Full descriptionConfigure a supported object.
Aliases: CONFIG
Look up the current syntax, examples, extracts and documentation of a registered RainbowStats command, including aliases.
DESCRIBE_COMMAND("SPECTRUM")Run example Full descriptionCheck the live RainbowStats MCP server version, discovery instructions, tool metadata, UI resource and local command registration.
MCP_VERSION()Run example Full descriptionOPERATOR() 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 descriptionFind registered RainbowStats commands by task, keyword, capability, example, or extract key.
Aliases: SEARCH_COMMANDS
SEARCH_COMMAND("spectral seasonality")Run example Full descriptionCompare 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 descriptionBuild a cross section from dated series or a quoted HTTPS CSV URL.
Full descriptionCS_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
Construct the existing two-series analysis object.
Full descriptionDraw a DataList as approximate Fourier lines, retaining up to 128 components per series by default.
Full descriptionOpen the inspector for a named object that supports inspection.
INSPECT(C)Run example Full descriptionTie-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 descriptionConstruct the existing multiseries analysis object.
Full descriptionConstruct the existing single-series analysis object.
Full descriptionConstruct the existing series-simulation object.
Full descriptionAppend state PCA loading coordinates to a county cross section.
Full descriptionDifferentiate a symbolic expression.
Full descriptionEvaluate a symbolic expression with real values.
Full descriptionEvaluate a symbolic expression with complex values.
Full descriptionCompute a definite integral using Simpson integration.
Full descriptionFind a symbolic antiderivative.
Full descriptionReturn symbolic mathematics as display LaTeX.
Full descriptionApply 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 descriptionEvaluate the mathematical gamma function for a supported input.
GAMMA(5)Run example Full descriptionRaise a supported operator value to a power.
Full descriptionApply 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 descriptionCalculate the square root of each value.
x = SERIES_SINCE(INDPRO,20010101)
LINE_CHART(SQRT(x))Run example Full descriptionApply 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 descriptionList stored scenario files.
Full descriptionRead a stored scenario.
Full descriptionCreate 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 descriptionCompute 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 descriptionFIT_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 descriptionNDBC 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)
waterRun example Full descriptionDescribe 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 descriptionSearch 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 descriptionWORLD_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