Calculate Ramsey’s RESET test for functional form misspecification of a regression of dependent_ticker on independent_tickers.

Also known as: RESET test, Ramsey RESET.

For more information about the method, see specification_tests_model.get_ramsey_reset_test.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Ramsey RESET Test for you. Just ask in plain English.

Calculate the Ramsey RESET Test in Python

The Ramsey RESET Test is available in the Econometrics module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_ramsey_reset_test as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "MSFT"], api_key="FINANCIAL_MODELING_PREP_KEY")

# AAPL (the first ticker) is dependent; MSFT and Benchmark are independent
toolkit.econometrics.get_ramsey_reset_test(
    independent_tickers=["MSFT", "Benchmark"], period="weekly"
)

Which returns:

Metric Value
RESET F-Statistic 1.1591
P-Value 0.3165
Reject Correct Specification (5%) 0

Parameters

get_ramsey_reset_test accepts the following parameters:

  • dependent_ticker (str | None, optional): The dependent (predicted) asset. Defaults to None, meaning the Toolkit instance’s first ticker.
  • independent_tickers (str | list[str] | None, optional): The independent (predictor) asset(s). Defaults to None, meaning every other ticker in the Toolkit instance besides dependent_ticker.
  • include_benchmark (bool, optional): Whether to include “Benchmark” in the default independent ticker(s) (has no effect when independent_tickers is given explicitly). Defaults to False.
  • period (str, optional): The data frequency (daily, weekly, monthly, quarterly, or yearly). Defaults to “daily”.
  • column (str, optional): The historical data column to regress on. Defaults to “Return”.
  • add_constant (bool, optional): Whether to include an intercept in the underlying regression. Defaults to True.
  • power (int, optional): The highest power of the fitted values to add. Defaults to 3.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.

The Econometrics module page introduces the module, and the sidebar lists all of its functions.

Share