Files
OpenBB/website/content/econometrics/index/_index.md
Jeroen Bouma f2ca215132 Econometrics Menu (#1403)
* 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>
2022-03-04 21:44:59 +01:00

24 KiB
Vendored

usage: index [-n NAME [NAME ...]] [-i] [-h]

Set a (multi) index for a dataset, specified by --name. When setting two indices, it is assumed it follows the structure

optional arguments:
  -n NAME [NAME ...], --name NAME [NAME ...]
                        The first argument is the name of the database, further arguments are the columns you wish to set as index (default: None)
  -a, --adjustment      Whether to allow for making adjustments to the dataset to align it with the use case for Timeseries and Panel Data regressions (default: False)
  -d, --drop            Whether to drop the column(s) the index is set for. (default: False)
  -h, --help            show this help message (default: False)

Example:

2022 Feb 28, 04:10 (✨) /econometrics/ $ load ThesisData.xlsx thesis

2022 Feb 28, 04:10 (✨) /econometrics/ $ show thesis
                                                                    thesis
┏━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃   ┃ company  ┃ quarter ┃ current_assets ┃ assets  ┃ debt   ┃ depr_amor ┃ income ┃ current_liabilities ┃ revenue ┃ equity ┃ interest_expense ┃
┡━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ 0 │ AAR Corp │ 2016Q1  │ 970.70         │ 1522.00 │ 160.00 │ 18.50     │ 9.90   │ 359.70              │ 412.10  │ 858.30 │ 1.70             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 1 │ AAR Corp │ 2016Q2  │ 873.10         │ 1442.10 │ 136.10 │ 17.80     │ 11.80  │ 329.00              │ 468.60  │ 865.80 │ 1.20             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 2 │ AAR Corp │ 2016Q3  │ 849.40         │ 1427.00 │ 142.80 │ nan       │ 9.90   │ 314.40              │ 404.80  │ 858.50 │ 1.30             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 3 │ AAR Corp │ 2016Q4  │ 901.80         │ 1486.60 │ 154.10 │ nan       │ 11.40  │ 350.90              │ 328.30  │ 872.40 │ 1.10             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 4 │ AAR Corp │ 2017Q1  │ 893.10         │ 1502.10 │ 168.70 │ nan       │ 14.40  │ 342.80              │ 407.20  │ 885.70 │ 1.40             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 5 │ AAR Corp │ 2017Q2  │ 888.50         │ 1504.10 │ 155.30 │ nan       │ 16.30  │ 335.10              │ 450.50  │ 914.20 │ 1.50             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 6 │ AAR Corp │ 2017Q3  │ 904.70         │ 1531.70 │ 189.00 │ 10.20     │ 11.00  │ 312.10              │ 397.90  │ 924.70 │ 1.70             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 7 │ AAR Corp │ 2017Q4  │ 892.20         │ 1544.30 │ 215.80 │ 10.60     │ 13.30  │ 336.50              │ 420.60  │ 906.50 │ 1.90             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 8 │ AAR Corp │ 2018Q1  │ 933.60         │ 1512.20 │ 194.30 │ 10.60     │ 31.30  │ 326.60              │ 456.30  │ 915.20 │ 2.20             │
├───┼──────────┼─────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 9 │ AAR Corp │ 2018Q2  │ 942.70         │ 1524.70 │ 177.20 │ 9.10      │ 18.10  │ 333.30              │ 473.50  │ 936.30 │ 2.20             │
└───┴──────────┴─────────┴────────────────┴─────────┴────────┴───────────┴────────┴─────────────────────┴─────────┴────────┴──────────────────┘

2022 Feb 28, 04:10 (✨) /econometrics/ $ type quarter-thesis date

2022 Feb 28, 04:10 (✨) /econometrics/ $ show thesis
                                                                          thesis
┏━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃   ┃ company  ┃ quarter             ┃ current_assets ┃ assets  ┃ debt   ┃ depr_amor ┃ income ┃ current_liabilities ┃ revenue ┃ equity ┃ interest_expense ┃
┡━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ 0 │ AAR Corp │ 2016-01-01 00:00:00 │ 970.70         │ 1522.00 │ 160.00 │ 18.50     │ 9.90   │ 359.70              │ 412.10  │ 858.30 │ 1.70             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 1 │ AAR Corp │ 2016-04-01 00:00:00 │ 873.10         │ 1442.10 │ 136.10 │ 17.80     │ 11.80  │ 329.00              │ 468.60  │ 865.80 │ 1.20             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 2 │ AAR Corp │ 2016-07-01 00:00:00 │ 849.40         │ 1427.00 │ 142.80 │ nan       │ 9.90   │ 314.40              │ 404.80  │ 858.50 │ 1.30             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 3 │ AAR Corp │ 2016-10-01 00:00:00 │ 901.80         │ 1486.60 │ 154.10 │ nan       │ 11.40  │ 350.90              │ 328.30  │ 872.40 │ 1.10             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 4 │ AAR Corp │ 2017-01-01 00:00:00 │ 893.10         │ 1502.10 │ 168.70 │ nan       │ 14.40  │ 342.80              │ 407.20  │ 885.70 │ 1.40             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 5 │ AAR Corp │ 2017-04-01 00:00:00 │ 888.50         │ 1504.10 │ 155.30 │ nan       │ 16.30  │ 335.10              │ 450.50  │ 914.20 │ 1.50             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 6 │ AAR Corp │ 2017-07-01 00:00:00 │ 904.70         │ 1531.70 │ 189.00 │ 10.20     │ 11.00  │ 312.10              │ 397.90  │ 924.70 │ 1.70             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 7 │ AAR Corp │ 2017-10-01 00:00:00 │ 892.20         │ 1544.30 │ 215.80 │ 10.60     │ 13.30  │ 336.50              │ 420.60  │ 906.50 │ 1.90             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 8 │ AAR Corp │ 2018-01-01 00:00:00 │ 933.60         │ 1512.20 │ 194.30 │ 10.60     │ 31.30  │ 326.60              │ 456.30  │ 915.20 │ 2.20             │
├───┼──────────┼─────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ 9 │ AAR Corp │ 2018-04-01 00:00:00 │ 942.70         │ 1524.70 │ 177.20 │ 9.10      │ 18.10  │ 333.30              │ 473.50  │ 936.30 │ 2.20             │
└───┴──────────┴─────────────────────┴────────────────┴─────────┴────────┴───────────┴────────┴─────────────────────┴─────────┴────────┴──────────────────┘

2022 Feb 28, 04:11 (✨) /econometrics/ $ index thesis company quarter -d

2022 Feb 28, 04:11 (✨) /econometrics/ $ show thesis
                                                                                thesis
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃                                                ┃ current_assets ┃ assets  ┃ debt   ┃ depr_amor ┃ income ┃ current_liabilities ┃ revenue ┃ equity ┃ interest_expense ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│ ('AAR Corp', Timestamp('2016-01-01 00:00:00')) │ 970.70         │ 1522.00 │ 160.00 │ 18.50     │ 9.90   │ 359.70              │ 412.10  │ 858.30 │ 1.70             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2016-04-01 00:00:00')) │ 873.10         │ 1442.10 │ 136.10 │ 17.80     │ 11.80  │ 329.00              │ 468.60  │ 865.80 │ 1.20             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2016-07-01 00:00:00')) │ 849.40         │ 1427.00 │ 142.80 │ nan       │ 9.90   │ 314.40              │ 404.80  │ 858.50 │ 1.30             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2016-10-01 00:00:00')) │ 901.80         │ 1486.60 │ 154.10 │ nan       │ 11.40  │ 350.90              │ 328.30  │ 872.40 │ 1.10             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2017-01-01 00:00:00')) │ 893.10         │ 1502.10 │ 168.70 │ nan       │ 14.40  │ 342.80              │ 407.20  │ 885.70 │ 1.40             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2017-04-01 00:00:00')) │ 888.50         │ 1504.10 │ 155.30 │ nan       │ 16.30  │ 335.10              │ 450.50  │ 914.20 │ 1.50             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2017-07-01 00:00:00')) │ 904.70         │ 1531.70 │ 189.00 │ 10.20     │ 11.00  │ 312.10              │ 397.90  │ 924.70 │ 1.70             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2017-10-01 00:00:00')) │ 892.20         │ 1544.30 │ 215.80 │ 10.60     │ 13.30  │ 336.50              │ 420.60  │ 906.50 │ 1.90             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2018-01-01 00:00:00')) │ 933.60         │ 1512.20 │ 194.30 │ 10.60     │ 31.30  │ 326.60              │ 456.30  │ 915.20 │ 2.20             │
├────────────────────────────────────────────────┼────────────────┼─────────┼────────┼───────────┼────────┼─────────────────────┼─────────┼────────┼──────────────────┤
│ ('AAR Corp', Timestamp('2018-04-01 00:00:00')) │ 942.70         │ 1524.70 │ 177.20 │ 9.10      │ 18.10  │ 333.30              │ 473.50  │ 936.30 │ 2.20             │
└────────────────────────────────────────────────┴────────────────┴─────────┴────────┴───────────┴────────┴─────────────────────┴─────────┴────────┴──────────────────┘