mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 00:42:19 +00:00
* 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.2 KiB
Vendored
4.2 KiB
Vendored
usage: norm [-c {OPTIONS}] [-h] [--export {csv,json,xlsx,png,jpg,pdf,svg}]
Test whether the used data is normally distributed.
Normal distribution, also known as the Gaussian distribution, is a probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean. In graph form, normal distribution will appear as a bell curve. [Source: Investopedia]
optional arguments:
-c {OPTIONS}, --column {OPTIONS}
The column and name of the database you want to test normality for (default: None)
-p, --plot Whether you wish to plot a histogram to visually depict normality (default: False)
-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 for stock data (which is not normally distributed):
2022 Feb 24, 05:31 (✨) /econometrics/ $ norm adj_close-tsla -p
Normality Test [Column: adj_close | Dataset: tsla]
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ ┃ Kurtosis ┃ Skewness ┃ Jarque-Bera ┃ Shapiro-Wilk ┃ Kolmogorov-Smirnov ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ Statistic │ -18.71 │ 4.85 │ 66.36 │ 0.88 │ 1.00 │
├───────────┼──────────┼──────────┼─────────────┼──────────────┼────────────────────┤
│ p-value │ 0.00 │ 0.00 │ 0.00 │ 0.00 │ 0.00 │
└───────────┴──────────┴──────────┴─────────────┴──────────────┴────────────────────┘
Example for returns (which is usually normally distributed):
2022 Feb 24, 05:36 (✨) /econometrics/ $ norm return-msft -p
Normality Test [Column: return | Dataset: msft]
┏━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ ┃ Kurtosis ┃ Skewness ┃ Jarque-Bera ┃ Shapiro-Wilk ┃ Kolmogorov-Smirnov ┃
┡━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ Statistic │ 7.89 │ -3.56 │ 336.34 │ 0.96 │ 0.48 │
├───────────┼──────────┼──────────┼─────────────┼──────────────┼────────────────────┤
│ p-value │ 0.00 │ 0.00 │ 0.00 │ 0.00 │ 0.00 │
└───────────┴──────────┴──────────┴─────────────┴──────────────┴────────────────────┘

