* Add Statistics Menu * Add Granger Causality test * Apply Black formatting * Add Cointegration Tests * Adjust plotting for Cointegration test * Add Significant parameter to Cointegration tests * Move regression functions to seperate .py files * Progress on Panel Data * A lot of progress for Panel Data * Make functions robust and improve documentation * Re-enable Breusch-Godfrey * Add modify functionality * Improve modify functionality * Add Breusch-Pagan heteroscedasticity test * Capitalize a word * Include documentatin for the Statistics Menu * Update _index.md * Update _index.md * Update _index.md * Fix export statements and add Example datasets * Update example with Longley's dataset * Update documentation with a legit source * Compare the results from each regression models based on the wage_panel dataset * Updated with all relevant types of regression tables * Update with all relevant regression types for Panel data * Update _index.md * Add change column type, improve OLS, add time and entity effects for FE * Update documentation and fix a small bug * Add in Statistics menu, replacing Custom menu * Remove custom menu * Add in documentation * Add in gst files * Cointegration can be used on any amount of columns * Add Tests * Make tests time invariant * Update Poetry and Requirements * Change name of Statistics menu to Econometrics menu * Rename scripts * Add type in Documentation * Change names from Statistics to Econometrics * Add graph * Update tests with rounding and naming * Make minor adjustments to fix the tests * Updating tests : allow extra args for capture * Apply recorder formatting * Adding some minor formatting * Fix error with MyPy * Attempt to fix MyPy annoyance * super small style things * Fix small bugs and add plot command to dwat * Small description mistake * Update documentation with missing argument * Update styling * Add error handling and add improve show functionality * Fix merge issue * Allow import from custom_imports Co-authored-by: Jeroen Bouma <jeroenbouma@MacBook-Pro-van-Jeroen.local> Co-authored-by: jmaslek <jmaslek11@gmail.com> Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
4.7 KiB
Vendored
usage: coint [-ts {OPTIONS}] [-p] [-s SIGNIFICANT] [-h] [--export {csv,json,xlsx,png,jpg,pdf,svg}]
Show co-integration between timeseries
Cointegration is a statistical property of a collection (X1, X2, ..., Xk) of time series variables. First, all of the series must be integrated of order d (see Order of integration). Next, if a linear combination of this collection is integrated of order less than d, then the collection is said to be co-integrated. Formally, if (X,Y,Z) are each integrated of order d, and there exist coefficients a,b,c such that aX + bY + cZ is integrated of order less than d, then X, Y, and Z are cointegrated. Cointegration has become an important property in contemporary time series analysis. Time series often have trends—either deterministic or stochastic. In an influential paper, Charles Nelson and Charles Plosser (1982) provided statistical evidence that many US macroeconomic time series (like GNP, wages, employment, etc.) have stochastic trends. [Source: Wikipedia]
optional arguments:
-ts {OPTIONS}, --timeseries {OPTIONS}
The time series you wish to test co-integration on. Can hold multiple timeseries. (default: None)
-p, --plot Plot Z-Values (default: False)
-s SIGNIFICANT, --significant SIGNIFICANT
Show only companies that have p-values lower than this percentage (default: 0)
-h, --help show this help message (default: False)
--export {csv,json,xlsx,png,jpg,pdf,svg}
Export raw data into csv, json, xlsx and figure into png, jpg, pdf, svg (default: )
Example:
2022 Feb 24, 06:03 (✨) /econometrics/ $ coint adj_close-msft adj_close-aapl adj_close-tsla adj_close-googl -p
Cointegration Tests
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Pairs ┃ Constant ┃ Gamma ┃ Alpha ┃ Dickey-Fuller ┃ P Value ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ adj_close-msft/adj_close-aapl │ 46.62 │ 1.58 │ 0.00 │ -1.86 │ 0.35 │
├────────────────────────────────┼──────────┼───────┼───────┼───────────────┼─────────┤
│ adj_close-msft/adj_close-tsla │ 130.28 │ 0.18 │ -0.01 │ -2.82 │ 0.06 │
├────────────────────────────────┼──────────┼───────┼───────┼───────────────┼─────────┤
│ adj_close-msft/adj_close-googl │ 21.38 │ 0.10 │ -0.01 │ -2.51 │ 0.11 │
├────────────────────────────────┼──────────┼───────┼───────┼───────────────┼─────────┤
│ adj_close-aapl/adj_close-tsla │ 53.92 │ 0.11 │ -0.01 │ -2.94 │ 0.04 │
├────────────────────────────────┼──────────┼───────┼───────┼───────────────┼─────────┤
│ adj_close-aapl/adj_close-googl │ -7.83 │ 0.06 │ -0.00 │ -1.62 │ 0.47 │
├────────────────────────────────┼──────────┼───────┼───────┼───────────────┼─────────┤
│ adj_close-tsla/adj_close-googl │ -505.14 │ 0.51 │ -0.01 │ -2.28 │ 0.18 │
└────────────────────────────────┴──────────┴───────┴───────┴───────────────┴─────────┘
