Skip to main content
Glama
JerBouma

Finance Toolkit

by JerBouma

econometrics

Read-onlyIdempotent

Run statistical tests on price or return series for unit roots, cointegration, causality, and model diagnostics. Use for pairs trading, spread modeling, or validating return properties.

Instructions

Statistical/econometric tests on price or return series (unit root: ADF/KPSS/Phillips-Perron/Zivot-Andrews, cointegration: Engle-Granger/Johansen, Granger causality, ARCH-LM, Jarque-Bera, Ljung-Box, Variance Ratio, CUSUM, Diebold-Mariano forecast comparison). Use for pairs-trading/spread-modeling foundations or diagnosing return-series properties. Requires tickers='AAPL' — use comma-separated values for multiple tickers.

Available indicators: get_arch_lm_test, get_arima_forecast, get_augmented_dickey_fuller, get_breusch_pagan_test, get_chow_test, get_cusum_test, get_diebold_mariano_test, get_difference_in_differences, get_durbin_watson_test, get_engle_granger_cointegration, get_event_study, get_f_test, get_fama_macbeth_regression, get_fixed_effects, get_gls, get_granger_causality, get_hausman_test, get_hausman_wu_test, get_impulse_response_function, get_iv_2sls, get_jarque_bera_test, get_johansen_cointegration, get_kpss_test, get_likelihood_ratio_test, get_ljung_box_test, get_logistic_regression, get_mae, get_ols, get_out_of_sample_validation, get_phillips_perron_test, get_probit_regression, get_propensity_score_matching, get_quantile_regression, get_ramsey_reset_test, get_random_effects, get_regression_discontinuity, get_rmse, get_synthetic_control, get_two_sample_t_test, get_var_forecast, get_variance_decomposition, get_variance_ratio_test, get_vecm_forecast, get_vif, get_wald_test, get_white_test, get_wls, get_zivot_andrews_test.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dNoValue for d.
pNoValue for p.
qNoValue for q. Leave unset to use the default of the indicator you selected. Defaults are 1 for get_arima_forecast, get_out_of_sample_validation; 2 for get_variance_ratio_test.
tauNoValue for tau.
lagsNoValue for lags. Leave unset to use the default of the indicator you selected. Defaults are 1 for get_impulse_response_function, get_out_of_sample_validation, get_var_forecast, get_variance_decomposition; None for get_kpss_test, get_phillips_perron_test; 10 for get_ljung_box_test; 5 for get_arch_lm_test.
lossNoValue for loss.squared
trimNoValue for trim.
modelNoValue for model.arima
omegaNoValue for omega. Leave unset to use the default of the indicator you selected. Required by: get_gls.
powerNoValue for power.
columnNoValue for column. Leave unset to use the default of the indicator you selected. Defaults differ between indicators.
cutoffNoValue for cutoff. Leave unset to use the default of the indicator you selected. Required by: get_regression_discontinuity.
kernelNoValue for kernel.uniform
periodNoObservation frequency, e.g. 'monthly', 'quarterly', or 'annual'.
caliperNoValue for caliper.
lambda_NoValue for lambda_.
max_lagNoValue for max_lag. Leave unset to use the default of the indicator you selected. Defaults are None for get_augmented_dickey_fuller, get_engle_granger_cointegration, get_zivot_andrews_test; 5 for get_granger_causality.
maxlagsNoValue for maxlags.
periodsNoValue for periods.
tickersNoComma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'.
weightsNoValue for weights. Leave unset to use the default of the indicator you selected. Required by: get_wls.
clustersNoValue for clusters.
cov_typeNoValue for cov_type.nonrobust
end_dateNoEnd of the date range in YYYY-MM-DD format.2026-10-02
gap_daysNoValue for gap_days.
method_aNoValue for method_a.ewma
method_bNoValue for method_b.rolling
bandwidthNoValue for bandwidth.
det_orderNoValue for det_order.
indicatorYesName of the specific metric to calculate, e.g. 'get_asset_turnover_ratio'. Required — omitting it returns the list of available indicators.
k_ar_diffNoValue for k_ar_diff.
quarterlyNoReturn quarterly data instead of annual when True.
break_dateNoValue for break_date. Leave unset to use the default of the indicator you selected. Required by: get_chow_test.
event_dateNoValue for event_date. Leave unset to use the default of the indicator you selected. Required by: get_event_study.
regressionNoValue for regression.c
start_dateNoStart of the date range in YYYY-MM-DD format.2021-10-03
n_bootstrapNoValue for n_bootstrap.
window_sizeNoValue for window_size.
add_constantNoValue for add_constant.
show_columnsNoComma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage.
significanceNoValue for significance.
time_effectsNoValue for time_effects.
asset_tickersNoValue for asset_tickers.
donor_tickersNoValue for donor_tickers.
other_tickersNoValue for other_tickers.
within_periodNoValue for within_period.
entity_effectsNoValue for entity_effects.
equal_varianceNoValue for equal_variance.
factor_tickersNoValue for factor_tickers.
forecast_stepsNoValue for forecast_steps.
orthogonalizedNoValue for orthogonalized.
pre_event_daysNoValue for pre_event_days.
suspect_tickerNoValue for suspect_ticker. Leave unset to use the default of the indicator you selected. Required by: get_hausman_wu_test.
train_fractionNoValue for train_fraction.
treated_tickerNoValue for treated_ticker. Leave unset to use the default of the indicator you selected. Required by: get_synthetic_control.
treatment_dateNoValue for treatment_date. Leave unset to use the default of the indicator you selected. Required by: get_difference_in_differences.
control_tickersNoValue for control_tickers.
post_event_daysNoValue for post_event_days.
treated_tickersNoValue for treated_tickers. Leave unset to use the default of the indicator you selected. Required by: get_difference_in_differences.
benchmark_tickerNoTicker used as the market benchmark, e.g. 'SPY' or '^GSPC'.SPY
dependent_tickerNoValue for dependent_ticker. Leave unset to use the default of the indicator you selected. Required by: get_f_test, get_hausman_wu_test, get_iv_2sls, get_likelihood_ratio_test, get_propensity_score_matching, get_regression_discontinuity. Defaults are None for get_breusch_pagan_test, get_chow_test, get_durbin_watson_test, get_event_study, get_gls, get_logistic_regression, get_ols, get_probit_regression, get_quantile_regression, get_ramsey_reset_test, get_wald_test, get_white_test, get_wls.
include_constantNoValue for include_constant.
treatment_periodNoValue for treatment_period. Leave unset to use the default of the indicator you selected. Required by: get_synthetic_control.
treatment_tickerNoValue for treatment_ticker. Leave unset to use the default of the indicator you selected. Required by: get_propensity_score_matching.
covariate_tickersNoValue for covariate_tickers. Leave unset to use the default of the indicator you selected. Required by: get_propensity_score_matching.
dependent_tickersNoValue for dependent_tickers.
endogenous_tickerNoValue for endogenous_ticker. Leave unset to use the default of the indicator you selected. Required by: get_iv_2sls.
estimation_windowNoValue for estimation_window.
exogenous_tickersNoValue for exogenous_tickers.
include_benchmarkNoValue for include_benchmark.
independent_columnNoValue for independent_column.
instrument_tickersNoValue for instrument_tickers. Leave unset to use the default of the indicator you selected. Required by: get_hausman_wu_test, get_iv_2sls.
restriction_matrixNoValue for restriction_matrix. Leave unset to use the default of the indicator you selected. Required by: get_wald_test.
restriction_valuesNoValue for restriction_values.
independent_tickersNoValue for independent_tickers.
treatment_thresholdNoValue for treatment_threshold.
running_variable_tickerNoValue for running_variable_ticker. Leave unset to use the default of the indicator you selected. Required by: get_regression_discontinuity.
other_independent_tickersNoValue for other_independent_tickers.
restricted_independent_tickersNoValue for restricted_independent_tickers. Leave unset to use the default of the indicator you selected. Required by: get_f_test, get_likelihood_ratio_test.
unrestricted_independent_tickersNoValue for unrestricted_independent_tickers. Leave unset to use the default of the indicator you selected. Required by: get_f_test, get_likelihood_ratio_test.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.2.1
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-08-19"New value: +"2026-10-02"
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-08-20"New value: +"2021-10-03"
    • changedInput schema / properties / within_period / default
      Previous value: -trueNew value: +false
  2. Addedv2.2.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=true, so the agent knows this is a safe, cached, external-data operation. The description adds no meaningful behavioral traits beyond what annotations provide — no mention of rate limits, data-source constraints, or output behavior. With annotations covering the safety profile, a 3 is appropriate for adding little extra context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence front-loads the test taxonomy, and the second sentence provides usage context and a key parameter example. However, the 48-item 'Available indicators' list is a repetitive dump of the enum already present in the schema, adding noise and length without new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a tool with 80 parameters and 48 sub-indicators, the description is surprisingly thin on how to select the correct indicator and which parameter combinations matter. It doesn't cover rate limits, data availability, or output format, though an output schema exists. More context on indicator selection and parameter interactions would be needed for an agent to call this correctly without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 80 parameters, including indicator-specific defaults and required-by relationships. The description only restates the tickers='AAPL' format, adding marginal value beyond what the schema provides, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause names a specific set of statistical tests (unit root, cointegration, Granger causality, ARCH-LM, etc.) on price or return series, which is a specific verb+resource. However, it does not explicitly differentiate from siblings like 'models' or 'performance' that could also involve returns, though the test taxonomy is reasonably distinctive.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a use case ('pairs-trading/spread-modeling foundations or diagnosing return-series properties') and a required-parameter instruction ('Requires tickers=...'), but there are no explicit when-not-to-use or alternative tool comparisons. The 48-indicator list is a menu, not guidance on selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.