{"id":13611649,"url":"https://github.com/jealous/stockstats","last_synced_at":"2025-10-04T16:39:45.372Z","repository":{"id":39749340,"uuid":"60466577","full_name":"jealous/stockstats","owner":"jealous","description":"Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.","archived":false,"fork":false,"pushed_at":"2025-05-18T08:18:12.000Z","size":316,"stargazers_count":1403,"open_issues_count":13,"forks_count":311,"subscribers_count":56,"default_branch":"master","last_synced_at":"2025-09-08T20:55:58.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jealous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-06-05T15:21:22.000Z","updated_at":"2025-09-01T00:20:21.000Z","dependencies_parsed_at":"2025-04-13T14:07:12.840Z","dependency_job_id":"fbf5a0db-db8b-4e21-865f-b853d0bd9fab","html_url":"https://github.com/jealous/stockstats","commit_stats":{"total_commits":43,"total_committers":9,"mean_commits":4.777777777777778,"dds":0.4651162790697675,"last_synced_commit":"c96a3df7859ed89c76b0b06bdba8ceeeab685816"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/jealous/stockstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jealous%2Fstockstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jealous%2Fstockstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jealous%2Fstockstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jealous%2Fstockstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jealous","download_url":"https://codeload.github.com/jealous/stockstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jealous%2Fstockstats/sbom","scorecard":{"id":513101,"data":{"date":"2025-08-11","repo":{"name":"github.com/jealous/stockstats","commit":"ce4a109765fa73b3b832a5422ccca266cb5efd66"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":2,"reason":"2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/jealous/stockstats/build-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jealous/stockstats/build-test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/jealous/stockstats/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jealous/stockstats/publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build-test.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/build-test.yml:24","Warn: pipCommand not pinned by hash: .github/workflows/build-test.yml:27","Warn: pipCommand not pinned by hash: .github/workflows/build-test.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:20","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:21","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-test.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yml:8"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2020-73"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T01:05:46.373Z","repository_id":39749340,"created_at":"2025-08-20T01:05:46.373Z","updated_at":"2025-08-20T01:05:46.373Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343069,"owners_count":25971399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:59.608Z","updated_at":"2025-10-04T16:39:45.340Z","avatar_url":"https://github.com/jealous.png","language":"Python","readme":"# Stock Statistics/Indicators Calculation Helper\n\n[![build \u0026 test](https://github.com/jealous/stockstats/actions/workflows/build-test.yml/badge.svg)](https://github.com/jealous/stockstats/actions/workflows/build-test.yml)\n[![codecov](https://codecov.io/gh/jealous/stockstats/branch/master/graph/badge.svg?token=IFMD1pVJ7T)](https://codecov.io/gh/jealous/stockstats)\n[![pypi](https://img.shields.io/pypi/v/stockstats.svg)](https://pypi.python.org/pypi/stockstats)\n\nVERSION: 0.6.5\n\n## Introduction\n\nSupply a wrapper ``StockDataFrame`` for ``pandas.DataFrame`` with inline stock\nstatistics/indicators support.\n\nSupported statistics/indicators are:\n\n* delta\n* permutation (zero-based)\n* log return\n* max in range\n* min in range\n* middle = (close + high + low) / 3\n* compare: le, ge, lt, gt, eq, ne\n* count: both backward(c) and forward(fc)\n* cross: including upward cross and downward cross\n* SMA: Simple Moving Average\n* EMA: Exponential Moving Average\n* MSTD: Moving Standard Deviation\n* MVAR: Moving Variance\n* RSV: Raw Stochastic Value\n* RSI: Relative Strength Index\n* KDJ: Stochastic Oscillator\n* Bolling: Bollinger Band\n* MACD: Moving Average Convergence Divergence\n* CR: Energy Index (Intermediate Willingness Index)\n* WR: Williams Overbought/Oversold index\n* CCI: Commodity Channel Index\n* TR: True Range\n* ATR: Average True Range\n* DMA: Different of Moving Average (10, 50)\n* DMI: Directional Moving Index, including\n    * +DI: Positive Directional Indicator\n    * -DI: Negative Directional Indicator\n    * ADX: Average Directional Movement Index\n    * ADXR: Smoothed Moving Average of ADX\n* TRIX: Triple Exponential Moving Average\n* TEMA: Another Triple Exponential Moving Average\n* VR: Volume Variation Index\n* MFI: Money Flow Index\n* VWMA: Volume Weighted Moving Average\n* CHOP: Choppiness Index\n* KER: Kaufman's efficiency ratio\n* KAMA: Kaufman's Adaptive Moving Average\n* PPO: Percentage Price Oscillator\n* StochRSI: Stochastic RSI\n* WT: LazyBear's Wave Trend\n* Supertrend: with the Upper Band and Lower Band\n* Aroon: Aroon Oscillator\n* Z: Z-Score\n* AO: Awesome Oscillator\n* BOP: Balance of Power\n* MAD: Mean Absolute Deviation\n* ROC: Rate of Change\n* Coppock: Coppock Curve\n* Ichimoku: Ichimoku Cloud\n* CTI: Correlation Trend Indicator\n* LRMA: Linear Regression Moving Average\n* ERI: Elder-Ray Index\n* FTR: the Gaussian Fisher Transform Price Reversals indicator\n* RVGI: Relative Vigor Index\n* Inertia: Inertia Indicator\n* KST: Know Sure Thing\n* PGO: Pretty Good Oscillator\n* PSL: Psychological Line\n* PVO: Percentage Volume Oscillator\n* QQE: Quantitative Qualitative Estimation\n\n## Installation\n\n```pip install stockstats```\n\n## Compatibility\n\nThe build checks the compatibility for the last two major releases of python3 and\nthe last release of python2.\n\n## License\n\n[BSD-3-Clause License](./LICENSE.txt)\n\n## Tutorial\n\n### Initialization\n\n`StockDataFrame` works as a wrapper for the `pandas.DataFrame`. You need to\nInitialize the `StockDataFrame` with `wrap` or `StockDataFrame.retype`.\n\n``` python\nimport pandas as pd\nfrom stockstats import wrap\n\ndata = pd.read_csv('stock.csv')\ndf = wrap(data)\n```\n\nFormalize your data. This package takes for granted that your data is sorted by\ntimestamp and contains certain columns. Please align your column name.\n\n* `date`: timestamp of the record, optional.\n* `close`: the close price of the period\n* `high`: the highest price of the interval\n* `low`: the lowest price of the interval\n* `volume`: the volume of stocks traded during the interval\n\nNote these column names are case-insensitive. They are converted to lower case\nwhen you wrap the data frame.\n\nBy default, the `date` column is used as the index. Users can also specify the\nindex column name in the `wrap` or `retype` function.\n\nExample:\n`DataFrame` loaded from CSV.\n\n```\n          Date      Amount  Close   High    Low   Volume\n0     20040817  90923240.0  11.20  12.21  11.03  7877900\n1     20040818  52955668.0  10.29  10.90  10.29  5043200\n2     20040819  32614676.0  10.53  10.65  10.30  3116800\n...        ...         ...    ...    ...    ...      ...\n2810  20160815  56416636.0  39.58  39.79  38.38  1436706\n2811  20160816  68030472.0  39.66  40.86  39.00  1703600\n2812  20160817  62536480.0  40.45  40.59  39.12  1567600\n```\n\nAfter conversion to `StockDataFrame`\n\n```\n              amount  close   high    low   volume\ndate\n20040817  90923240.0  11.20  12.21  11.03  7877900\n20040818  52955668.0  10.29  10.90  10.29  5043200\n20040819  32614676.0  10.53  10.65  10.30  3116800\n...              ...    ...    ...    ...      ...\n20160815  56416636.0  39.58  39.79  38.38  1436706\n20160816  68030472.0  39.66  40.86  39.00  1703600\n20160817  62536480.0  40.45  40.59  39.12  1567600 \n```\n\nUse `unwrap` to convert it back to a `pandas.DataFrame`.\nNote that `unwrap` won't reset the columns and the index.\n\n### `yfinance` support\n\nWhen retrieving data from yfinance, the resulting DataFrame may have a multi-index. \nThis can cause issues with the wrap function.\n\nTo handle this, a workaround is provided to identify and extract the actual \nseries when a multi-index is present. However, this approach has a limitation: \nnew columns generated by stockstats will not include the additional column index.\n\nThe recommended solution is to disable the multi-level index when retrieving \ndata from yfinance. This ensures compatibility without additional processing. \nAn example is provided below:\n\n```python\nimport yfinance as yf\n\n# Disable multi-level index when downloading data\ndata = yf.download('VIXY', multi_level_index=False)\n```\n\nBy disabling the multi-level index, the DataFrame structure remains simple, \nand subsequent operations can be performed seamlessly.\n\n### Access the Data\n\n`StockDataFrame` is a subclass of `pandas.DataFrame`. All the functions\nof `pandas.DataFrame` should work the same as before.\n\n#### Retrieve the data with symbol\n\nWe allow the user to access the statistics directly with some specified column\nname, such as `kdjk`, `macd`, `rsi`.\n\nThe values of these columns are calculated the first time you access\nthem from the data frame. Please delete those columns first if you want the\nlib to re-evaluate them.\n\n#### Retrieve the Series\n\nUse `macd = stock['macd']` or `rsi = stock.get('rsi')` to retrieve the `Series`.\n\n#### Retrieve the symbol with 2 arguments\n\nSome statistics need the column name and the window size,\nsuch as delta, shift, simple moving average, etc. Use this patter to retrieve\nthem: `\u003ccolumnName\u003e_\u003cwindowSize\u003e_\u003cstatistics\u003e`\n\nExamples:\n\n* 5 periods simple moving average of the high price: `high_5_sma`\n* 10 periods exponential moving average of the close: `close_10_ema`\n* 1 period delta of the high price: `high_-1_d`.\n  The minus symbol means looking backward.\n\n#### Retrieve the symbol with 1 argument\n\nSome statistics require the window size but not the column name. Use\nthis patter to specify your window: `\u003cstatistics\u003e_\u003cwindowSize\u003e`\n\nExamples:\n\n* 6 periods RSI: `rsi_6`\n* 10 periods CCI: `cci_10`\n* 13 periods ATR: `atr_13`\n\nSome of them have default windows.  Check their document for detail.\n\n#### Initialize all indicators with shortcuts\n\nSome indicators, such as KDJ, BOLL, MFI, have shortcuts.  Use `df.init_all()`\nto initialize all these indicators.\n\nThis operation generates lots of columns.  Please use it with caution.\n\n### Statistics/Indicators\n\nSome statistics have configurable parameters. They are class-level fields. Change\nof these fields is global. And they won't affect the existing results. Removing\nexisting columns so that they will be re-evaluated the next time you access them.\n\n#### Delta of Periods\n\nUsing pattern `\u003ccolumn\u003e_\u003cwindow\u003e_d` to retrieve the delta between different periods.\n\nYou can also use `\u003ccolumn\u003e_delta` as a shortcut to `\u003ccolumn\u003e_-1_d` \n\nExamples:\n* `df['close_-1_d']` retrieves the close price delta between current and prev. period.\n* `df['close_delta']` is the same as `df['close_-1_d']`\n* `df['high_2_d']` retrieves the high price delta between current and 2 days later\n\n#### Shift Periods\n\nShift the column backward or forward. It takes 2 parameters:\n\n* the name of the column to shift\n* periods to shift, can be negative\n\nWe fill the head and tail with the nearest data.\n\nSee the example below:\n\n``` python\nIn [15]: df[['close', 'close_-1_s', 'close_2_s']]\nOut[15]:\n          close  close_-1_s  close_2_s\ndate\n20040817  11.20       11.20      10.53\n20040818  10.29       11.20      10.55\n20040819  10.53       10.29      10.10\n20040820  10.55       10.53      10.25\n...         ...         ...        ...\n20160812  39.10       38.70      39.66\n20160815  39.58       39.10      40.45\n20160816  39.66       39.58      40.45\n20160817  40.45       39.66      40.45\n\n[2813 rows x 3 columns]\n```\n\n#### [RSI - Relative Strength Index](https://en.wikipedia.org/wiki/Relative_strength_index)\n\nRSI has a configurable window. The default window size is 14 which is\nconfigurable through `set_dft_window('rsi', n)`. e.g.\n\n* `df['rsi']`: 14 periods RSI\n* `df['rsi_6']`: 6 periods RSI\n\n#### [Log Return of the Close](https://en.wikipedia.org/wiki/Rate_of_return)\n\nLogarithmic return = ln( close / last close)\n\nFrom wiki:\n\n\u003e For example, if a stock is priced at 3.570 USD per share at the close on\n\u003e one day, and at 3.575 USD per share at the close the next day, then the\n\u003e logarithmic return is: ln(3.575/3.570) = 0.0014, or 0.14%.\n\nUse `df['log-ret']` to access this column.\n\n#### Count of Non-Zero Value\n\nCount non-zero values of a specific range. It requires a column and a window.\n\nExamples:\n\n* Count how many typical prices are larger than close in the past 10 periods\n\n``` python\nIn [22]: tp = df['middle']                             \n                                                       \nIn [23]: df['res'] = df['middle'] \u003e df['close']        \n                                                       \nIn [24]: df[['middle', 'close', 'res', 'res_10_c']]    \nOut[24]:                                               \n             middle  close    res  res_10_c            \ndate                                                   \n20040817  11.480000  11.20   True       1.0            \n20040818  10.493333  10.29   True       2.0            \n20040819  10.493333  10.53  False       2.0            \n20040820  10.486667  10.55  False       2.0            \n20040823  10.163333  10.10   True       3.0            \n...             ...    ...    ...       ...            \n20160811  38.703333  38.70   True       5.0            \n20160812  38.916667  39.10  False       5.0            \n20160815  39.250000  39.58  False       4.0            \n20160816  39.840000  39.66   True       5.0            \n20160817  40.053333  40.45  False       5.0            \n                                                       \n[2813 rows x 4 columns]                                \n```\n\n* Count ups in the past 10 periods\n\n``` python\nIn [26]: df['ups'], df['downs'] = df['change'] \u003e 0, df['change'] \u003c 0 \n                                                                     \nIn [27]: df[['ups', 'ups_10_c', 'downs', 'downs_10_c']]              \nOut[27]:                                                             \n            ups  ups_10_c  downs  downs_10_c                         \ndate                                                                 \n20040817  False       0.0  False         0.0                         \n20040818  False       0.0   True         1.0                         \n20040819   True       1.0  False         1.0                         \n20040820   True       2.0  False         1.0                         \n20040823  False       2.0   True         2.0                         \n...         ...       ...    ...         ...                         \n20160811  False       3.0   True         7.0                         \n20160812   True       3.0  False         7.0                         \n20160815   True       4.0  False         6.0                         \n20160816   True       5.0  False         5.0                         \n20160817   True       5.0  False         5.0                         \n                                                                     \n[2813 rows x 4 columns]                                              \n```\n\n#### Max and Min of the Periods\n\nRetrieve the max/min value of specified periods. They require column and\nwindow.  \nNote the window does NOT simply stand for the rolling window.\n\nExamples:\n\n* `close_-3,2_max` stands for the max of 2 periods later and 3 periods ago\n* `close_-2~0_min` stands for the min of 2 periods ago till now\n\n#### RSV - Raw Stochastic Value\n\nRSV is essential for calculating KDJ. It takes a window parameter.\nUse `df['rsv']` or `df['rsv_6']` to access it.\n\n#### [RSI - Relative Strength Index](https://en.wikipedia.org/wiki/Relative_strength_index)\n\nRSI chart the current and historical strength or weakness of a stock. It takes \na window parameter.\n\nThe default window is 14. Use `set_dft_window('rsi', n)` to tune it.\n\nExamples:\n\n* `df['rsi']`: retrieve the RSI of 14 periods\n* `df['rsi_6']`: retrieve the RSI of 6 periods\n\n#### [Stochastic RSI](https://www.investopedia.com/terms/s/stochrsi.asp)\n\nStochastic RSI gives traders an idea of whether the current RSI value is \noverbought or oversold. It takes a window parameter.\n\nThe default window is 14. Use `set_dft_window('stochrsi', n)` to tune it.\n\nExamples:\n\n* `df['stochrsi']`: retrieve the Stochastic RSI of 14 periods\n* `df['stochrsi_6']`: retrieve the Stochastic RSI of 6 periods\n\n#### [WT - Wave Trend](https://medium.com/@samuel.mcculloch/lets-take-a-look-at-wavetrend-with-crosses-lazybear-s-indicator-2ece1737f72f)\n\nRetrieve the LazyBear's Wave Trend with `df['wt1']` and `df['wt2']`.\n\nWave trend uses two parameters. You can tune them with\n`set_dft_window('wt', (10, 21))`.\n\n#### SMMA - Smoothed Moving Average\n\nIt requires column and window.\n\nFor example, use `df['close_7_smma']` to retrieve the 7 periods smoothed moving\naverage of the close price.\n\n#### [ROC - Rate of Change](https://www.investopedia.com/terms/p/pricerateofchange.asp)\n\nThe Price Rate of Change (ROC) is a momentum-based technical indicator \nthat measures the percentage change in price between the current price \nand the price a certain number of periods ago.\n\nFormular:\n\nROC = (PriceP - PricePn) / PricePn * 100\n\nWhere:\n* PriceP: the price of the current period\n* PricePn: the price of the n periods ago\n\nYou need a column name and a period to calculate ROC.\n\nExamples:\n* `df['close_10_roc']`: the ROC of the close price in 10 periods\n* `df['high_5_roc']`: the ROC of the high price in 5 periods\n\n#### [MAD - Mean Absolute Deviation](https://www.khanacademy.org/math/statistics-probability/summarizing-quantitative-data/other-measures-of-spread/a/mean-absolute-deviation-mad-review)\n\nThe mean absolute deviation of a dataset is the average\ndistance between each data point and the mean. It gives \nus an idea about the variability in a dataset.\n\nFormular:\n1. Calculate the mean.\n2. Calculate how far away each data point is from the \n   mean using positive distances. These are called \n   absolute deviations.\n3. Add those deviations together.\n4. Divide the sum by the number of data points.\n\nExample:\n* `df['close_10_mad']`: the MAD of the close price in 10 periods\n\n#### [TRIX - Triple Exponential Average](https://www.investopedia.com/articles/technical/02/092402.asp)\n\nThe triple exponential average is used to identify oversold and overbought \nmarkets.\n\nThe algorithm is:\n\n```\nTRIX = (TripleEMA - LastTripleEMA) -  * 100 / LastTripleEMA\nTripleEMA = EMA of EMA of EMA\nLastTripleEMA =  TripleEMA of the last period\n```\n\nIt requires column and window. By default, the column is `close`,\nthe window is 12.\n\nUse `set_dft_window('trix', n)` to change the default window.\n\nExamples:\n\n* `df['trix']` stands for 12 periods Trix for the close price.\n* `df['middle_10_trix']` stands for the 10 periods Trix for the typical price.\n\n#### [TEMA - Another Triple Exponential Average](https://www.forextraders.com/forex-education/forex-technical-analysis/triple-exponential-moving-average-the-tema-indicator/)\n\nTema is another implementation for the triple exponential moving average.\n\n```\nTEMA=(3 x EMA) - (3 x EMA of EMA) + (EMA of EMA of EMA)\n```\n\nIt takes two parameters, column and window. By default, the column is `close`,\nthe window is 5.\n\nUse `set_dft_window('tema', n)` to change the default window.\n\nExamples:\n\n* `df['tema']` stands for 12 periods TEMA for the close price.\n* `df['middle_10_tema']` stands for the 10 periods TEMA for the typical price.\n\n#### [VR - Volume Variation Index](https://help.eaglesmarkets.com/hc/en-us/articles/900002867026-Summary-of-volume-variation-index)\n\nIt is the strength index of the trading volume.\n\nIt has a default window of 26. Change it with `set_dft_window('vr', n)`.\n\nExamples:\n* `df['vr']` retrieves the 26 periods VR.\n* `df['vr_6']` retrieves the 6 periods VR.\n\n#### [WR - Williams Overbought/Oversold Index](https://www.investopedia.com/terms/w/williamsr.asp)\n\nWilliams Overbought/Oversold index\nis a type of momentum indicator that moves between 0 and -100 and measures\noverbought and oversold levels.\n\nIt takes a window parameter. The default window is 14. Use `set_dft_window('wr', n)`\nto change the default window.\n\nExamples:\n\n* `df['wr']` retrieves the 14 periods WR.\n* `df['wr_6']` retrieves the 6 periods WR.\n\n#### [CCI - Commodity Channel Index](https://www.investopedia.com/terms/c/commoditychannelindex.asp)\n\nCCI stands for Commodity Channel Index.\n\nIt requires a window parameter. The default window is 14. Use\n`set_dft_window('cci', n)` to change it.\n\nExamples:\n\n* `df['cci']` retrieves the default 14 periods CCI.\n* `df['cci_6']` retrieves the 6 periods CCI.\n\n#### TR - True Range of Trading\n\nTR is a measure of the volatility of a High-Low-Close series. It is used for\ncalculating the ATR.\n\n#### [ATR - Average True Range](https://en.wikipedia.org/wiki/Average_true_range)\n\nThe Average True Range is an\nN-period smoothed moving average (SMMA) of the true range value.  \nDefault to 14 periods.\n\nUsers can modify the default window with `set_dft_window('atr', n)`.\n\nExample:\n\n* `df['atr']` retrieves the 14 periods ATR.\n* `df['atr_5']` retrieves the 5 periods ATR.\n\n#### [Supertrend](https://economictimes.indiatimes.com/markets/stocks/news/how-to-use-supertrend-indicator-to-find-buying-and-selling-opportunities-in-market/articleshow/54492970.cms)\n\nSupertrend indicates the current trend.  \nWe use the [algorithm described here](https://medium.com/codex/step-by-step-implementation-of-the-supertrend-indicator-in-python-656aa678c111).\nIt includes 3 lines:\n* `df['supertrend']` is the trend line.\n* `df['supertrend_ub']` is the upper band of the trend\n* `df['supertrend_lb']` is the lower band of the trend\n\nIt has 2 parameters:\n* `StockDataFrame.SUPERTREND_MUL` is the multiplier of the band, default to 3.\n* the default window size is 14.  Change it with `set_dft_window('supertrend', n)`\n\n#### DMA - Difference of Moving Average\n\n`df['dma']` retrieves the difference of 10 periods SMA of the close price and\nthe 50 periods SMA of the close price.\n\n#### [DMI - Directional Movement Index](https://www.investopedia.com/terms/d/dmi.asp)\n\nThe directional movement index (DMI)\nidentifies in which direction the price of an asset is moving.\n\nIt has several lines:\n\n* `df['pdi']` is the positive directional movement line (+DI)\n* `df['ndi']` is the negative directional movement line (-DI)\n* `df['dx']` is the directional index (DX)\n* `df['adx']` is the average directional index (ADX)\n* `df['adxr']` is an EMA for ADX\n\nIt has several parameters.\n\n* default window for +DI is 14, change it with `set_dft_window('pdi', n)`\n* default window for -DI is 14, change it with `set_dft_window('ndi', n)`\n* `StockDataFrame.DX_SMMA` - window for DX, default to 14\n* `StockDataFrame.ADX_EMA` - window for ADX, default to 6\n* `StockDataFrame.ADXR_EMA` - window for ADXR, default to 6\n\n#### [KDJ Indicator](https://en.wikipedia.org/wiki/Stochastic_oscillator)\n\nThe stochastic oscillator is a momenxtum indicator that uses support and \nresistance levels.\n\nIt includes three lines:\n* `df['kdjk']` - K series\n* `df['kdjd']` - D series\n* `df['kdjj']` - J series\n\nThe default window is 9.  Use `set_dft_window('kdjk', n)` to change it.\nUse `df['kdjk_6']` to retrieve the K series of 6 periods.\n\nKDJ also has two configurable parameters named `StockDataFrame.KDJ_PARAM`.\nThe default value is `(2.0/3.0, 1.0/3.0)`\n\n#### [CR - Energy Index](https://support.futunn.com/en/topic167/?lang=en-us)\n\nThe Energy Index (Intermediate Willingness Index)\nuses the relationship between the highest price, the lowest price and\nyesterday's middle price to reflect the market's willingness to buy\nand sell.\n\nIt contains 4 lines:\n* `df['cr']` - the CR line\n* `df['cr-ma1']` - `StockDataFrame.CR_MA[0]` periods of the CR moving average,\n  the default window is 5\n* `df['cr-ma2']` - `StockDataFrame.CR_MA[1]` periods of the CR moving average,\n  the default window is 10\n* `df['cr-ma3']` - `StockDataFrame.CR_MA[2]` periods of the CR moving average,\n  the default window is 20\n\n#### [Typical Price](https://en.wikipedia.org/wiki/Typical_price)\n\nIt's the average of `high`, `low` and `close`.\nUse `df['middle']` to access this value.\n\nWhen `amount` is available, `middle = amount / volume`\nThis should be more accurate because amount represents the total cash flow. \n\n#### [Bollinger Bands](https://en.wikipedia.org/wiki/Bollinger_Bands)\n\nThe Bollinger bands includes three lines\n* `df['boll']` is the baseline\n* `df['boll_ub']` is the upper band\n* `df['boll_lb']` is the lower band\n\nThe default window of boll is 20.\nYou can also supply your window with `df['boll_10']`.  It will also\ngenerate the `boll_ub_10` and `boll_lb_10` column.\n\nThe default period of the Bollinger Band can be changed with\n`set_dft_window('boll', n)`.  The width of the bands can be turned with\n`StockDataFrame.BOLL_STD_TIMES`.  The default value is 2.\n\n#### [MACD - Moving Average Convergence Divergence](https://en.wikipedia.org/wiki/MACD)\n\nWe use the close price to calculate the MACD lines.\n* `df['macd']` is the difference between two exponential moving averages.\n* `df['macds]` is the signal line.\n* `df['macdh']` is he histogram line.\n\nThe period of short, long EMA and signal line can be tuned with \n`set_dft_window('macd', (short, long, signal))`.  The default\nwindows are 12 and 26 and 9.\n\n#### [PPO - Percentage Price Oscillator](https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_oscillators_ppo)\n\nThe Percentage Price Oscillator includes three lines.\n\n* `df['ppo']` derives from the difference of 2 exponential moving average.\n* `df['ppos]` is the signal line.\n* `df['ppoh']` is he histogram line.\n\nThe period of short, long EMA and signal line can be tuned with \n`set_dft_window('ppo', (short, long, signal))`.  The default\nwindows are 12 and 26 and 9.\n\n#### [Simple Moving Average](https://www.investopedia.com/terms/m/mean.asp)\n\nFollow the pattern `\u003ccolumnName\u003e_\u003cwindow\u003e_sma` to retrieve a simple moving average.\n\n#### [Moving Standard Deviation](https://www.investopedia.com/terms/s/standarddeviation.asp)\n\nFollow the pattern `\u003ccolumnName\u003e_\u003cwindow\u003e_mstd` to retrieve the moving STD.\n\n#### [Moving Variance](https://www.investopedia.com/terms/v/variance.asp)\n\nFollow the pattern `\u003ccolumnName\u003e_\u003cwindow\u003e_mvar` to retrieve the moving VAR.\n\n#### [Volume Weighted Moving Average](https://www.investopedia.com/articles/trading/11/trading-with-vwap-mvwap.asp)\n\nIt's the moving average weighted by volume.\n\nIt has a parameter for window size.  The default window is 14.  Change it with\n`set_dft_window('vwma', n)`.\n\nExamples:\n* `df['vwma']` retrieves the 14 periods VWMA\n* `df['vwma_6']` retrieves the 6 periods VWMA\n\n#### [CHOP - Choppiness Index](https://www.tradingview.com/education/choppinessindex/)\n\nThe Choppiness Index determines if the market is choppy.\n\nIt has a parameter for window size.  The default window is 14.  Change it with\n`set_dft_window('chop', n)`.\n\nExamples:\n* `df['chop']` retrieves the 14 periods CHOP\n* `df['chop_6']` retrieves the 6 periods CHOP\n\n#### [MFI - Money Flow Index](https://www.investopedia.com/terms/m/mfi.asp)\n\nThe Money Flow Index\nidentifies overbought or oversold signals in an asset.\n\nIt has a parameter for window size.  The default window is 14.  Change it with\n`set_dft_window('mfi', n)`.\n\nExamples:\n* `df['mfi']` retrieves the 14 periods MFI\n* `df['mfi_6']` retrieves the 6 periods MFI\n\n#### [ERI - Elder-Ray Index](https://admiralmarkets.com/education/articles/forex-indicators/bears-and-bulls-power-indicator)\n\nThe Elder-Ray Index contains the bull and the bear power.\nBoth are calculated based on the EMA of the close price.\n\nThe default window is 13.\n\nFormular:\n* Bulls Power = High - EMA\n* Bears Power = Low - EMA\n* EMA is exponential moving average of close of N periods\n\nExamples:\n* `df['eribull']` retrieves the 13 periods bull power\n* `df['eribear']` retrieves the 13 periods bear power\n* `df['eribull_5']` retrieves the 5 periods bull power\n* `df['eribear_5']` retrieves the 5 periods bear power\n\n#### [KER - Kaufman's efficiency ratio](https://strategyquant.com/codebase/kaufmans-efficiency-ratio-ker/)\n\nThe Efficiency Ratio (ER) is calculated by\ndividing the price change over a period by the\nabsolute sum of the price movements that occurred\nto achieve that change.\n\nThe resulting ratio ranges between 0 and 1 with\nhigher values representing a more efficient or\ntrending market.\n\nThe default column is close.\n\nThe default window is 10.\n\nFormular:\n* window_change = ABS(close - close[n])\n* last_change = ABS(close-close[1])\n* volatility = moving sum of last_change in n\n* KER = window_change / volatility\n\nExamples:\n* `df['ker']` retrieves the 10 periods KER of the close price\n* `df['high_5_ker']` retrieves 5 periods KER of the high price\n\n#### [KAMA - Kaufman's Adaptive Moving Average](https://school.stockcharts.com/doku.php?id=technical_indicators:kaufman_s_adaptive_moving_average)\n\nKaufman's Adaptive Moving Average is designed to account for market noise or \nvolatility.\n\nIt has 2 optional parameters and 2 required parameters\n* fast - optional, the parameter for fast EMA smoothing, default to 5\n* slow - optional, the parameter for slow EMA smoothing, default to 34\n* column - required, the column to calculate\n* window - required, rolling window size\n\nThe default value for window, fast and slow can be configured with\n`set_dft_window('kama', (10, 5, 34))`\n\nExamples:\n* `df['close_10,2,30_kama']` retrieves 10 periods KAMA of the close \n  price with `fast = 2` and `slow = 30`\n* `df['close_2_kama']` retrieves 2 periods KAMA of the close price\n  with default fast and slow\n\n#### Cross Upwards and Cross Downwards\n\nUse the pattern `\u003cA\u003e_xu_\u003cB\u003e` to check when A crosses up B.\n\nUse the pattern `\u003cA\u003e_xd_\u003cB\u003e` to check when A crosses down B.\n\nUse the pattern `\u003cA\u003e_x_\u003cB\u003e` to check when A crosses B.\n\nExamples:\n* `kdjk_x_kdjd` returns a series that marks the cross of KDJK and KDJD\n* `kdjk_xu_kdjd` returns a series that marks where KDJK crosses up KDJD\n* `kdjk_xd_kdjd` returns a series that marks where KDJD crosses down KDJD\n\n#### [Aroon Oscillator](https://www.investopedia.com/terms/a/aroonoscillator.asp)\n\nThe Aroon Oscillator measures the strength of a trend and \nthe likelihood that it will continue.\n\nThe default window is 25.\n\n* Aroon Oscillator = Aroon Up - Aroon Down\n* Aroon Up = 100 * (n - periods since n-period high) / n\n* Aroon Down = 100 * (n - periods since n-period low) / n\n* n = window size\n\nExamples:\n* `df['aroon']` returns Aroon oscillator with a window of 25\n* `df['aroon_14']` returns Aroon oscillator with a window of 14\n\n#### [Z-Score](https://www.investopedia.com/terms/z/zscore.asp)\n\nZ-score is a statistical measurement that describes a value's relationship to \nthe mean of a group of values. \n\nThere is no default column name or window for Z-Score.\n\nThe statistical formula for a value's z-score is calculated using\nthe following formula:\n\n```\nz = ( x - μ ) / σ\n```\n\nWhere:\n\n* `z` = Z-score\n* `x` = the value being evaluated\n* `μ` = the mean\n* `σ` = the standard deviation\n\nExamples:\n* `df['close_75_z']` returns the Z-Score of close price with a window of 75\n\n#### [Awesome Oscillator](https://www.ifcm.co.uk/ntx-indicators/awesome-oscillator)\n\nThe AO indicator is a good indicator for measuring the market dynamics,\nit reflects specific changes in the driving force of the market, which\nhelps to identify the strength of the trend, including the points of\nits formation and reversal.\n\nAwesome Oscillator Formula\n\n* MEDIAN PRICE = (HIGH+LOW)/2\n* AO = SMA(MEDIAN PRICE, 5)-SMA(MEDIAN PRICE, 34)\n\nExamples:\n* `df['ao']` returns the Awesome Oscillator with default windows (5, 34)\n* `df['ao_3,10']` returns the Awesome Oscillator with a window of 3 and 10\n\n#### [Balance of Power](https://school.stockcharts.com/doku.php?id=technical_indicators:balance_of_power)\n\nBalance of Power (BOP) measures the strength of the bulls vs. bears.\n\nFormular:\n```\nBOP = (close - open) / (high - low)\n```\n\nExample:\n* `df['bop']` returns the Balance of Power\n\n#### [Chande Momentum Oscillator] (https://www.investopedia.com/terms/c/chandemomentumoscillator.asp)\n\nThe Chande Momentum Oscillator (CMO) is a technical momentum \nindicator developed by Tushar Chande.\n\nThe formula calculates the difference between the sum of recent \ngains and the sum of recent losses and then divides the result \nby the sum of all price movements over the same period.\n\nThe default window is 14.\n\nFormular:\n```\nCMO = 100 * ((sH - sL) / (sH + sL))\n```\n\nwhere:\n* sH=the sum of higher closes over N periods\n* sL=the sum of lower closes of N periods\n\nExamples:\n* `df['cmo']` returns the CMO with a window of 14\n* `df['cmo_5']` returns the CMO with a window of 5\n\n#### [Coppock Curve](https://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:coppock_curve)\n\nCoppock Curve is a momentum indicator that signals\nlong-term trend reversals.\n\nFormular:\n\nCoppock Curve = 10-period WMA of (14-period RoC + 11-period RoC)\nWMA = Weighted Moving Average\nRoC = Rate-of-Change\n\nExamples:\n* `df['coppock']` returns the Coppock Curve with default windows\n* `df['coppock_5,10,15']` returns the Coppock Curve with WMA window 5,\n  fast window 10, slow window 15. \n\n#### [Ichimoku Cloud](https://www.investopedia.com/terms/i/ichimoku-cloud.asp)\n\nThe Ichimoku Cloud is a collection of technical indicators\nthat show support and resistance levels, as well as momentum\nand trend direction.\n\nIn this implementation, we only calculate the delta between\nlead A and lead B (which is the width of the cloud).\n\nIt contains three windows:\n* window for the conversion line, default to 9\n* window for the baseline and the shifts, default to 26\n* window for the leading line, default to 52\n\nFormular:\n* conversion line = (PH9 + PL9) / 2\n* baseline = (PH26 + PL26) / 2\n* leading span A = (conversion line + baseline) / 2\n* leading span B = (PH52 + PL52) / 2\n* result = leading span A - leading span B\n\nWhere:\n* PH = Period High\n* PL = Period Low\n\nExamples:\n* `df['ichimoku']` returns the ichimoku cloud width with default windows\n* `df['ichimoku_7,22,44']` returns the ichimoku cloud width with window sizes\n  7, 22, 44\n\n#### [Linear Regression Moving Average](https://www.daytrading.com/moving-linear-regression)\n\nLinear regression works by taking various data points in a sample and\nproviding a “best fit” line to match the general trend in the data. \n\nImplementation reference:\n\nhttps://github.com/twopirllc/pandas-ta/blob/main/pandas_ta/overlap/linreg.py\n\nExamples:\n* `df['close_10_lrma']` linear regression of close price with window size 10\n\n#### [Correlation Trend Indicator](https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/C-D/CorrelationTrendIndicator)\n\nCorrelation Trend Indicator is a study that estimates\nthe current direction and strength of a trend.\n\nImplementation is based on the following code:\n\nhttps://github.com/twopirllc/pandas-ta/blob/main/pandas_ta/momentum/cti.py\n\nExamples:\n* `df['cti']` returns the CTI of close price with window 12\n* `df['high_5_cti']` returns the CTI of high price with window 5\n\n#### [the Gaussian Fisher Transform Price Reversals indicator](https://www.tradingview.com/script/ajZT2tZo-Gaussian-Fisher-Transform-Price-Reversals-FTR/)\n\nThe Gaussian Fisher Transform Price Reversals indicator, dubbed\nFTR for short, is a stat based price reversal detection indicator\ninspired by and based on the work of the electrical engineer\nnow private trader John F. Ehlers.\n\nhttps://www.tradingview.com/script/ajZT2tZo-Gaussian-Fisher-Transform-Price-Reversals-FTR/\n\nImplementation reference:\n\nhttps://github.com/twopirllc/pandas-ta/blob/084dbe1c4b76082f383fa3029270ea9ac35e4dc7/pandas_ta/momentum/fisher.py#L9\n\nFormular:\n* Fisher Transform = 0.5 * ln((1 + X) / (1 - X))\n* X is a series whose values are between -1 to 1\n\nExamples:\n* `df['ftr']` returns the FTR with window 9\n* `df['ftr_20']` returns the FTR with window 20\n\n#### [Relative Vigor Index (RVGI)](https://www.investopedia.com/terms/r/relative_vigor_index.asp)\n\nThe Relative Vigor Index (RVI) is a momentum indicator\nused in technical analysis that measures the strength\nof a trend by comparing a security's closing price to\nits trading range while smoothing the results using a\nsimple moving average (SMA).\n\nFormular\n\n* NUMERATOR= (a+(2×b)+(2×c)+d) / 6\n* DENOMINATOR= (e+(2×f)+(2×g)+h) / 6\n* RVI= SMA-N of DENOMINATOR / SMA-N of NUMERATOR\n* Signal Line = (RVI+(2×i)+(2×j)+k) / 6\n\nwhere:\n\n* a=Close−Open\n* b=Close−Open One Bar Prior to a\n* c=Close−Open One Bar Prior to b\n* d=Close−Open One Bar Prior to c\n* e=High−Low of Bar a\n* f=High−Low of Bar b\n* g=High−Low of Bar c\n* h=High−Low of Bar d\n* i=RVI Value One Bar Prior\n* j=RVI Value One Bar Prior to i\n* k=RVI Value One Bar Prior to j\n* N=Minutes/Hours/Days/Weeks/Months\n\nExamples:\n* `df['rvgi']` retrieves the RVGI line of window 14\n* `df['rvgis']` retrieves the RVGI signal line of window 14\n* `df['rvgi_5']` retrieves the RVGI line of window 5\n* `df['rvgis_5']` retrieves the RVGI signal line of window 5\n\n#### [Inertia Indicator](https://theforexgeek.com/inertia-indicator/)\n\nIn financial markets, the concept of inertia was given by Donald Dorsey\nin the 1995 issue of Technical Analysis of Stocks and Commodities\nthrough the Inertia Indicator. The Inertia Indicator is moment-based\nand is an extension of Dorsey’s Relative Volatility Index (RVI).\n\nFormular:\n* inertia = n periods linear regression of RVGI\n\nExamples:\n* `df['inertia']` retrieves the inertia of 20 periods linear regression of 14 periods RVGI\n* `df['inertia_10']` retrieves the inertia of 10 periods linear regression of 14 periods RVGI\n\n#### [Know Sure Thing (kst)](https://www.investopedia.com/terms/k/know-sure-thing-kst.asp)\n\nThe Know Sure Thing (KST) is a momentum oscillator developed by\nMartin Pring to make rate-of-change readings easier for traders\nto interpret.\n\nFormular:\n* KST=(RCMA1×1)+(RCMA2×2) + (RCMA3×3)+(RCMA4×4)\n\nWhere:\n* RCMA1=10-period SMA of 10-period ROC\n* RCMA2=10-period SMA of 15-period ROC\n* RCMA3=10-period SMA of 20-period ROC\n* RCMA4=15-period SMA of 30-period ROC\n\nExample:\n* `df['kst']` retrieves the KST.\n\n#### [Pretty Good Oscillator (PGO)](https://library.tradingtechnologies.com/trade/chrt-ti-pretty-good-oscillator.html)\n\nThe Pretty Good Oscillator indicator by Mark Johnson measures the \ndistance of the current close from its N-day simple moving average, \nexpressed in terms of an average true range over a similar period.\n\nFormular:\n* PGO = (Close - SMA) / (EMA of TR)\n\nExample:\n* `df['pgo']` retrieves the PGO with default window 14.\n* `df['pgo_10']` retrieves the PGO with window 10.\n\n#### [Psychological Line (PSL)](https://library.tradingtechnologies.com/trade/chrt-ti-psychological-line.html)\n\nThe Psychological Line indicator is the ratio of the number of \nrising periods over the total number of periods.\n\nFormular:\n* PSL = (Number of Rising Periods) / (Total Number of Periods) * 100\n\nExample:\n* `df['psl']` retrieves the PSL with default window 12.\n* `df['psl_10']` retrieves the PSL with window 10.\n* `df['high_12_psl']` retrieves the PSL of high price with window 10.\n\n#### [Percentage Volume Oscillator(PVO)](https://school.stockcharts.com/doku.php?id=technical_indicators:percentage_volume_oscillator_pvo)\n\nThe Percentage Volume Oscillator (PVO) is a momentum oscillator for volume. \nThe PVO measures the difference between two volume-based moving averages as\na percentage of the larger moving average.\n\nFormular: \n\n* Percentage Volume Oscillator (PVO): \n  ((12-day EMA of Volume - 26-day EMA of Volume)/26-day EMA of Volume) x 100\n* Signal Line: 9-day EMA of PVO\n* PVO Histogram: PVO - Signal Line\n\nExample:\n* `df['pvo']` derives from the difference of 2 exponential moving average.\n* `df['pvos]` is the signal line.\n* `df['pvoh']` is he histogram line.\n\nThe period of short, long EMA and signal line can be tuned with \n`set_dft_window('pvo', (short, long, signal))`.  The default\nwindows are 12 and 26 and 9.\n\n#### [Quantitative Qualitative Estimation(QQE)](https://www.tradingview.com/script/0vn4HZ7O-Quantitative-Qualitative-Estimation-QQE/)\n\nThe Qualitative Quantitative Estimation (QQE) indicator works like a smoother \nversion of the popular Relative Strength Index (RSI) indicator. QQE expands \non RSI by adding two volatility based trailing stop lines. These trailing \nstop lines are composed of a fast and a slow moving Average True Range (ATR). \nThese ATR lines are smoothed making this indicator less susceptible to short \nterm volatility.\n\nImplementation reference:\nhttps://github.com/twopirllc/pandas-ta/blob/main/pandas_ta/momentum/qqe.py\n\nExample:\n* `df['qqe']` retrieves the QQE with RSI window 14, MA window 5.\n* `df['qqel']` retrieves the QQE long\n* `df['qqes']` retrieves the QQE short\n* `df['qqe_10,4']` retrieves the QQE with RSI window 10, MA window 4\n* `df['qqel_10,4']` retrieves the QQE long with customized windows.\n  Initialized by retrieving `df['qqe_10,4']`\n* `df['qqes_10,4']` retrieves the QQE short with customized windows\n  Initialized by retrieving `df['qqe_10,4']`\n\nThe period of short, long EMA and signal line can be tuned with \n`set_dft_window('qqe', (rsi, rsi_ma))`.  The default windows are 14 and 5.\n\n## Issues\n\nWe use [Github Issues](https://github.com/jealous/stockstats/issues) to track\nthe issues or bugs.\n\n## Others\n\nMACDH Note:\n\nIn July 2017 the code for MACDH was changed to drop an extra 2x multiplier on\nthe final value to align better with calculation methods used in tools like\ncryptowatch, tradingview, etc.\n\n## Contact author:\n\n* Cedric Zhuang \u003cjealous@163.com\u003e\n","funding_links":[],"categories":["Statistics","金融数据处理","Data Processing","Python"],"sub_categories":["NLP","Data Representation","Automated Machine Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjealous%2Fstockstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjealous%2Fstockstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjealous%2Fstockstats/lists"}